You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by wo...@apache.org on 2018/10/08 13:48:21 UTC
[4/7] commons-scxml git commit: SCXML-283 Upgrade to JUnit Jupiter
http://git-wip-us.apache.org/repos/asf/commons-scxml/blob/d1900d37/src/test/java/org/apache/commons/scxml2/model/ScxmlInitialAttributeTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/scxml2/model/ScxmlInitialAttributeTest.java b/src/test/java/org/apache/commons/scxml2/model/ScxmlInitialAttributeTest.java
index 9247c76..9f2d056 100644
--- a/src/test/java/org/apache/commons/scxml2/model/ScxmlInitialAttributeTest.java
+++ b/src/test/java/org/apache/commons/scxml2/model/ScxmlInitialAttributeTest.java
@@ -16,15 +16,15 @@
*/
package org.apache.commons.scxml2.model;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.fail;
import java.io.StringReader;
import org.apache.commons.scxml2.SCXMLExecutor;
import org.apache.commons.scxml2.SCXMLTestHelper;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
public class ScxmlInitialAttributeTest {
@@ -55,9 +55,9 @@ public class ScxmlInitialAttributeTest {
@Test
public void testInitial() throws Exception {
SCXML scxml = SCXMLTestHelper.parse(new StringReader(SCXML_WITH_LEGAL_INITIAL), null);
- assertEquals("The initial state ID reading was wrong.", "s1", scxml.getInitial());
+ assertEquals("s1", scxml.getInitial(), "The initial state ID reading was wrong.");
TransitionTarget tt = scxml.getInitialTransition().getTargets().iterator().next();
- assertEquals("The initial state resolution was wrong.", "s1", tt.getId());
+ assertEquals("s1", tt.getId(), "The initial state resolution was wrong.");
SCXMLExecutor exec = SCXMLTestHelper.getExecutor(scxml);
exec.go();
assertEquals(scxml.getTargets().get("s1"), exec.getStatus().getStates().iterator().next());
@@ -68,7 +68,7 @@ public class ScxmlInitialAttributeTest {
SCXML scxml = SCXMLTestHelper.parse(new StringReader(SCXML_WITH_NO_INITIAL), null);
assertNull(scxml.getInitial());
TransitionTarget tt = scxml.getInitialTransition().getTargets().iterator().next();
- assertEquals("The initial state resolution was wrong.", "s1", tt.getId());
+ assertEquals("s1", tt.getId(), "The initial state resolution was wrong.");
SCXMLExecutor exec = SCXMLTestHelper.getExecutor(scxml);
exec.go();
assertEquals(scxml.getTargets().get("s1"), exec.getStatus().getStates().iterator().next());
http://git-wip-us.apache.org/repos/asf/commons-scxml/blob/d1900d37/src/test/java/org/apache/commons/scxml2/model/SendTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/scxml2/model/SendTest.java b/src/test/java/org/apache/commons/scxml2/model/SendTest.java
index 2dbab93..78c7632 100644
--- a/src/test/java/org/apache/commons/scxml2/model/SendTest.java
+++ b/src/test/java/org/apache/commons/scxml2/model/SendTest.java
@@ -28,8 +28,8 @@ import org.apache.commons.scxml2.SCXMLTestHelper;
import org.apache.commons.scxml2.TriggerEvent;
import org.apache.commons.scxml2.EventBuilder;
import org.apache.commons.scxml2.env.SimpleDispatcher;
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
public class SendTest {
@@ -50,19 +50,19 @@ public class SendTest {
TriggerEvent te = new EventBuilder("event.foo", TriggerEvent.SIGNAL_EVENT).data(3).build();
SCXMLTestHelper.fireEvent(exec, te);
- Assert.assertFalse("Payloads empty.", payloads.isEmpty());
- Assert.assertTrue("Payload is not a map.", payloads.get(0) instanceof Map);
+ Assertions.assertFalse(payloads.isEmpty(), "Payloads empty.");
+ Assertions.assertTrue(payloads.get(0) instanceof Map, "Payload is not a map.");
Map<String, Object> firstPayload = (Map<String, Object>) payloads.get(0);
- Assert.assertEquals("Only two in the namelist data expected.", 2, firstPayload.size());
+ Assertions.assertEquals(2, firstPayload.size(), "Only two in the namelist data expected.");
- Assert.assertEquals("Unexpected value for 'one'.", 1, firstPayload.get("one"));
- Assert.assertEquals("Unexpected value for 'two'.", 2, firstPayload.get("two"));
+ Assertions.assertEquals(1, firstPayload.get("one"), "Unexpected value for 'one'.");
+ Assertions.assertEquals(2, firstPayload.get("two"), "Unexpected value for 'two'.");
// Note: the standard allows specifying the value of the namelist attribute of the <send> element
// as space-separated list of values, which implies an ordered sequence of items.
final Iterator<String> it = firstPayload.keySet().iterator();
- Assert.assertEquals("The first one in the namelist must be 'one'.", "one", it.next());
- Assert.assertEquals("The first one in the namelist must be 'two'.", "two", it.next());
+ Assertions.assertEquals("one", it.next(), "The first one in the namelist must be 'one'.");
+ Assertions.assertEquals("two", it.next(), "The first one in the namelist must be 'two'.");
}
private long parseDelay(String delayString) throws SCXMLExpressionException {
@@ -71,23 +71,23 @@ public class SendTest {
@Test
public void testDelayExpression() throws Exception {
- Assert.assertEquals(0L, parseDelay(".s"));
- Assert.assertEquals(0L, parseDelay(".0s"));
- Assert.assertEquals(1000L, parseDelay("1.s"));
- Assert.assertEquals(1000L, parseDelay("1.0s"));
- Assert.assertEquals(1500L, parseDelay("1.5s"));
- Assert.assertEquals(500L, parseDelay(".5s"));
- Assert.assertEquals(500L, parseDelay("0.5s"));
- Assert.assertEquals(50L, parseDelay("0.05s"));
- Assert.assertEquals(5L, parseDelay("0.005s"));
- Assert.assertEquals(0L, parseDelay("0.0005s"));
- Assert.assertEquals(0L, parseDelay(".9ms"));
- Assert.assertEquals(1L, parseDelay("1.9ms"));
- Assert.assertEquals(60000L, parseDelay("1m"));
- Assert.assertEquals(60000L, parseDelay("1.0m"));
- Assert.assertEquals(30000L, parseDelay(".5m"));
- Assert.assertEquals(6000L, parseDelay(".1m"));
- Assert.assertEquals(6000L, parseDelay(".10m"));
- Assert.assertEquals(15000L, parseDelay(".25m"));
+ Assertions.assertEquals(0L, parseDelay(".s"));
+ Assertions.assertEquals(0L, parseDelay(".0s"));
+ Assertions.assertEquals(1000L, parseDelay("1.s"));
+ Assertions.assertEquals(1000L, parseDelay("1.0s"));
+ Assertions.assertEquals(1500L, parseDelay("1.5s"));
+ Assertions.assertEquals(500L, parseDelay(".5s"));
+ Assertions.assertEquals(500L, parseDelay("0.5s"));
+ Assertions.assertEquals(50L, parseDelay("0.05s"));
+ Assertions.assertEquals(5L, parseDelay("0.005s"));
+ Assertions.assertEquals(0L, parseDelay("0.0005s"));
+ Assertions.assertEquals(0L, parseDelay(".9ms"));
+ Assertions.assertEquals(1L, parseDelay("1.9ms"));
+ Assertions.assertEquals(60000L, parseDelay("1m"));
+ Assertions.assertEquals(60000L, parseDelay("1.0m"));
+ Assertions.assertEquals(30000L, parseDelay(".5m"));
+ Assertions.assertEquals(6000L, parseDelay(".1m"));
+ Assertions.assertEquals(6000L, parseDelay(".10m"));
+ Assertions.assertEquals(15000L, parseDelay(".25m"));
}
}
http://git-wip-us.apache.org/repos/asf/commons-scxml/blob/d1900d37/src/test/java/org/apache/commons/scxml2/model/StateTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/scxml2/model/StateTest.java b/src/test/java/org/apache/commons/scxml2/model/StateTest.java
index 06cf5f9..ac802fa 100644
--- a/src/test/java/org/apache/commons/scxml2/model/StateTest.java
+++ b/src/test/java/org/apache/commons/scxml2/model/StateTest.java
@@ -20,22 +20,22 @@ import java.util.List;
import org.apache.commons.scxml2.SCXMLExecutor;
import org.apache.commons.scxml2.SCXMLTestHelper;
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
public class StateTest {
@Test
public void testGetTransitionsListNull() {
State state = new State();
- Assert.assertNull(state.getTransitionsList("event"));
+ Assertions.assertNull(state.getTransitionsList("event"));
}
@Test
public void testGetTransitionsList() {
State state = new State();
state.getTransitionsList().add(new Transition());
- Assert.assertNotNull(state.getTransitionsList(null));
+ Assertions.assertNotNull(state.getTransitionsList(null));
}
@Test
@@ -48,8 +48,8 @@ public class StateTest {
List<Transition> events = state.getTransitionsList("event");
- Assert.assertEquals(1, events.size());
- Assert.assertEquals("event", events.get(0).getEvent());
+ Assertions.assertEquals(1, events.size());
+ Assertions.assertEquals("event", events.get(0).getEvent());
}
@Test
@@ -66,7 +66,7 @@ public class StateTest {
List<Transition> events = state.getTransitionsList("event");
- Assert.assertEquals(2, events.size());
+ Assertions.assertEquals(2, events.size());
}
@Test
@@ -83,13 +83,13 @@ public class StateTest {
List<Transition> events = state.getTransitionsList();
- Assert.assertEquals(2, events.size());
+ Assertions.assertEquals(2, events.size());
}
@Test
public void testHasHistoryEmpty() {
State state = new State();
- Assert.assertFalse(state.hasHistory());
+ Assertions.assertFalse(state.hasHistory());
}
@Test
@@ -99,13 +99,13 @@ public class StateTest {
State state = new State();
state.addHistory(history);
- Assert.assertTrue(state.hasHistory());
+ Assertions.assertTrue(state.hasHistory());
}
@Test
public void testIsSimple() {
State state = new State();
- Assert.assertTrue(state.isSimple());
+ Assertions.assertTrue(state.isSimple());
}
@Test
@@ -115,13 +115,13 @@ public class StateTest {
State state = new State();
state.addChild(state1);
- Assert.assertFalse(state.isSimple());
+ Assertions.assertFalse(state.isSimple());
}
@Test
public void testIsCompositeFalse() {
State state = new State();
- Assert.assertFalse(state.isComposite());
+ Assertions.assertFalse(state.isComposite());
}
@Test
@@ -131,7 +131,7 @@ public class StateTest {
State state = new State();
state.addChild(child);
- Assert.assertTrue(state.isComposite());
+ Assertions.assertTrue(state.isComposite());
}
@Test
@@ -141,7 +141,7 @@ public class StateTest {
State state = new State();
state.addChild(state1);
- Assert.assertTrue(state.isComposite());
+ Assertions.assertTrue(state.isComposite());
}
@Test
@@ -149,7 +149,7 @@ public class StateTest {
State state = new State();
state.setParent(new Parallel());
- Assert.assertTrue(state.isRegion());
+ Assertions.assertTrue(state.isRegion());
}
@Test
@@ -157,13 +157,13 @@ public class StateTest {
State state = new State();
state.setParent(new State());
- Assert.assertFalse(state.isRegion());
+ Assertions.assertFalse(state.isRegion());
}
@Test
public void testInitialAttribute() throws Exception {
SCXMLExecutor exec = SCXMLTestHelper.getExecutor("org/apache/commons/scxml2/model/state-01.xml");
exec.go();
- Assert.assertEquals("s11", exec.getStatus().getStates().iterator().next().getId());
+ Assertions.assertEquals("s11", exec.getStatus().getStates().iterator().next().getId());
}
}
http://git-wip-us.apache.org/repos/asf/commons-scxml/blob/d1900d37/src/test/java/org/apache/commons/scxml2/model/StatelessModelTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/scxml2/model/StatelessModelTest.java b/src/test/java/org/apache/commons/scxml2/model/StatelessModelTest.java
index 3f6b529..7f86707 100644
--- a/src/test/java/org/apache/commons/scxml2/model/StatelessModelTest.java
+++ b/src/test/java/org/apache/commons/scxml2/model/StatelessModelTest.java
@@ -23,8 +23,8 @@ import org.apache.commons.scxml2.SCXMLExecutor;
import org.apache.commons.scxml2.SCXMLTestHelper;
import org.apache.commons.scxml2.TriggerEvent;
import org.apache.commons.scxml2.EventBuilder;
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
/**
* Unit tests {@link org.apache.commons.scxml2.SCXMLExecutor}.
*/
@@ -41,7 +41,7 @@ public class StatelessModelTest {
exec01.go();
SCXMLExecutor exec02 = SCXMLTestHelper.getExecutor(scxml);
exec02.go();
- Assert.assertFalse(exec01 == exec02);
+ Assertions.assertFalse(exec01 == exec02);
runSimultaneousTest(exec01, exec02);
}
@@ -69,7 +69,7 @@ public class StatelessModelTest {
exec01.go();
SCXMLExecutor exec02 = SCXMLTestHelper.getExecutor(scxml01par);
exec02.go();
- Assert.assertFalse(exec01 == exec02);
+ Assertions.assertFalse(exec01 == exec02);
Set<EnterableState> currentStates = exec01.getStatus().getStates();
checkParallelStates(currentStates, "state1.init", "state2.init", "exec01");
@@ -99,7 +99,7 @@ public class StatelessModelTest {
SCXML scxml02par = SCXMLTestHelper.parse("org/apache/commons/scxml2/model/stateless-parallel-01.xml");
SCXMLExecutor exec01 = SCXMLTestHelper.getExecutor(scxml01par);
exec01.go();
- Assert.assertTrue(scxml01par != scxml02par);
+ Assertions.assertTrue(scxml01par != scxml02par);
Set<EnterableState> currentStates = exec01.getStatus().getStates();
checkParallelStates(currentStates, "state1.init", "state2.init", "exec01");
@@ -116,22 +116,22 @@ public class StatelessModelTest {
private void checkParallelStates(Set<EnterableState> currentStates,
String s1, String s2, String label) {
Iterator<EnterableState> i = currentStates.iterator();
- Assert.assertTrue("Not enough states", i.hasNext());
+ Assertions.assertTrue(i.hasNext(), "Not enough states");
String cs1 = i.next().getId();
String cs2;
if (s2 != null) {
- Assert.assertTrue("Not enough states, found one state: " + cs1, i.hasNext());
+ Assertions.assertTrue(i.hasNext(), "Not enough states, found one state: " + cs1);
cs2 = i.next().getId();
- Assert.assertFalse("Too many states", i.hasNext());
+ Assertions.assertFalse(i.hasNext(), "Too many states");
if (s2.equals(cs2)) {
cs2 = null;
} else if (s1.equals(cs2)) {
cs2 = null;
} else {
- Assert.fail(label + " in unexpected state " + cs2);
+ Assertions.fail(label + " in unexpected state " + cs2);
}
} else {
- Assert.assertFalse("Too many states", i.hasNext());
+ Assertions.assertFalse(i.hasNext(), "Too many states");
}
if (s1 != null && s1.equals(cs1)) {
return;
@@ -139,47 +139,47 @@ public class StatelessModelTest {
if (s2 != null && s2.equals(cs1)) {
return;
}
- Assert.fail(label + " in unexpected state " + cs1);
+ Assertions.fail(label + " in unexpected state " + cs1);
}
private void runSimultaneousTest(SCXMLExecutor exec01, SCXMLExecutor exec02) throws Exception {
//// Interleaved
// exec01
Set<EnterableState> currentStates = exec01.getStatus().getStates();
- Assert.assertEquals(1, currentStates.size());
- Assert.assertEquals("ten", currentStates.iterator().next().getId());
+ Assertions.assertEquals(1, currentStates.size());
+ Assertions.assertEquals("ten", currentStates.iterator().next().getId());
currentStates = fireEvent("done.state.ten", exec01);
- Assert.assertEquals(1, currentStates.size());
- Assert.assertEquals("twenty", currentStates.iterator().next().getId());
+ Assertions.assertEquals(1, currentStates.size());
+ Assertions.assertEquals("twenty", currentStates.iterator().next().getId());
// exec02
currentStates = exec02.getStatus().getStates();
- Assert.assertEquals(1, currentStates.size());
- Assert.assertEquals("ten", currentStates.iterator().next().getId());
+ Assertions.assertEquals(1, currentStates.size());
+ Assertions.assertEquals("ten", currentStates.iterator().next().getId());
// exec01
currentStates = fireEvent("done.state.twenty", exec01);
- Assert.assertEquals(1, currentStates.size());
- Assert.assertEquals("thirty", currentStates.iterator().next().getId());
+ Assertions.assertEquals(1, currentStates.size());
+ Assertions.assertEquals("thirty", currentStates.iterator().next().getId());
// exec02
currentStates = fireEvent("done.state.ten", exec02);
- Assert.assertEquals(1, currentStates.size());
- Assert.assertEquals("twenty", currentStates.iterator().next().getId());
+ Assertions.assertEquals(1, currentStates.size());
+ Assertions.assertEquals("twenty", currentStates.iterator().next().getId());
currentStates = fireEvent("done.state.twenty", exec02);
- Assert.assertEquals(1, currentStates.size());
- Assert.assertEquals("thirty", currentStates.iterator().next().getId());
+ Assertions.assertEquals(1, currentStates.size());
+ Assertions.assertEquals("thirty", currentStates.iterator().next().getId());
}
private void runSequentialTest(SCXMLExecutor exec) throws Exception {
Set<EnterableState> currentStates = exec.getStatus().getStates();
- Assert.assertEquals(1, currentStates.size());
- Assert.assertEquals("ten", (currentStates.iterator().
+ Assertions.assertEquals(1, currentStates.size());
+ Assertions.assertEquals("ten", (currentStates.iterator().
next()).getId());
currentStates = fireEvent("done.state.ten", exec);
- Assert.assertEquals(1, currentStates.size());
- Assert.assertEquals("twenty", (currentStates.iterator().
+ Assertions.assertEquals(1, currentStates.size());
+ Assertions.assertEquals("twenty", (currentStates.iterator().
next()).getId());
currentStates = fireEvent("done.state.twenty", exec);
- Assert.assertEquals(1, currentStates.size());
- Assert.assertEquals("thirty", (currentStates.iterator().
+ Assertions.assertEquals(1, currentStates.size());
+ Assertions.assertEquals("thirty", (currentStates.iterator().
next()).getId());
}
http://git-wip-us.apache.org/repos/asf/commons-scxml/blob/d1900d37/src/test/java/org/apache/commons/scxml2/model/TransitionTargetTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/scxml2/model/TransitionTargetTest.java b/src/test/java/org/apache/commons/scxml2/model/TransitionTargetTest.java
index fae1c22..e9619e7 100644
--- a/src/test/java/org/apache/commons/scxml2/model/TransitionTargetTest.java
+++ b/src/test/java/org/apache/commons/scxml2/model/TransitionTargetTest.java
@@ -16,8 +16,8 @@
*/
package org.apache.commons.scxml2.model;
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
public class TransitionTargetTest {
@@ -26,7 +26,7 @@ public class TransitionTargetTest {
State state = new State();
State context = new State();
- Assert.assertFalse(state.isDescendantOf(context));
+ Assertions.assertFalse(state.isDescendantOf(context));
}
@Test
@@ -35,7 +35,7 @@ public class TransitionTargetTest {
state.setParent(new State());
State context = new State();
- Assert.assertFalse(state.isDescendantOf(context));
+ Assertions.assertFalse(state.isDescendantOf(context));
}
@Test
@@ -44,7 +44,7 @@ public class TransitionTargetTest {
State context = new State();
state.setParent(context);
- Assert.assertTrue(state.isDescendantOf(context));
+ Assertions.assertTrue(state.isDescendantOf(context));
}
@Test
@@ -56,6 +56,6 @@ public class TransitionTargetTest {
parent.setParent(context);
state.setParent(parent);
- Assert.assertTrue(state.isDescendantOf(context));
+ Assertions.assertTrue(state.isDescendantOf(context));
}
}
http://git-wip-us.apache.org/repos/asf/commons-scxml/blob/d1900d37/src/test/java/org/apache/commons/scxml2/model/TransitionTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/scxml2/model/TransitionTest.java b/src/test/java/org/apache/commons/scxml2/model/TransitionTest.java
index 393d07d..d7cebe3 100644
--- a/src/test/java/org/apache/commons/scxml2/model/TransitionTest.java
+++ b/src/test/java/org/apache/commons/scxml2/model/TransitionTest.java
@@ -16,29 +16,29 @@
*/
package org.apache.commons.scxml2.model;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
public class TransitionTest {
private Transition transition;
- @Before
+ @BeforeEach
public void setUp() {
transition = new Transition();
}
@Test
public void testGetTargets() {
- Assert.assertEquals(0, transition.getTargets().size());
+ Assertions.assertEquals(0, transition.getTargets().size());
State state = new State();
state.setId("1");
transition.getTargets().add(state);
- Assert.assertEquals(1, transition.getTargets().size());
- Assert.assertEquals("1", transition.getTargets().iterator().next().getId());
+ Assertions.assertEquals(1, transition.getTargets().size());
+ Assertions.assertEquals("1", transition.getTargets().iterator().next().getId());
}
}
http://git-wip-us.apache.org/repos/asf/commons-scxml/blob/d1900d37/src/test/java/org/apache/commons/scxml2/semantics/SCXMLSemanticsImplTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/scxml2/semantics/SCXMLSemanticsImplTest.java b/src/test/java/org/apache/commons/scxml2/semantics/SCXMLSemanticsImplTest.java
index b3e0dd4..7a90ac9 100644
--- a/src/test/java/org/apache/commons/scxml2/semantics/SCXMLSemanticsImplTest.java
+++ b/src/test/java/org/apache/commons/scxml2/semantics/SCXMLSemanticsImplTest.java
@@ -24,8 +24,8 @@ import org.apache.commons.scxml2.env.SimpleErrorReporter;
import org.apache.commons.scxml2.model.EnterableState;
import org.apache.commons.scxml2.model.Parallel;
import org.apache.commons.scxml2.model.State;
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
public class SCXMLSemanticsImplTest {
@@ -33,7 +33,7 @@ public class SCXMLSemanticsImplTest {
public void testIsLegalConfigNoStates() {
Set<EnterableState> states = new HashSet<>();
- Assert.assertTrue(new SCXMLSemanticsImpl().isLegalConfiguration(states, new SimpleErrorReporter()));
+ Assertions.assertTrue(new SCXMLSemanticsImpl().isLegalConfiguration(states, new SimpleErrorReporter()));
}
@Test
@@ -58,9 +58,9 @@ public class SCXMLSemanticsImplTest {
MockErrorReporter errorReporter = new MockErrorReporter();
- Assert.assertFalse(new SCXMLSemanticsImpl().isLegalConfiguration(states, errorReporter));
- Assert.assertEquals(ErrorConstants.ILLEGAL_CONFIG, errorReporter.getErrCode());
- Assert.assertEquals("Not all AND states active for parallel 4", errorReporter.getErrDetail());
+ Assertions.assertFalse(new SCXMLSemanticsImpl().isLegalConfiguration(states, errorReporter));
+ Assertions.assertEquals(ErrorConstants.ILLEGAL_CONFIG, errorReporter.getErrCode());
+ Assertions.assertEquals("Not all AND states active for parallel 4", errorReporter.getErrDetail());
}
@Test
@@ -77,9 +77,9 @@ public class SCXMLSemanticsImplTest {
MockErrorReporter errorReporter = new MockErrorReporter();
- Assert.assertFalse(new SCXMLSemanticsImpl().isLegalConfiguration(states, errorReporter));
- Assert.assertEquals(ErrorConstants.ILLEGAL_CONFIG, errorReporter.getErrCode());
- Assert.assertEquals("Multiple top-level OR states active!", errorReporter.getErrDetail());
+ Assertions.assertFalse(new SCXMLSemanticsImpl().isLegalConfiguration(states, errorReporter));
+ Assertions.assertEquals(ErrorConstants.ILLEGAL_CONFIG, errorReporter.getErrCode());
+ Assertions.assertEquals("Multiple top-level OR states active!", errorReporter.getErrDetail());
}
@Test
@@ -103,8 +103,8 @@ public class SCXMLSemanticsImplTest {
MockErrorReporter errorReporter = new MockErrorReporter();
- Assert.assertFalse(new SCXMLSemanticsImpl().isLegalConfiguration(states, errorReporter));
- Assert.assertEquals(ErrorConstants.ILLEGAL_CONFIG, errorReporter.getErrCode());
- Assert.assertEquals("Multiple OR states active for state parentid", errorReporter.getErrDetail());
+ Assertions.assertFalse(new SCXMLSemanticsImpl().isLegalConfiguration(states, errorReporter));
+ Assertions.assertEquals(ErrorConstants.ILLEGAL_CONFIG, errorReporter.getErrCode());
+ Assertions.assertEquals("Multiple OR states active for state parentid", errorReporter.getErrDetail());
}
}