Revert "Spring State Machine" (#1485)

* Revert "Merge modules (#1471)"

This reverts commit 11cdf67fad.

* Revert "(BAEL-746) How to Copy an Array in Java (#1474)"

This reverts commit 44f5742f16.

* Revert "Bs santosh spring mybatis (#1479)"

This reverts commit 3140ea166d.

* Revert "Spring State Machine (#1424)"

This reverts commit 319dd2653a.
This commit is contained in:
Grzegorz Piwowarek
2017-03-24 20:12:13 +01:00
committed by GitHub
parent 11cdf67fad
commit 092d883dde
20 changed files with 1 additions and 813 deletions

View File

@@ -1,33 +0,0 @@
package com.baeldung.spring.stateMachine;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import org.junit.Before;
import org.junit.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.statemachine.StateMachine;
import com.baeldung.spring.stateMachine.applicationReview.ApplicationReviewEvents;
import com.baeldung.spring.stateMachine.applicationReview.ApplicationReviewStates;
import com.baeldung.spring.stateMachine.config.SimpleEnumStateMachineConfiguration;
public class StateEnumMachineTest {
private StateMachine stateMachine;
@Before
public void setUp() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(SimpleEnumStateMachineConfiguration.class);
stateMachine = ctx.getBean(StateMachine.class);
stateMachine.start();
}
@Test
public void whenStateMachineConfiguredWithEnums_thenStateMachineAcceptsEnumEvents() {
assertTrue(stateMachine.sendEvent(ApplicationReviewEvents.APPROVE));
assertEquals(ApplicationReviewStates.PRINCIPAL_REVIEW, stateMachine.getState().getId());
assertTrue(stateMachine.sendEvent(ApplicationReviewEvents.REJECT));
assertEquals(ApplicationReviewStates.REJECTED, stateMachine.getState().getId());
}
}