Author: degenaro
Date: Fri Sep 16 21:13:20 2016
New Revision: 1761091

URL: http://svn.apache.org/viewvc?rev=1761091&view=rev
Log:
UIMA-5110 DUCC Job Driver (JD) employ enums for EventType and StateType

Modified:
    
uima/uima-ducc/trunk/uima-ducc-container/src/main/java/org/apache/uima/ducc/container/jd/JobDriverHelper.java
    
uima/uima-ducc/trunk/uima-ducc-container/src/main/java/org/apache/uima/ducc/container/jd/fsm/wi/WiFsm.java
    
uima/uima-ducc/trunk/uima-ducc-container/src/main/java/org/apache/uima/ducc/container/jd/timeout/TimeoutTask.java
    
uima/uima-ducc/trunk/uima-ducc-container/src/main/java/org/apache/uima/ducc/container/jd/wi/WorkItem.java
    
uima/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/container/jd/test/wi/fsm/TestWiFsm.java

Modified: 
uima/uima-ducc/trunk/uima-ducc-container/src/main/java/org/apache/uima/ducc/container/jd/JobDriverHelper.java
URL: 
http://svn.apache.org/viewvc/uima/uima-ducc/trunk/uima-ducc-container/src/main/java/org/apache/uima/ducc/container/jd/JobDriverHelper.java?rev=1761091&r1=1761090&r2=1761091&view=diff
==============================================================================
--- 
uima/uima-ducc/trunk/uima-ducc-container/src/main/java/org/apache/uima/ducc/container/jd/JobDriverHelper.java
 (original)
+++ 
uima/uima-ducc/trunk/uima-ducc-container/src/main/java/org/apache/uima/ducc/container/jd/JobDriverHelper.java
 Fri Sep 16 21:13:20 2016
