Author: rahul Date: Fri Apr 25 18:44:22 2008 New Revision: 651778 URL: http://svn.apache.org/viewvc?rev=651778&view=rev Log: Type safety improvements.
Modified: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/io/SCXMLDigesterTest.java commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/io/StateSrcTest.java Modified: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/io/SCXMLDigesterTest.java URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/io/SCXMLDigesterTest.java?rev=651778&r1=651777&r2=651778&view=diff ============================================================================== --- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/io/SCXMLDigesterTest.java (original) +++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/io/SCXMLDigesterTest.java Fri Apr 25 18:44:22 2008 @@ -25,6 +25,7 @@ import junit.textui.TestRunner; import org.apache.commons.scxml.SCXMLTestHelper; +import org.apache.commons.scxml.model.Action; import org.apache.commons.scxml.model.SCXML; import org.apache.commons.scxml.model.Send; import org.apache.commons.scxml.model.State; @@ -113,10 +114,10 @@ scxml = SCXMLTestHelper.digest(send01); State ten = (State) scxml.getInitialTarget(); assertEquals("ten", ten.getId()); - List ten_done = ten.getTransitionsList("ten.done"); + List<Transition> ten_done = ten.getTransitionsList("ten.done"); assertEquals(1, ten_done.size()); Transition ten2twenty = (Transition) ten_done.get(0); - List actions = ten2twenty.getActions(); + List<Action> actions = ten2twenty.getActions(); assertEquals(1, actions.size()); Send send = (Send) actions.get(0); assertEquals("send1", send.getSendid()); Modified: commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/io/StateSrcTest.java URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/io/StateSrcTest.java?rev=651778&r1=651777&r2=651778&view=diff ============================================================================== --- commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/io/StateSrcTest.java (original) +++ commons/proper/scxml/branches/J6/src/test/java/org/apache/commons/scxml/io/StateSrcTest.java Fri Apr 25 18:44:22 2008 @@ -27,7 +27,7 @@ import org.apache.commons.scxml.SCXMLExecutor; import org.apache.commons.scxml.SCXMLTestHelper; import org.apache.commons.scxml.model.SCXML; -import org.apache.commons.scxml.model.State; +import org.apache.commons.scxml.model.TransitionTarget; /** * Unit tests [EMAIL PROTECTED] org.apache.commons.scxml.SCXMLDigester} * Test white box nature of <state> element "src" attribute. @@ -77,12 +77,12 @@ assertNotNull(scxml); exec = SCXMLTestHelper.getExecutor(scxml); assertNotNull(exec); - Set states = exec.getCurrentStatus().getStates(); + Set<TransitionTarget> states = exec.getCurrentStatus().getStates(); assertEquals(1, states.size()); - assertEquals("srctest3", ((State) states.iterator().next()).getId()); + assertEquals("srctest3", states.iterator().next().getId()); states = SCXMLTestHelper.fireEvent(exec, "src.test"); assertEquals(1, states.size()); - assertEquals("srctest1end", ((State) states.iterator().next()).getId()); + assertEquals("srctest1end", states.iterator().next().getId()); assertTrue(exec.getCurrentStatus().isFinal()); }