commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ra...@apache.org
Subject svn commit: r651776 - /commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/invoke/InvokeTest.java
Date Sat, 26 Apr 2008 01:42:26 GMT
Author: rahul
Date: Fri Apr 25 18:42:24 2008
New Revision: 651776

URL: http://svn.apache.org/viewvc?rev=651776&view=rev
Log:
Type safety improvements.

Modified:
    commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/invoke/InvokeTest.java

Modified: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/invoke/InvokeTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/invoke/InvokeTest.java?rev=651776&r1=651775&r2=651776&view=diff
==============================================================================
--- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/invoke/InvokeTest.java
(original)
+++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/invoke/InvokeTest.java
Fri Apr 25 18:42:24 2008
@@ -33,7 +33,7 @@
 import org.apache.commons.scxml.env.jexl.JexlEvaluator;
 import org.apache.commons.scxml.io.SCXMLParser;
 import org.apache.commons.scxml.model.SCXML;
-import org.apache.commons.scxml.model.State;
+import org.apache.commons.scxml.model.TransitionTarget;
 
 /**
  * Unit tests {@link org.apache.commons.scxml.SCXMLExecutor}.
@@ -91,10 +91,9 @@
             exec.setStateMachine(scxml);
             exec.registerInvokerClass("scxml", SimpleSCXMLInvoker.class);
             exec.go();
-            Set currentStates = exec.getCurrentStatus().getStates();
+            Set<TransitionTarget> currentStates = exec.getCurrentStatus().getStates();
             assertEquals(1, currentStates.size());
-            assertEquals("invoker", ((State)currentStates.iterator().
-                next()).getId());
+            assertEquals("invoker", currentStates.iterator().next().getId());
         } catch (Exception e) {
             e.printStackTrace();
             fail(e.getMessage());
@@ -112,7 +111,7 @@
             exec.setStateMachine(scxml);
             exec.registerInvokerClass("scxml", SimpleSCXMLInvoker.class);
             exec.go();
-            Set currentStates = exec.getCurrentStatus().getStates();
+            Set<TransitionTarget> currentStates = exec.getCurrentStatus().getStates();
             assertEquals(1, currentStates.size());
         } catch (Exception e) {
             e.printStackTrace();
@@ -131,7 +130,7 @@
             exec.setStateMachine(scxml);
             exec.registerInvokerClass("scxml", SimpleSCXMLInvoker.class);
             exec.go();
-            Set currentStates = exec.getCurrentStatus().getStates();
+            Set<TransitionTarget> currentStates = exec.getCurrentStatus().getStates();
             assertEquals(1, currentStates.size());
             SCXMLTestHelper.fireEvent(exec, "s1.next");
             SCXMLTestHelper.fireEvent(exec, "state1.next");



Mime
View raw message