@@ -75,7 +75,7 @@ public class JobDriverHelper {
                                
mb.append(Standardize.Label.node.get()+wii.getNodeName());
                                
mb.append(Standardize.Label.pid.get()+wii.getPid());
                                
mb.append(Standardize.Label.tid.get()+wii.getTid());
-                               
mb.append(Standardize.Label.state.get()+fsm.getStateCurrent().getName());
+                               
mb.append(Standardize.Label.state.get()+fsm.getStateCurrent().getStateName());
                                
mb.append(Standardize.Label.operatingMillis.get()+wii.getOperatingMillis());
                                logger.debug(location, ILogger.null_id, mb);
                                if(!fsm.isStateInitial()) {

Modified: 
uima/uima-ducc/trunk/uima-ducc-container/src/main/java/org/apache/uima/ducc/container/jd/fsm/wi/WiFsm.java
URL: 
http://svn.apache.org/viewvc/uima/uima-ducc/trunk/uima-ducc-container/src/main/java/org/apache/uima/ducc/container/jd/fsm/wi/WiFsm.java?rev=1761091&r1=1761090&r2=1761091&view=diff
==============================================================================
--- 
uima/uima-ducc/trunk/uima-ducc-container/src/main/java/org/apache/uima/ducc/container/jd/fsm/wi/WiFsm.java
 (original)
+++ 
uima/uima-ducc/trunk/uima-ducc-container/src/main/java/org/apache/uima/ducc/container/jd/fsm/wi/WiFsm.java
 Fri Sep 16 21:13:20 2016
@@ -26,7 +26,9 @@ import org.apache.uima.ducc.container.co
 import org.apache.uima.ducc.container.common.fsm.State;
 import org.apache.uima.ducc.container.common.fsm.iface.IAction;
 import org.apache.uima.ducc.container.common.fsm.iface.IEvent;
+import org.apache.uima.ducc.container.common.fsm.iface.IEvent.EventType;
 import org.apache.uima.ducc.container.common.fsm.iface.IState;
+import org.apache.uima.ducc.container.common.fsm.iface.IState.StateType;
 import org.apache.uima.ducc.container.common.logger.IComponent;
 import org.apache.uima.ducc.container.common.logger.ILogger;
 import org.apache.uima.ducc.container.common.logger.Logger;
@@ -39,24 +41,24 @@ public class WiFsm extends Fsm {
 
        private static Logger logger = Logger.getLogger(WiFsm.class, 
IComponent.Id.JD.name());
        
-       public static IState Start                                              
= new State("Start");
-       public static IState Get_Pending                                = new 
State("Get_Pending");
-       public static IState CAS_Send                                   = new 
State("CAS_Send");
-       public static IState CAS_Active                                 = new 
State("CAS_Active");
-       
-       public static IEvent Get_Request                                = new 
Event("Get_Request");
-       public static IEvent CAS_Available                              = new 
Event("CAS_Available");
-       public static IEvent CAS_Unavailable                    = new 
Event("CAS_Unavailable");
-       public static IEvent Ack_Request                                = new 
Event("Ack_Request");
-       public static IEvent Send_Failure                               = new 
Event("Send_Failure");
-       public static IEvent Ack_Timer_Pop                              = new 
Event("Ack_Timer_Pop");
-       public static IEvent End_Request                                = new 
Event("End_Request");
-       public static IEvent End_Timer_Pop                              = new 
Event("End_Timer_Pop");
-       public static IEvent Host_Failure                               = new 
Event("Host_Failure");
-       public static IEvent Process_Failure                    = new 
Event("Process_Failure");
-       public static IEvent Process_Preempt                    = new 
Event("Process_Premept");
-       public static IEvent Process_Volunteered                = new 
Event("Process_Volunteered");
-       public static IEvent Investment_Reset                   = new 
Event("Investment_Reset");
+       public static IState Start                                              
= new State(StateType.Start);
+       public static IState Get_Pending                                = new 
State(StateType.Get_Pending);
+       public static IState CAS_Send                                   = new 
State(StateType.CAS_Send);
+       public static IState CAS_Active                                 = new 
State(StateType.CAS_Active);
+       
+       public static IEvent Get_Request                                = new 
Event(EventType.Get_Request);
+       public static IEvent CAS_Available                              = new 
Event(EventType.CAS_Available);
+       public static IEvent CAS_Unavailable                    = new 
Event(EventType.CAS_Unavailable);
+       public static IEvent Ack_Request                                = new 
Event(EventType.Ack_Request);
+       public static IEvent Send_Failure                               = new 
Event(EventType.Send_Failure);
+       public static IEvent Ack_Timer_Pop                              = new 
Event(EventType.Ack_Timer_Pop);
+       public static IEvent End_Request                                = new 
Event(EventType.End_Request);
+       public static IEvent End_Timer_Pop                              = new 
Event(EventType.End_Timer_Pop);
+       public static IEvent Host_Failure                               = new 
Event(EventType.Host_Failure);
+       public static IEvent Process_Failure                    = new 
Event(EventType.Process_Failure);
+       public static IEvent Process_Preempt                    = new 
Event(EventType.Process_Premept);
+       public static IEvent Process_Volunteered                = new 
Event(EventType.Process_Volunteered);
+       public static IEvent Investment_Reset                   = new 
Event(EventType.Investment_Reset);
        
        public static IAction ActionGet                                 = new 
ActionGet();
        public static IAction ActionGetRedux                    = new 
ActionGetRedux();
@@ -177,9 +179,9 @@ public class WiFsm extends Fsm {
                String location = "transition";
                IActionData actionData = (IActionData) objectData;
                MessageBuffer mb = LoggerHelper.getMessageBuffer(actionData);
-               
mb.append(Standardize.Label.curr.get()+getStateCurrent().getName());
-               
mb.append(Standardize.Label.prev.get()+getStatePrevious().getName());
-               mb.append(Standardize.Label.event.get()+event.getName());
+               
mb.append(Standardize.Label.curr.get()+getStateCurrent().getStateName());
+               
mb.append(Standardize.Label.prev.get()+getStatePrevious().getStateName());
+               mb.append(Standardize.Label.event.get()+event.getEventName());
                logger.debug(location, ILogger.null_id, mb.toString());
        }
 }

Modified: 
uima/uima-ducc/trunk/uima-ducc-container/src/main/java/org/apache/uima/ducc/container/jd/timeout/TimeoutTask.java
URL: 
http://svn.apache.org/viewvc/uima/uima-ducc/trunk/uima-ducc-container/src/main/java/org/apache/uima/ducc/container/jd/timeout/TimeoutTask.java?rev=1761091&r1=1761090&r2=1761091&view=diff
==============================================================================
--- 
uima/uima-ducc/trunk/uima-ducc-container/src/main/java/org/apache/uima/ducc/container/jd/timeout/TimeoutTask.java
 (original)
+++ 
uima/uima-ducc/trunk/uima-ducc-container/src/main/java/org/apache/uima/ducc/container/jd/timeout/TimeoutTask.java
 Fri Sep 16 21:13:20 2016
@@ -84,7 +84,7 @@ public class TimeoutTask implements ITim
        public Object call() throws Exception {
                String location = "call";
                MessageBuffer mb = LoggerHelper.getMessageBuffer(actionData);
-               mb.append(Standardize.Label.event.get()+event.getName());
+               mb.append(Standardize.Label.event.get()+event.getEventName());
                logger.warn(location, ILogger.null_id, mb.toString());
                TimeoutManager.getInstance().timeout(actionData);
                fsm.transition(event, actionData);

Modified: 
uima/uima-ducc/trunk/uima-ducc-container/src/main/java/org/apache/uima/ducc/container/jd/wi/WorkItem.java
URL: 
http://svn.apache.org/viewvc/uima/uima-ducc/trunk/uima-ducc-container/src/main/java/org/apache/uima/ducc/container/jd/wi/WorkItem.java?rev=1761091&r1=1761090&r2=1761091&view=diff
==============================================================================
--- 
uima/uima-ducc/trunk/uima-ducc-container/src/main/java/org/apache/uima/ducc/container/jd/wi/WorkItem.java
 (original)
+++ 
uima/uima-ducc/trunk/uima-ducc-container/src/main/java/org/apache/uima/ducc/container/jd/wi/WorkItem.java
 Fri Sep 16 21:13:20 2016
@@ -153,7 +153,7 @@ public class WorkItem implements IWorkIt
                if(start > 0) {
                        if(end == 0) {
                                IState state = fsm.getStateCurrent();
-                               
if(state.getName().equals(WiFsm.CAS_Active.getName())) {
+                               
if(state.getStateName().equals(WiFsm.CAS_Active.getStateName())) {
                                        end = System.currentTimeMillis();
                                }
                                else {
@@ -170,7 +170,7 @@ public class WorkItem implements IWorkIt
        public long getMillisInvestment() {
                long retVal = 0;
                IState state = fsm.getStateCurrent();
-               if(state.getName().equals(WiFsm.CAS_Active.getName())) {
+               
if(state.getStateName().equals(WiFsm.CAS_Active.getStateName())) {
                        long now = System.currentTimeMillis();
                        retVal = now - getTodInvestment();
                }

Modified: 
uima/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/container/jd/test/wi/fsm/TestWiFsm.java
URL: 
http://svn.apache.org/viewvc/uima/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/container/jd/test/wi/fsm/TestWiFsm.java?rev=1761091&r1=1761090&r2=1761091&view=diff
==============================================================================
--- 
uima/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/container/jd/test/wi/fsm/TestWiFsm.java
 (original)
+++ 
uima/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/container/jd/test/wi/fsm/TestWiFsm.java
 Fri Sep 16 21:13:20 2016
@@ -31,9 +31,11 @@ import org.apache.uima.ducc.container.co
 import org.apache.uima.ducc.container.common.fsm.StateEventKey;
 import org.apache.uima.ducc.container.common.fsm.iface.IAction;
 import org.apache.uima.ducc.container.common.fsm.iface.IEvent;
+import org.apache.uima.ducc.container.common.fsm.iface.IEvent.EventType;
 import org.apache.uima.ducc.container.common.fsm.iface.IFsm;
 import org.apache.uima.ducc.container.common.fsm.iface.IFsmBuilder;
 import org.apache.uima.ducc.container.common.fsm.iface.IState;
+import org.apache.uima.ducc.container.common.fsm.iface.IState.StateType;
 import org.apache.uima.ducc.container.jd.JobDriver;
 import org.apache.uima.ducc.container.jd.JobDriverException;
 import org.apache.uima.ducc.container.jd.fsm.wi.WiFsm;
@@ -55,15 +57,15 @@ public class TestWiFsm extends TestBase
        @Test
        public void test_01() {
                try {
-                       IState s0 = new State("a");
-                       IState s1 = new State("a");
-                       IState s2 = new State("b");
+                       IState s0 = new State(StateType.CAS_Active);
+                       IState s1 = new State(StateType.CAS_Active);
+                       IState s2 = new State(StateType.CAS_Send);
                        assertTrue(s0.equals(s1));
-                       asExpected("State "+s0.getName()+" == "+s1.getName());
+                       asExpected("State "+s0.getStateName()+" == 
"+s1.getStateName());
                        assertTrue(!s0.equals(s2));
-                       asExpected("State "+s0.getName()+" != "+s2.getName());
+                       asExpected("State "+s0.getStateName()+" != 
"+s2.getStateName());
                        assertTrue(!s1.equals(s2));
-                       asExpected("State "+s1.getName()+" != "+s2.getName());
+                       asExpected("State "+s1.getStateName()+" != 
"+s2.getStateName());
                        try {
                                new State(null);
                                fail("expected Exception");
@@ -81,15 +83,15 @@ public class TestWiFsm extends TestBase
        @Test
        public void test_02() {
                try {
-                       IEvent e0 = new Event("c");
-                       IEvent e1 = new Event("c");
-                       IEvent e2 = new Event("d");
+                       IEvent e0 = new Event(EventType.Ack_Request);
+                       IEvent e1 = new Event(EventType.Ack_Request);
+                       IEvent e2 = new Event(EventType.CAS_Unavailable);
                        assertTrue(e0.equals(e1));
-                       asExpected("Event "+e0.getName()+" == "+e1.getName());
+                       asExpected("Event "+e0.getEventName()+" == 
"+e1.getEventName());
                        assertTrue(!e0.equals(e2));
-                       asExpected("Event "+e0.getName()+" != "+e2.getName());
+                       asExpected("Event "+e0.getEventName()+" != 
"+e2.getEventName());
                        assertTrue(!e1.equals(e2));
-                       asExpected("Event "+e1.getName()+" != "+e2.getName());
+                       asExpected("Event "+e1.getEventName()+" != 
"+e2.getEventName());
                        try {
                                new Event(null);
                                fail("expected Exception");
@@ -107,10 +109,10 @@ public class TestWiFsm extends TestBase
        @Test
        public void test_03() {
                try {
-                       IState s0 = new State("a");
-                       IState s1 = new State("b");
-                       IEvent e0 = new Event("c");
-                       IEvent e1 = new Event("d");
+                       IState s0 = new State(StateType.CAS_Active);
+                       IState s1 = new State(StateType.CAS_Send);
+                       IEvent e0 = new Event(EventType.Ack_Request);
+                       IEvent e1 = new Event(EventType.CAS_Unavailable);
                        StateEventKey se00A = new StateEventKey(s0, e0);
                        StateEventKey se00B = new StateEventKey(s0, e0);
                        assertTrue(se00A.equals(se00B));
@@ -148,21 +150,21 @@ public class TestWiFsm extends TestBase
        @Test
        public void test_04() {
                try {
-                       IState s1 = new State("s1");
-                       IState s2 = new State("s2");
-                       IEvent e1 = new Event("e1");
-                       IEvent e2 = new Event("e2");
+                       IState s1 = new State(StateType.CAS_Active);
+                       IState s2 = new State(StateType.CAS_Send);
+                       IEvent e1 = new Event(EventType.Ack_Timer_Pop);
+                       IEvent e2 = new Event(EventType.Get_Request);
                        IAction a0 = new Action();
                        IFsmBuilder fsmBuilder = new Fsm();
                        IFsm fsm = fsmBuilder;
-                       debug("s1:"+s1.getName());
-                       debug("s2:"+s2.getName());
-                       debug("e1:"+e1.getName());
-                       debug("e2:"+e2.getName());
+                       debug("s1:"+s1.getStateName());
+                       debug("s2:"+s2.getStateName());
+                       debug("e1:"+e1.getEventName());
+                       debug("e2:"+e2.getEventName());
                        fsmBuilder.addInitial(s1, e1, a0, s1);
                        fsmBuilder.add(s1, e2, a0, s2);
-                       
assertTrue(fsm.getStateCurrent().getName().equals(s1.getName()));
-                       asExpected("state == "+s1.getName());
+                       
assertTrue(fsm.getStateCurrent().getStateName().equals(s1.getStateName()));
+                       asExpected("state == "+s1.getStateName());
                }
                catch(Exception e) {
                        e.printStackTrace();
@@ -190,20 +192,20 @@ public class TestWiFsm extends TestBase
                        initUserClasspath();
                        WiFsm wiFsm = new WiFsm();
                        Object actionData = null;
-                       
assertTrue(wiFsm.getStateCurrent().getName().equals(WiFsm.Start.getName()));
-                       asExpected("state == "+WiFsm.Start.getName());
+                       
assertTrue(wiFsm.getStateCurrent().getStateName().equals(WiFsm.Start.getStateName()));
+                       asExpected("state == "+WiFsm.Start.getStateName());
                        wiFsm.transition(WiFsm.Get_Request, actionData);
-                       
assertTrue(wiFsm.getStateCurrent().getName().equals(WiFsm.Get_Pending.getName()));
-                       asExpected("state == "+WiFsm.Get_Pending.getName());
+                       
assertTrue(wiFsm.getStateCurrent().getStateName().equals(WiFsm.Get_Pending.getStateName()));
+                       asExpected("state == 
"+WiFsm.Get_Pending.getStateName());
                        wiFsm.transition(WiFsm.CAS_Available, actionData);
-                       
assertTrue(wiFsm.getStateCurrent().getName().equals(WiFsm.CAS_Send.getName()));
-                       asExpected("state == "+WiFsm.CAS_Send.getName());
+                       
assertTrue(wiFsm.getStateCurrent().getStateName().equals(WiFsm.CAS_Send.getStateName()));
+                       asExpected("state == "+WiFsm.CAS_Send.getStateName());
                        wiFsm.transition(WiFsm.Ack_Request, actionData);
-                       
assertTrue(wiFsm.getStateCurrent().getName().equals(WiFsm.CAS_Active.getName()));
-                       asExpected("state == "+WiFsm.CAS_Active.getName());
+                       
assertTrue(wiFsm.getStateCurrent().getStateName().equals(WiFsm.CAS_Active.getStateName()));
+                       asExpected("state == "+WiFsm.CAS_Active.getStateName());
                        wiFsm.transition(WiFsm.End_Request, actionData);
-                       
assertTrue(wiFsm.getStateCurrent().getName().equals(WiFsm.Start.getName()));
-                       asExpected("state == "+WiFsm.Start.getName());
+                       
assertTrue(wiFsm.getStateCurrent().getStateName().equals(WiFsm.Start.getStateName()));
+                       asExpected("state == "+WiFsm.Start.getStateName());
                }
                catch(Exception e) {
                        e.printStackTrace();
@@ -217,53 +219,53 @@ public class TestWiFsm extends TestBase
                        initUserClasspath();
                        WiFsm wiFsm = new WiFsm();
                        Object actionData = null;
-                       
assertTrue(wiFsm.getStateCurrent().getName().equals(WiFsm.Start.getName()));
-                       asExpected("state == "+WiFsm.Start.getName());
+                       
assertTrue(wiFsm.getStateCurrent().getStateName().equals(WiFsm.Start.getStateName()));
+                       asExpected("state == "+WiFsm.Start.getStateName());
                        wiFsm.transition(WiFsm.Process_Preempt, actionData);
-                       
assertTrue(wiFsm.getStateCurrent().getName().equals(WiFsm.Start.getName()));
+                       
assertTrue(wiFsm.getStateCurrent().getStateName().equals(WiFsm.Start.getStateName()));
                        //
                        wiFsm.transition(WiFsm.Get_Request, actionData);
-                       
assertTrue(wiFsm.getStateCurrent().getName().equals(WiFsm.Get_Pending.getName()));
+                       
assertTrue(wiFsm.getStateCurrent().getStateName().equals(WiFsm.Get_Pending.getStateName()));
                        wiFsm.transition(WiFsm.Process_Preempt, actionData);
-                       
assertTrue(wiFsm.getStateCurrent().getName().equals(WiFsm.Start.getName()));
+                       
assertTrue(wiFsm.getStateCurrent().getStateName().equals(WiFsm.Start.getStateName()));
                        //
                        wiFsm.transition(WiFsm.Get_Request, actionData);
-                       
assertTrue(wiFsm.getStateCurrent().getName().equals(WiFsm.Get_Pending.getName()));
-                       asExpected("state == "+WiFsm.Get_Pending.getName());
+                       
assertTrue(wiFsm.getStateCurrent().getStateName().equals(WiFsm.Get_Pending.getStateName()));
+                       asExpected("state == 
"+WiFsm.Get_Pending.getStateName());
                        wiFsm.transition(WiFsm.CAS_Available, actionData);
-                       
assertTrue(wiFsm.getStateCurrent().getName().equals(WiFsm.CAS_Send.getName()));
-                       asExpected("state == "+WiFsm.CAS_Send.getName());
+                       
assertTrue(wiFsm.getStateCurrent().getStateName().equals(WiFsm.CAS_Send.getStateName()));
+                       asExpected("state == "+WiFsm.CAS_Send.getStateName());
                        wiFsm.transition(WiFsm.Process_Preempt, actionData);
-                       
assertTrue(wiFsm.getStateCurrent().getName().equals(WiFsm.Start.getName()));
+                       
assertTrue(wiFsm.getStateCurrent().getStateName().equals(WiFsm.Start.getStateName()));
                        //
                        wiFsm.transition(WiFsm.Get_Request, actionData);
-                       
assertTrue(wiFsm.getStateCurrent().getName().equals(WiFsm.Get_Pending.getName()));
-                       asExpected("state == "+WiFsm.Get_Pending.getName());
+                       
assertTrue(wiFsm.getStateCurrent().getStateName().equals(WiFsm.Get_Pending.getStateName()));
+                       asExpected("state == 
"+WiFsm.Get_Pending.getStateName());
                        wiFsm.transition(WiFsm.CAS_Available, actionData);
-                       
assertTrue(wiFsm.getStateCurrent().getName().equals(WiFsm.CAS_Send.getName()));
-                       asExpected("state == "+WiFsm.CAS_Send.getName());
+                       
assertTrue(wiFsm.getStateCurrent().getStateName().equals(WiFsm.CAS_Send.getStateName()));
+                       asExpected("state == "+WiFsm.CAS_Send.getStateName());
                        wiFsm.transition(WiFsm.Ack_Request, actionData);
-                       
assertTrue(wiFsm.getStateCurrent().getName().equals(WiFsm.CAS_Active.getName()));
-                       asExpected("state == "+WiFsm.CAS_Active.getName());
+                       
assertTrue(wiFsm.getStateCurrent().getStateName().equals(WiFsm.CAS_Active.getStateName()));
+                       asExpected("state == "+WiFsm.CAS_Active.getStateName());
                        wiFsm.transition(WiFsm.Process_Preempt, actionData);
-                       
assertTrue(wiFsm.getStateCurrent().getName().equals(WiFsm.Start.getName()));
+                       
assertTrue(wiFsm.getStateCurrent().getStateName().equals(WiFsm.Start.getStateName()));
                        //
-                       
assertTrue(wiFsm.getStateCurrent().getName().equals(WiFsm.Start.getName()));
-                       asExpected("state == "+WiFsm.Start.getName());
+                       
assertTrue(wiFsm.getStateCurrent().getStateName().equals(WiFsm.Start.getStateName()));
+                       asExpected("state == "+WiFsm.Start.getStateName());
                        wiFsm.transition(WiFsm.Get_Request, actionData);
-                       
assertTrue(wiFsm.getStateCurrent().getName().equals(WiFsm.Get_Pending.getName()));
-                       asExpected("state == "+WiFsm.Get_Pending.getName());
+                       
assertTrue(wiFsm.getStateCurrent().getStateName().equals(WiFsm.Get_Pending.getStateName()));
+                       asExpected("state == 
"+WiFsm.Get_Pending.getStateName());
                        wiFsm.transition(WiFsm.CAS_Available, actionData);
-                       
assertTrue(wiFsm.getStateCurrent().getName().equals(WiFsm.CAS_Send.getName()));
-                       asExpected("state == "+WiFsm.CAS_Send.getName());
+                       
assertTrue(wiFsm.getStateCurrent().getStateName().equals(WiFsm.CAS_Send.getStateName()));
+                       asExpected("state == "+WiFsm.CAS_Send.getStateName());
                        wiFsm.transition(WiFsm.Ack_Request, actionData);
-                       
assertTrue(wiFsm.getStateCurrent().getName().equals(WiFsm.CAS_Active.getName()));
-                       asExpected("state == "+WiFsm.CAS_Active.getName());
+                       
assertTrue(wiFsm.getStateCurrent().getStateName().equals(WiFsm.CAS_Active.getStateName()));
+                       asExpected("state == "+WiFsm.CAS_Active.getStateName());
                        wiFsm.transition(WiFsm.End_Request, actionData);
-                       
assertTrue(wiFsm.getStateCurrent().getName().equals(WiFsm.Start.getName()));
-                       asExpected("state == "+WiFsm.Start.getName());
+                       
assertTrue(wiFsm.getStateCurrent().getStateName().equals(WiFsm.Start.getStateName()));
+                       asExpected("state == "+WiFsm.Start.getStateName());
                        wiFsm.transition(WiFsm.Process_Preempt, actionData);
-                       
assertTrue(wiFsm.getStateCurrent().getName().equals(WiFsm.Start.getName()));
+                       
assertTrue(wiFsm.getStateCurrent().getStateName().equals(WiFsm.Start.getStateName()));
                }
                catch(Exception e) {
                        e.printStackTrace();


Reply via email to