commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject svn commit: r1532637 [2/4] - in /commons/proper/scxml/trunk: ./ src/test/java/org/apache/commons/scxml2/ src/test/java/org/apache/commons/scxml2/env/ src/test/java/org/apache/commons/scxml2/env/faces/ src/test/java/org/apache/commons/scxml2/env/javascr...
Date Wed, 16 Oct 2013 03:46:59 GMT
Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/SimpleContextTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/SimpleContextTest.java?rev=1532637&r1=1532636&r2=1532637&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/SimpleContextTest.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/SimpleContextTest.java Wed Oct 16 03:46:58 2013
@@ -19,39 +19,40 @@ package org.apache.commons.scxml2.env;
 import java.util.HashMap;
 import java.util.Map;
 
-import junit.framework.TestCase;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
-public class SimpleContextTest extends TestCase {
-
-    public SimpleContextTest(String testName) {
-        super(testName);
-    }
+public class SimpleContextTest {
 
     private SimpleContext context;
 
-    @Override
-    protected void setUp() throws Exception {
+    @Before
+    public void setUp() throws Exception {
         context = new SimpleContext();
     }
     
+    @Test
     public void testHasTrue() {
         Map<String, Object> vars = new HashMap<String, Object>();
         vars.put("key", "value");
         
         context.setVars(vars);
         
-        assertTrue(context.has("key"));
+        Assert.assertTrue(context.has("key"));
     }
 
+    @Test
     public void testHasNullParent() {
         Map<String, Object> vars = new HashMap<String, Object>();
         vars.put("key", "value");
         
         context.setVars(vars);
         
-        assertFalse(context.has("differentKey"));
+        Assert.assertFalse(context.has("differentKey"));
     }
     
+    @Test
     public void testHasParentWrongKey() {
         Map<String, Object> parentVars = new HashMap<String, Object>();
         parentVars.put("key", "value");
@@ -64,9 +65,10 @@ public class SimpleContextTest extends T
         context.setVars(vars);
         context = new SimpleContext(parentContext, parentVars);
         
-        assertFalse(context.has("differentKey"));
+        Assert.assertFalse(context.has("differentKey"));
     }
 
+    @Test
     public void testHasParentCorrectKey() {
         Map<String, Object> parentVars = new HashMap<String, Object>();
         parentVars.put("differentKey", "value");
@@ -79,24 +81,27 @@ public class SimpleContextTest extends T
         context.setVars(vars);
         context = new SimpleContext(parentContext, parentVars);
         
-        assertTrue(context.has("differentKey"));
+        Assert.assertTrue(context.has("differentKey"));
     }
     
+    @Test
     public void testGetNull() {
         Object value = context.get("key");
         
-        assertNull(value);
+        Assert.assertNull(value);
     }
     
+    @Test
     public void testGetValue() {
         Map<String, Object> vars = new HashMap<String, Object>();
         vars.put("key", "value");
         
         context.setVars(vars);
         
-        assertEquals("value", context.get("key"));
+        Assert.assertEquals("value", context.get("key"));
     }
     
+    @Test
     public void testGetParentValue() {
         Map<String, Object> parentVars = new HashMap<String, Object>();
         parentVars.put("differentKey", "differentValue");
@@ -109,18 +114,20 @@ public class SimpleContextTest extends T
         context.setVars(vars);
         context = new SimpleContext(parentContext, parentVars);
         
-        assertEquals("differentValue", context.get("differentKey"));
+        Assert.assertEquals("differentValue", context.get("differentKey"));
     }
     
+    @Test
     public void testGetParentNull() {
         Map<String, Object> vars = new HashMap<String, Object>();
         vars.put("key", "value");
         
         context.setVars(vars);
         
-        assertNull(context.get("differentKey"));
+        Assert.assertNull(context.get("differentKey"));
     }
     
+    @Test
     public void testGetParentWrongValue() {
         Map<String, Object> parentVars = new HashMap<String, Object>();
         parentVars.put("differentKey", "differentValue");
@@ -133,9 +140,10 @@ public class SimpleContextTest extends T
         context.setVars(vars);
         context = new SimpleContext(parentContext, parentVars);
         
-        assertNull(context.get("reallyDifferentKey"));
+        Assert.assertNull(context.get("reallyDifferentKey"));
     }
 
+    @Test
     public void testSetVarsChangeValue() {
         Map<String, Object> vars = new HashMap<String, Object>();
         vars.put("key", "value");
@@ -144,18 +152,20 @@ public class SimpleContextTest extends T
         
         context.set("key", "newValue");
         
-        assertEquals("newValue", context.get("key"));
+        Assert.assertEquals("newValue", context.get("key"));
     }
 
+    @Test
     public void testSetVarsEmpty() {
         Map<String, Object> vars = new HashMap<String, Object>();
         context.setVars(vars);
         
         context.set("key", "newValue");
         
-        assertEquals("newValue", context.get("key"));
+        Assert.assertEquals("newValue", context.get("key"));
     }
     
+    @Test
     public void testSetVarsParent() {
         Map<String, Object> parentVars = new HashMap<String, Object>();
         parentVars.put("differentKey", "differentValue");
@@ -170,6 +180,6 @@ public class SimpleContextTest extends T
         
         context.set("differentKey", "newValue");
         
-        assertEquals("newValue", context.get("differentKey"));
+        Assert.assertEquals("newValue", context.get("differentKey"));
     }
 }

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/StopWatchTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/StopWatchTest.java?rev=1532637&r1=1532636&r2=1532637&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/StopWatchTest.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/StopWatchTest.java Wed Oct 16 03:46:58 2013
@@ -16,21 +16,19 @@
  */
 package org.apache.commons.scxml2.env;
 
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
-import junit.framework.TestCase;
-
-public class StopWatchTest extends TestCase {
-
-    public StopWatchTest(String testName) {
-        super(testName);
-    }
+public class StopWatchTest {
 
     private StopWatch stopWatch;
 
     /**
      * Set up instance variables required by this test case.
      */
-    @Override
+    @Before
     public void setUp() {
         stopWatch = new StopWatch();
     }
@@ -38,23 +36,24 @@ public class StopWatchTest extends TestC
     /**
      * Tear down instance variables required by this test case.
      */
-    @Override
+    @After
     public void tearDown() {
         stopWatch = null;
     }
 
+    @Test
     public void testStopWatch() {
-        assertEquals("reset", stopWatch.getCurrentState());
+        Assert.assertEquals("reset", stopWatch.getCurrentState());
         stopWatch.fireEvent(StopWatch.EVENT_START);
-        assertEquals("running", stopWatch.getCurrentState());
+        Assert.assertEquals("running", stopWatch.getCurrentState());
         stopWatch.fireEvent(StopWatch.EVENT_SPLIT);
-        assertEquals("paused", stopWatch.getCurrentState());
+        Assert.assertEquals("paused", stopWatch.getCurrentState());
         stopWatch.fireEvent(StopWatch.EVENT_UNSPLIT);
-        assertEquals("running", stopWatch.getCurrentState());
+        Assert.assertEquals("running", stopWatch.getCurrentState());
         stopWatch.fireEvent(StopWatch.EVENT_STOP);
-        assertEquals("stopped", stopWatch.getCurrentState());
+        Assert.assertEquals("stopped", stopWatch.getCurrentState());
         stopWatch.fireEvent(StopWatch.EVENT_RESET);
-        assertEquals("reset", stopWatch.getCurrentState());
+        Assert.assertEquals("reset", stopWatch.getCurrentState());
     }
 
 }

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/faces/SessionContextTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/faces/SessionContextTest.java?rev=1532637&r1=1532636&r2=1532637&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/faces/SessionContextTest.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/faces/SessionContextTest.java Wed Oct 16 03:46:58 2013
@@ -16,18 +16,16 @@
  */
 package org.apache.commons.scxml2.env.faces;
 
-import junit.framework.TestCase;
+import org.junit.Assert;
+import org.junit.Test;
 
-public class SessionContextTest extends TestCase {
-
-    public SessionContextTest(String testName) {
-        super(testName);
-    }
+public class SessionContextTest {
 
+    @Test
     public void testIllegalInstance() {
     	try {
             new SessionContext(null);
-            fail("SessionContext successfully instantiated with"
+            Assert.fail("SessionContext successfully instantiated with"
                 + " null FacesContext");
     	} catch (IllegalArgumentException iae) {
     		// expected, ignore

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/javascript/JSBindingsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/javascript/JSBindingsTest.java?rev=1532637&r1=1532636&r2=1532637&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/javascript/JSBindingsTest.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/javascript/JSBindingsTest.java Wed Oct 16 03:46:58 2013
@@ -21,13 +21,14 @@ import java.util.AbstractMap;
 import java.util.HashMap;
 import java.util.Map;
 
+import org.apache.commons.scxml2.Context;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
 import javax.script.Bindings;
 import javax.script.SimpleBindings;
 
-import junit.framework.TestCase;
-
-import org.apache.commons.scxml2.Context;
-
 /**
  * JUnit 3 test case for the JSBinding implementation that imports
  * SCXML context variables into a JavaScript bindings. Includes tests
@@ -36,7 +37,7 @@ import org.apache.commons.scxml2.Context
  * <li> constructor
  * </ul>
  */
-public class JSBindingsTest extends TestCase {
+public class JSBindingsTest {
     // TEST CONSTANTS
 
     private static final Map.Entry<String,Object> KOALA   = new AbstractMap.SimpleEntry<String,Object>("bear","koala");
@@ -51,8 +52,8 @@ public class JSBindingsTest extends Test
     /**
      * Creates and initializes an SCXML data model in the context.
      */
-    @Override
-    protected void setUp() throws Exception {
+    @Before
+    public void setUp() throws Exception {
     }
 
     // CLASS METHODS
@@ -65,31 +66,24 @@ public class JSBindingsTest extends Test
         junit.textui.TestRunner.main(testCaseName);
     }
 
-    // CONSTRUCTORS
-
-    /**
-     * Initializes the test case with a name.
-     */
-    public JSBindingsTest(String testName) {
-        super(testName);
-    }
-
     // INSTANCE METHOD TESTS
 
     /**
      * Tests implementation of JSBindings constructor.
-     */
+     */    
+    @Test
     public void testConstructor() {
-        assertNotNull(new JSBindings(new JSContext(),new SimpleBindings()));
+        Assert.assertNotNull(new JSBindings(new JSContext(),new SimpleBindings()));
     }
 
     /**
      * Test implementation of JSBindings constructor with invalid SCXML context.
-     */
+     */    
+    @Test
     public void testInvalidContextConstructor() {
         try {
-             assertNotNull(new JSBindings(null,new SimpleBindings()));
-             fail("JSBindings constructor accepted invalid SCXML context");
+             Assert.assertNotNull(new JSBindings(null,new SimpleBindings()));
+             Assert.fail("JSBindings constructor accepted invalid SCXML context");
 
         } catch (IllegalArgumentException x) {
              // expected, ignore
@@ -98,11 +92,12 @@ public class JSBindingsTest extends Test
 
     /**
      * Test implementation of JSBindings constructor with invalid Javascript bindings.
-     */
+     */    
+    @Test
     public void testInvalidBindingsConstructor() {
         try {
-             assertNotNull(new JSBindings(new JSContext(),null));
-             fail("JSBindings constructor accepted invalid Javascript bindings");
+             Assert.assertNotNull(new JSBindings(new JSContext(),null));
+             Assert.fail("JSBindings constructor accepted invalid Javascript bindings");
 
         } catch (IllegalArgumentException x) {
              // expected, ignore
@@ -113,71 +108,73 @@ public class JSBindingsTest extends Test
      * Tests the <code>containsKey</code> method with items in the SCXML context as well as the
      * JavaScript Bindings.
      *
-     */
+     */    
+    @Test
     public void testContainsKey() {
         Context    context  = new JSContext     ();
         Bindings   bindings = new SimpleBindings();
         JSBindings jsx      = new JSBindings    (context,bindings);
 
-        assertFalse("Invalid SCXML context",      context.has         ("bear"));
-        assertFalse("Invalid Javascript bindings",bindings.containsKey("bear"));
-        assertFalse("Invalid JSbindings",         jsx.containsKey     ("bear"));
+        Assert.assertFalse("Invalid SCXML context",      context.has         ("bear"));
+        Assert.assertFalse("Invalid Javascript bindings",bindings.containsKey("bear"));
+        Assert.assertFalse("Invalid JSbindings",         jsx.containsKey     ("bear"));
 
         context.set("bear","koala");
-        assertTrue ("Invalid SCXML context",      context.has         ("bear"));
-        assertFalse("Invalid Javascript bindings",bindings.containsKey("bear"));
-        assertTrue ("Invalid JSbindings",         jsx.containsKey     ("bear"));
+        Assert.assertTrue ("Invalid SCXML context",      context.has         ("bear"));
+        Assert.assertFalse("Invalid Javascript bindings",bindings.containsKey("bear"));
+        Assert.assertTrue ("Invalid JSbindings",         jsx.containsKey     ("bear"));
 
         context.reset();
         bindings.put ("bear","grizzly");
-        assertFalse  ("Invalid SCXML context",      context.has         ("bear"));
-        assertTrue   ("Invalid Javascript bindings",bindings.containsKey("bear"));
-        assertTrue   ("Invalid JSbindings",         jsx.containsKey     ("bear"));
+        Assert.assertFalse  ("Invalid SCXML context",      context.has         ("bear"));
+        Assert.assertTrue   ("Invalid Javascript bindings",bindings.containsKey("bear"));
+        Assert.assertTrue   ("Invalid JSbindings",         jsx.containsKey     ("bear"));
 
         context.set ("bear","koala");
         bindings.put("bear","grizzly");
-        assertTrue  ("Invalid SCXML context",      context.has         ("bear"));
-        assertTrue  ("Invalid Javascript bindings",bindings.containsKey("bear"));
-        assertTrue  ("Invalid JSbindings",         jsx.containsKey     ("bear"));
+        Assert.assertTrue  ("Invalid SCXML context",      context.has         ("bear"));
+        Assert.assertTrue  ("Invalid Javascript bindings",bindings.containsKey("bear"));
+        Assert.assertTrue  ("Invalid JSbindings",         jsx.containsKey     ("bear"));
     }
 
     /**
      * Tests the <code>keySet</code> method with items in the SCXML context as well as the
      * JavaScript Bindings.
      *
-     */
+     */    
+    @Test
     public void testKeySet() {
         Context    context  = new JSContext     ();
         Bindings   bindings = new SimpleBindings();
         JSBindings jsx      = new JSBindings    (context,bindings);
 
-        assertFalse ("Invalid SCXML context",      context.has          ("bear"));
-        assertFalse ("Invalid Javascript bindings",bindings.containsKey ("bear"));
-        assertFalse ("Invalid JSbindings",         jsx.keySet().contains("bear"));
+        Assert.assertFalse ("Invalid SCXML context",      context.has          ("bear"));
+        Assert.assertFalse ("Invalid Javascript bindings",bindings.containsKey ("bear"));
+        Assert.assertFalse ("Invalid JSbindings",         jsx.keySet().contains("bear"));
 
         context.set   ("bear","koala");
         bindings.clear();
-        assertTrue    ("Invalid SCXML context",      context.has          ("bear"));
-        assertFalse   ("Invalid Javascript bindings",bindings.containsKey ("bear"));
-        assertTrue    ("Invalid JSbindings",         jsx.keySet().contains("bear"));
+        Assert.assertTrue    ("Invalid SCXML context",      context.has          ("bear"));
+        Assert.assertFalse   ("Invalid Javascript bindings",bindings.containsKey ("bear"));
+        Assert.assertTrue    ("Invalid JSbindings",         jsx.keySet().contains("bear"));
 
         context.reset ();
         bindings.clear();
         bindings.put  ("bear","grizzly");
-        assertFalse   ("Invalid SCXML context",      context.has          ("bear"));
-        assertTrue    ("Invalid Javascript bindings",bindings.containsKey ("bear"));
-        assertTrue    ("Invalid JSbindings",         jsx.keySet().contains("bear"));
+        Assert.assertFalse   ("Invalid SCXML context",      context.has          ("bear"));
+        Assert.assertTrue    ("Invalid Javascript bindings",bindings.containsKey ("bear"));
+        Assert.assertTrue    ("Invalid JSbindings",         jsx.keySet().contains("bear"));
 
         context.reset ();
         bindings.clear();
         context.set  ("cat","felix");
         bindings.put ("dog","rover");
-        assertFalse  ("Invalid SCXML context",      context.has          ("bear"));
-        assertFalse  ("Invalid Javascript bindings",bindings.containsKey ("bear"));
-        assertTrue   ("Invalid SCXML context",      context.has          ("cat"));
-        assertTrue   ("Invalid Javascript bindings",bindings.containsKey ("dog"));
-        assertTrue   ("Invalid JSbindings",         jsx.keySet().contains("cat"));
-        assertTrue   ("Invalid JSbindings",         jsx.keySet().contains("dog"));
+        Assert.assertFalse  ("Invalid SCXML context",      context.has          ("bear"));
+        Assert.assertFalse  ("Invalid Javascript bindings",bindings.containsKey ("bear"));
+        Assert.assertTrue   ("Invalid SCXML context",      context.has          ("cat"));
+        Assert.assertTrue   ("Invalid Javascript bindings",bindings.containsKey ("dog"));
+        Assert.assertTrue   ("Invalid JSbindings",         jsx.keySet().contains("cat"));
+        Assert.assertTrue   ("Invalid JSbindings",         jsx.keySet().contains("dog"));
     }
 
     /**
@@ -185,330 +182,339 @@ public class JSBindingsTest extends Test
      * JavaScript Bindings.
      *
      */
-   public void testSize() {
+   
+    @Test
+    public void testSize() {
        Context    context  = new JSContext     ();
        Bindings   bindings = new SimpleBindings();
        JSBindings jsx      = new JSBindings    (context,bindings);
 
-       assertFalse ("Invalid SCXML context",      context.has          ("bear"));
-       assertFalse ("Invalid Javascript bindings",bindings.containsKey ("bear"));
-       assertEquals("Invalid JSbindings",0,jsx.size());
+       Assert.assertFalse ("Invalid SCXML context",      context.has          ("bear"));
+       Assert.assertFalse ("Invalid Javascript bindings",bindings.containsKey ("bear"));
+       Assert.assertEquals("Invalid JSbindings",0,jsx.size());
 
        context.set   ("bear","koala");
        bindings.clear();
-       assertTrue    ("Invalid SCXML context",      context.has          ("bear"));
-       assertFalse   ("Invalid Javascript bindings",bindings.containsKey ("bear"));
-       assertEquals  ("Invalid JSbindings",1,jsx.size());
+       Assert.assertTrue    ("Invalid SCXML context",      context.has          ("bear"));
+       Assert.assertFalse   ("Invalid Javascript bindings",bindings.containsKey ("bear"));
+       Assert.assertEquals  ("Invalid JSbindings",1,jsx.size());
 
        context.reset ();
        bindings.clear();
        bindings.put  ("bear","grizzly");
-       assertFalse   ("Invalid SCXML context",      context.has          ("bear"));
-       assertTrue    ("Invalid Javascript bindings",bindings.containsKey ("bear"));
-       assertEquals  ("Invalid JSbindings",1,jsx.size());
+       Assert.assertFalse   ("Invalid SCXML context",      context.has          ("bear"));
+       Assert.assertTrue    ("Invalid Javascript bindings",bindings.containsKey ("bear"));
+       Assert.assertEquals  ("Invalid JSbindings",1,jsx.size());
 
        context.reset ();
        bindings.clear();
        context.set   ("bear","koala");
        bindings.put  ("bear","grizzly");
-       assertTrue    ("Invalid SCXML context",      context.has          ("bear"));
-       assertTrue    ("Invalid Javascript bindings",bindings.containsKey ("bear"));
-       assertEquals  ("Invalid JSbindings",1,jsx.size());
+       Assert.assertTrue    ("Invalid SCXML context",      context.has          ("bear"));
+       Assert.assertTrue    ("Invalid Javascript bindings",bindings.containsKey ("bear"));
+       Assert.assertEquals  ("Invalid JSbindings",1,jsx.size());
 
        context.reset ();
        bindings.clear();
        context.set  ("cat","felix");
        bindings.put ("dog","rover");
-       assertFalse  ("Invalid SCXML context",      context.has          ("bear"));
-       assertFalse  ("Invalid Javascript bindings",bindings.containsKey ("bear"));
-       assertTrue   ("Invalid SCXML context",      context.has          ("cat"));
-       assertTrue   ("Invalid Javascript bindings",bindings.containsKey ("dog"));
-       assertEquals ("Invalid JSbindings",2,jsx.size());
+       Assert.assertFalse  ("Invalid SCXML context",      context.has          ("bear"));
+       Assert.assertFalse  ("Invalid Javascript bindings",bindings.containsKey ("bear"));
+       Assert.assertTrue   ("Invalid SCXML context",      context.has          ("cat"));
+       Assert.assertTrue   ("Invalid Javascript bindings",bindings.containsKey ("dog"));
+       Assert.assertEquals ("Invalid JSbindings",2,jsx.size());
     }
 
     /**
      * Tests the <code>containsValue</code> method with items in the SCXML context as well as the
      * JavaScript Bindings.
      *
-     */
+     */    
+    @Test
     public void testContainsValue() {
         Context    context  = new JSContext     ();
         Bindings   bindings = new SimpleBindings();
         JSBindings jsx      = new JSBindings    (context,bindings);
 
-        assertFalse("Invalid SCXML context",      context.getVars().containsValue("koala"));
-        assertFalse("Invalid Javascript bindings",bindings.containsValue("koala"));
-        assertFalse("Invalid JSbindings",         jsx.containsValue     ("koala"));
+        Assert.assertFalse("Invalid SCXML context",      context.getVars().containsValue("koala"));
+        Assert.assertFalse("Invalid Javascript bindings",bindings.containsValue("koala"));
+        Assert.assertFalse("Invalid JSbindings",         jsx.containsValue     ("koala"));
 
         context.reset ();
         bindings.clear();
         context.set   ("bear","koala");
-        assertTrue    ("Invalid SCXML context",      context.getVars().containsValue("koala"));
-        assertFalse   ("Invalid Javascript bindings",bindings.containsValue("koala"));
-        assertTrue    ("Invalid JSbindings",         jsx.containsValue     ("koala"));
+        Assert.assertTrue    ("Invalid SCXML context",      context.getVars().containsValue("koala"));
+        Assert.assertFalse   ("Invalid Javascript bindings",bindings.containsValue("koala"));
+        Assert.assertTrue    ("Invalid JSbindings",         jsx.containsValue     ("koala"));
 
         context.reset ();
         bindings.clear();
         bindings.put  ("bear","grizzly");
-        assertFalse   ("Invalid SCXML context",      context.getVars().containsValue("grizzly"));
-        assertTrue    ("Invalid Javascript bindings",bindings.containsValue("grizzly"));
-        assertTrue    ("Invalid JSbindings",         jsx.containsValue     ("grizzly"));
+        Assert.assertFalse   ("Invalid SCXML context",      context.getVars().containsValue("grizzly"));
+        Assert.assertTrue    ("Invalid Javascript bindings",bindings.containsValue("grizzly"));
+        Assert.assertTrue    ("Invalid JSbindings",         jsx.containsValue     ("grizzly"));
 
         context.reset ();
         bindings.clear();
         context.set   ("bear","koala");
         bindings.put  ("bear","grizzly");
-        assertTrue    ("Invalid SCXML context",      context.getVars().containsValue("koala"));
-        assertTrue    ("Invalid Javascript bindings",bindings.containsValue("grizzly"));
-        assertTrue    ("Invalid JSbindings",         jsx.containsValue     ("koala"));
-        assertTrue    ("Invalid JSbindings",         jsx.containsValue     ("grizzly"));
+        Assert.assertTrue    ("Invalid SCXML context",      context.getVars().containsValue("koala"));
+        Assert.assertTrue    ("Invalid Javascript bindings",bindings.containsValue("grizzly"));
+        Assert.assertTrue    ("Invalid JSbindings",         jsx.containsValue     ("koala"));
+        Assert.assertTrue    ("Invalid JSbindings",         jsx.containsValue     ("grizzly"));
     }
 
     /**
      * Tests the <code>entrySet</code> method with items in the SCXML context as well as the
      * JavaScript Bindings.
      *
-     */
+     */    
+    @Test
     public void testEntrySet() {
         Context    context  = new JSContext     ();
         Bindings   bindings = new SimpleBindings();
         JSBindings jsx      = new JSBindings    (context,bindings);
 
-        assertEquals("Invalid SCXML context",      0,context.getVars().entrySet().size());
-        assertEquals("Invalid Javascript bindings",0,bindings.entrySet().size());
-        assertEquals("Invalid JSbindings",         0,jsx.entrySet().size());
+        Assert.assertEquals("Invalid SCXML context",      0,context.getVars().entrySet().size());
+        Assert.assertEquals("Invalid Javascript bindings",0,bindings.entrySet().size());
+        Assert.assertEquals("Invalid JSbindings",         0,jsx.entrySet().size());
 
         context.reset ();
         bindings.clear();
         context.set   ("bear","koala");
-        assertEquals  ("Invalid SCXML context",      1,context.getVars().entrySet().size());
-        assertTrue    ("Invalid SCXML context",      context.getVars().entrySet().contains(KOALA));
-        assertEquals  ("Invalid Javascript bindings",0,bindings.entrySet().size());
-        assertFalse   ("Invalid Javascript bindings",bindings.entrySet().contains(KOALA));
-        assertEquals  ("Invalid JSBindings",         1,jsx.entrySet().size());
-        assertTrue    ("Invalid JSbindings",         jsx.entrySet().contains(KOALA));
+        Assert.assertEquals  ("Invalid SCXML context",      1,context.getVars().entrySet().size());
+        Assert.assertTrue    ("Invalid SCXML context",      context.getVars().entrySet().contains(KOALA));
+        Assert.assertEquals  ("Invalid Javascript bindings",0,bindings.entrySet().size());
+        Assert.assertFalse   ("Invalid Javascript bindings",bindings.entrySet().contains(KOALA));
+        Assert.assertEquals  ("Invalid JSBindings",         1,jsx.entrySet().size());
+        Assert.assertTrue    ("Invalid JSbindings",         jsx.entrySet().contains(KOALA));
 
         context.reset ();
         bindings.clear();
         bindings.put  ("bear","grizzly");
-        assertEquals  ("Invalid SCXML context",      0,context.getVars().entrySet().size());
-        assertFalse   ("Invalid SCXML context",      context.getVars().entrySet().contains(GRIZZLY));
-        assertEquals  ("Invalid Javascript bindings",1,bindings.entrySet().size());
-        assertTrue    ("Invalid Javascript bindings",bindings.entrySet().contains(GRIZZLY));
-        assertEquals  ("Invalid JSBindings",         1,jsx.entrySet().size());
-        assertTrue    ("Invalid JSbindings",         jsx.entrySet().contains(GRIZZLY));
+        Assert.assertEquals  ("Invalid SCXML context",      0,context.getVars().entrySet().size());
+        Assert.assertFalse   ("Invalid SCXML context",      context.getVars().entrySet().contains(GRIZZLY));
+        Assert.assertEquals  ("Invalid Javascript bindings",1,bindings.entrySet().size());
+        Assert.assertTrue    ("Invalid Javascript bindings",bindings.entrySet().contains(GRIZZLY));
+        Assert.assertEquals  ("Invalid JSBindings",         1,jsx.entrySet().size());
+        Assert.assertTrue    ("Invalid JSbindings",         jsx.entrySet().contains(GRIZZLY));
 
         context.reset ();
         bindings.clear();
         context.set   ("bear","koala");
         bindings.put  ("bear","grizzly");
-        assertEquals  ("Invalid SCXML context",      1,context.getVars().entrySet().size());
-        assertTrue    ("Invalid SCXML context",      context.getVars().entrySet().contains(KOALA));
-        assertEquals  ("Invalid Javascript bindings",1,bindings.entrySet().size());
-        assertTrue    ("Invalid Javascript bindings",bindings.entrySet().contains(GRIZZLY));
-        assertEquals  ("Invalid JSBindings",         1,jsx.entrySet().size());
-        assertFalse   ("Invalid JSbindings",         jsx.entrySet().contains(KOALA));
-        assertTrue    ("Invalid JSbindings",         jsx.entrySet().contains(GRIZZLY));
+        Assert.assertEquals  ("Invalid SCXML context",      1,context.getVars().entrySet().size());
+        Assert.assertTrue    ("Invalid SCXML context",      context.getVars().entrySet().contains(KOALA));
+        Assert.assertEquals  ("Invalid Javascript bindings",1,bindings.entrySet().size());
+        Assert.assertTrue    ("Invalid Javascript bindings",bindings.entrySet().contains(GRIZZLY));
+        Assert.assertEquals  ("Invalid JSBindings",         1,jsx.entrySet().size());
+        Assert.assertFalse   ("Invalid JSbindings",         jsx.entrySet().contains(KOALA));
+        Assert.assertTrue    ("Invalid JSbindings",         jsx.entrySet().contains(GRIZZLY));
 
         context.reset ();
         bindings.clear();
         context.set   ("cat","felix");
         bindings.put  ("dog","rover");
-        assertEquals  ("Invalid SCXML context",      1,context.getVars().entrySet().size());
-        assertTrue    ("Invalid SCXML context",      context.getVars().entrySet().contains(FELIX));
-        assertEquals  ("Invalid Javascript bindings",1,bindings.entrySet().size());
-        assertTrue    ("Invalid Javascript bindings",bindings.entrySet().contains(ROVER));
-        assertEquals  ("Invalid JSBindings",         2,jsx.entrySet().size());
-        assertTrue    ("Invalid JSbindings",         jsx.entrySet().contains(FELIX));
-        assertTrue    ("Invalid JSbindings",         jsx.entrySet().contains(ROVER));
+        Assert.assertEquals  ("Invalid SCXML context",      1,context.getVars().entrySet().size());
+        Assert.assertTrue    ("Invalid SCXML context",      context.getVars().entrySet().contains(FELIX));
+        Assert.assertEquals  ("Invalid Javascript bindings",1,bindings.entrySet().size());
+        Assert.assertTrue    ("Invalid Javascript bindings",bindings.entrySet().contains(ROVER));
+        Assert.assertEquals  ("Invalid JSBindings",         2,jsx.entrySet().size());
+        Assert.assertTrue    ("Invalid JSbindings",         jsx.entrySet().contains(FELIX));
+        Assert.assertTrue    ("Invalid JSbindings",         jsx.entrySet().contains(ROVER));
     }
 
     /**
      * Tests the <code>values</code> method with items in the SCXML context as well as the
      * JavaScript Bindings.
      *
-     */
+     */    
+    @Test
     public void testValues() {
         Context    context  = new JSContext     ();
         Bindings   bindings = new SimpleBindings();
         JSBindings jsx      = new JSBindings    (context,bindings);
 
-        assertEquals("Invalid SCXML context",      0,context.getVars().values().size());
-        assertEquals("Invalid Javascript bindings",0,bindings.values().size());
-        assertEquals("Invalid JSbindings",         0,jsx.values().size());
+        Assert.assertEquals("Invalid SCXML context",      0,context.getVars().values().size());
+        Assert.assertEquals("Invalid Javascript bindings",0,bindings.values().size());
+        Assert.assertEquals("Invalid JSbindings",         0,jsx.values().size());
 
         context.reset ();
         bindings.clear();
         context.set   ("bear","koala");
-        assertEquals  ("Invalid SCXML context",      1,context.getVars().values().size());
-        assertTrue    ("Invalid SCXML context",      context.getVars().values().contains(KOALA.getValue()));
-        assertEquals  ("Invalid Javascript bindings",0,bindings.values().size());
-        assertFalse   ("Invalid Javascript bindings",bindings.values().contains(KOALA.getValue()));
-        assertEquals  ("Invalid JSBindings",         1,jsx.values().size());
-        assertTrue    ("Invalid JSbindings",         jsx.values().contains(KOALA.getValue()));
+        Assert.assertEquals  ("Invalid SCXML context",      1,context.getVars().values().size());
+        Assert.assertTrue    ("Invalid SCXML context",      context.getVars().values().contains(KOALA.getValue()));
+        Assert.assertEquals  ("Invalid Javascript bindings",0,bindings.values().size());
+        Assert.assertFalse   ("Invalid Javascript bindings",bindings.values().contains(KOALA.getValue()));
+        Assert.assertEquals  ("Invalid JSBindings",         1,jsx.values().size());
+        Assert.assertTrue    ("Invalid JSbindings",         jsx.values().contains(KOALA.getValue()));
 
         context.reset ();
         bindings.clear();
         bindings.put  ("bear","grizzly");
-        assertEquals  ("Invalid SCXML context",      0,context.getVars().values().size());
-        assertFalse   ("Invalid SCXML context",      context.getVars().values().contains(GRIZZLY.getValue()));
-        assertEquals  ("Invalid Javascript bindings",1,bindings.values().size());
-        assertTrue    ("Invalid Javascript bindings",bindings.values().contains(GRIZZLY.getValue()));
-        assertEquals  ("Invalid JSBindings",         1,jsx.values().size());
-        assertTrue    ("Invalid JSbindings",         jsx.values().contains(GRIZZLY.getValue()));
+        Assert.assertEquals  ("Invalid SCXML context",      0,context.getVars().values().size());
+        Assert.assertFalse   ("Invalid SCXML context",      context.getVars().values().contains(GRIZZLY.getValue()));
+        Assert.assertEquals  ("Invalid Javascript bindings",1,bindings.values().size());
+        Assert.assertTrue    ("Invalid Javascript bindings",bindings.values().contains(GRIZZLY.getValue()));
+        Assert.assertEquals  ("Invalid JSBindings",         1,jsx.values().size());
+        Assert.assertTrue    ("Invalid JSbindings",         jsx.values().contains(GRIZZLY.getValue()));
 
         context.reset ();
         bindings.clear();
         context.set   ("bear","koala");
         bindings.put  ("bear","grizzly");
-        assertEquals  ("Invalid SCXML context",      1,context.getVars().values().size());
-        assertTrue    ("Invalid SCXML context",      context.getVars().values().contains(KOALA.getValue()));
-        assertEquals  ("Invalid Javascript bindings",1,bindings.values().size());
-        assertTrue    ("Invalid Javascript bindings",bindings.values().contains(GRIZZLY.getValue()));
-        assertEquals  ("Invalid JSBindings",         1,jsx.values().size());
-        assertFalse   ("Invalid JSbindings",         jsx.values().contains(KOALA.getValue()));
-        assertTrue    ("Invalid JSbindings",         jsx.values().contains(GRIZZLY.getValue()));
+        Assert.assertEquals  ("Invalid SCXML context",      1,context.getVars().values().size());
+        Assert.assertTrue    ("Invalid SCXML context",      context.getVars().values().contains(KOALA.getValue()));
+        Assert.assertEquals  ("Invalid Javascript bindings",1,bindings.values().size());
+        Assert.assertTrue    ("Invalid Javascript bindings",bindings.values().contains(GRIZZLY.getValue()));
+        Assert.assertEquals  ("Invalid JSBindings",         1,jsx.values().size());
+        Assert.assertFalse   ("Invalid JSbindings",         jsx.values().contains(KOALA.getValue()));
+        Assert.assertTrue    ("Invalid JSbindings",         jsx.values().contains(GRIZZLY.getValue()));
 
         context.reset ();
         bindings.clear();
         context.set   ("cat","felix");
         bindings.put  ("dog","rover");
-        assertEquals  ("Invalid SCXML context",      1,context.getVars().values().size());
-        assertTrue    ("Invalid SCXML context",      context.getVars().values().contains(FELIX.getValue()));
-        assertEquals  ("Invalid Javascript bindings",1,bindings.values().size());
-        assertTrue    ("Invalid Javascript bindings",bindings.values().contains(ROVER.getValue()));
-        assertEquals  ("Invalid JSBindings",         2,jsx.values().size());
-        assertTrue    ("Invalid JSbindings",         jsx.values().contains(FELIX.getValue()));
-        assertTrue    ("Invalid JSbindings",         jsx.values().contains(ROVER.getValue()));
+        Assert.assertEquals  ("Invalid SCXML context",      1,context.getVars().values().size());
+        Assert.assertTrue    ("Invalid SCXML context",      context.getVars().values().contains(FELIX.getValue()));
+        Assert.assertEquals  ("Invalid Javascript bindings",1,bindings.values().size());
+        Assert.assertTrue    ("Invalid Javascript bindings",bindings.values().contains(ROVER.getValue()));
+        Assert.assertEquals  ("Invalid JSBindings",         2,jsx.values().size());
+        Assert.assertTrue    ("Invalid JSbindings",         jsx.values().contains(FELIX.getValue()));
+        Assert.assertTrue    ("Invalid JSbindings",         jsx.values().contains(ROVER.getValue()));
     }
 
     /**
      * Tests the <code>isEmpty</code> method with items in the SCXML context as well as the
      * JavaScript Bindings.
      *
-     */
+     */    
+    @Test
     public void testIsEmpty() {
         Context    context  = new JSContext     ();
         Bindings   bindings = new SimpleBindings();
         JSBindings jsx      = new JSBindings    (context,bindings);
 
-        assertTrue("Invalid SCXML context",      context.getVars().isEmpty());
-        assertTrue("Invalid Javascript bindings",bindings.isEmpty());
-        assertTrue("Invalid JSbindings",         jsx.isEmpty());
+        Assert.assertTrue("Invalid SCXML context",      context.getVars().isEmpty());
+        Assert.assertTrue("Invalid Javascript bindings",bindings.isEmpty());
+        Assert.assertTrue("Invalid JSbindings",         jsx.isEmpty());
 
         context.set   ("bear","koala");
         bindings.clear();
-        assertFalse   ("Invalid SCXML context",      context.getVars().isEmpty());
-        assertTrue    ("Invalid Javascript bindings",bindings.isEmpty());
-        assertFalse   ("Invalid JSbindings",         jsx.isEmpty());
+        Assert.assertFalse   ("Invalid SCXML context",      context.getVars().isEmpty());
+        Assert.assertTrue    ("Invalid Javascript bindings",bindings.isEmpty());
+        Assert.assertFalse   ("Invalid JSbindings",         jsx.isEmpty());
 
         context.reset ();
         bindings.clear();
         bindings.put  ("bear","grizzly");
-        assertTrue    ("Invalid SCXML context",      context.getVars().isEmpty());
-        assertFalse   ("Invalid Javascript bindings",bindings.isEmpty());
-        assertFalse   ("Invalid JSbindings",         jsx.isEmpty());
+        Assert.assertTrue    ("Invalid SCXML context",      context.getVars().isEmpty());
+        Assert.assertFalse   ("Invalid Javascript bindings",bindings.isEmpty());
+        Assert.assertFalse   ("Invalid JSbindings",         jsx.isEmpty());
 
         context.reset ();
         bindings.clear();
         context.set   ("bear","koala");
         bindings.put  ("bear","grizzly");
-        assertFalse   ("Invalid SCXML context",      context.getVars().isEmpty());
-        assertFalse   ("Invalid Javascript bindings",bindings.isEmpty());
-        assertFalse   ("Invalid JSbindings",         jsx.isEmpty());
+        Assert.assertFalse   ("Invalid SCXML context",      context.getVars().isEmpty());
+        Assert.assertFalse   ("Invalid Javascript bindings",bindings.isEmpty());
+        Assert.assertFalse   ("Invalid JSbindings",         jsx.isEmpty());
 
         context.reset ();
         bindings.clear();
         context.set   ("cat","felix");
         bindings.put  ("dog","rover");
-        assertFalse   ("Invalid SCXML context",      context.getVars().isEmpty());
-        assertFalse   ("Invalid Javascript bindings",bindings.isEmpty());
-        assertFalse   ("Invalid JSbindings",         jsx.isEmpty());
+        Assert.assertFalse   ("Invalid SCXML context",      context.getVars().isEmpty());
+        Assert.assertFalse   ("Invalid Javascript bindings",bindings.isEmpty());
+        Assert.assertFalse   ("Invalid JSbindings",         jsx.isEmpty());
     }
 
     /**
      * Tests the <code>get</code> method with items in the SCXML context as well as the
      * JavaScript Bindings.
      *
-     */
+     */    
+    @Test
     public void testGet() {
         Context    context  = new JSContext     ();
         Bindings   bindings = new SimpleBindings();
         JSBindings jsx      = new JSBindings    (context,bindings);
 
-        assertNull("Invalid SCXML context",      context.get ("bear"));
-        assertNull("Invalid Javascript bindings",bindings.get("bear"));
-        assertNull("Invalid JSbindings",         jsx.get     ("bear"));
+        Assert.assertNull("Invalid SCXML context",      context.get ("bear"));
+        Assert.assertNull("Invalid Javascript bindings",bindings.get("bear"));
+        Assert.assertNull("Invalid JSbindings",         jsx.get     ("bear"));
 
         context.reset ();
         bindings.clear();
         context.set   ("bear","koala");
-        assertNotNull ("Invalid SCXML context",        context.get ("bear"));
-        assertEquals  ("Invalid SCXML context","koala",context.get ("bear"));
-        assertNull    ("Invalid Javascript bindings",  bindings.get("bear"));
-        assertNotNull ("Invalid JSbindings",           jsx.get     ("bear"));
-        assertEquals  ("Invalid JSbindings","koala",   jsx.get     ("bear"));
+        Assert.assertNotNull ("Invalid SCXML context",        context.get ("bear"));
+        Assert.assertEquals  ("Invalid SCXML context","koala",context.get ("bear"));
+        Assert.assertNull    ("Invalid Javascript bindings",  bindings.get("bear"));
+        Assert.assertNotNull ("Invalid JSbindings",           jsx.get     ("bear"));
+        Assert.assertEquals  ("Invalid JSbindings","koala",   jsx.get     ("bear"));
 
         context.reset ();
         bindings.clear();
         bindings.put  ("bear","grizzly");
-        assertNull    ("Invalid SCXML context",                context.get ("bear"));
-        assertNotNull ("Invalid Javascript bindings",          bindings.get("bear"));
-        assertEquals  ("Invalid Javascript bindings","grizzly",bindings.get("bear"));
-        assertNotNull ("Invalid JSbindings",                   jsx.get     ("bear"));
-        assertEquals  ("Invalid JSbindings","grizzly",         jsx.get     ("bear"));
+        Assert.assertNull    ("Invalid SCXML context",                context.get ("bear"));
+        Assert.assertNotNull ("Invalid Javascript bindings",          bindings.get("bear"));
+        Assert.assertEquals  ("Invalid Javascript bindings","grizzly",bindings.get("bear"));
+        Assert.assertNotNull ("Invalid JSbindings",                   jsx.get     ("bear"));
+        Assert.assertEquals  ("Invalid JSbindings","grizzly",         jsx.get     ("bear"));
 
         context.reset ();
         bindings.clear();
         context.set   ("bear","koala");
         bindings.put  ("bear","grizzly");
-        assertNotNull ("Invalid SCXML context",        context.get ("bear"));
-        assertEquals  ("Invalid SCXML context","koala",context.get ("bear"));
-        assertNotNull ("Invalid Javascript bindings",          bindings.get("bear"));
-        assertEquals  ("Invalid Javascript bindings","grizzly",bindings.get("bear"));
-        assertNotNull ("Invalid JSbindings",                   jsx.get     ("bear"));
-        assertEquals  ("Invalid JSbindings","grizzly",         jsx.get     ("bear"));
+        Assert.assertNotNull ("Invalid SCXML context",        context.get ("bear"));
+        Assert.assertEquals  ("Invalid SCXML context","koala",context.get ("bear"));
+        Assert.assertNotNull ("Invalid Javascript bindings",          bindings.get("bear"));
+        Assert.assertEquals  ("Invalid Javascript bindings","grizzly",bindings.get("bear"));
+        Assert.assertNotNull ("Invalid JSbindings",                   jsx.get     ("bear"));
+        Assert.assertEquals  ("Invalid JSbindings","grizzly",         jsx.get     ("bear"));
 
         context.reset ();
         bindings.clear();
         context.set   ("cat","felix");
         bindings.put  ("dog","rover");
-        assertNotNull ("Invalid SCXML context",              context.get ("cat"));
-        assertEquals  ("Invalid SCXML context","felix",      context.get ("cat"));
-        assertNotNull ("Invalid Javascript bindings",        bindings.get("dog"));
-        assertEquals  ("Invalid Javascript bindings","rover",bindings.get("dog"));
-        assertNotNull ("Invalid JSbindings",                 jsx.get     ("cat"));
-        assertEquals  ("Invalid JSbindings","felix",         jsx.get     ("cat"));
-        assertNotNull ("Invalid JSbindings",                 jsx.get     ("dog"));
-        assertEquals  ("Invalid JSbindings","rover",         jsx.get     ("dog"));
+        Assert.assertNotNull ("Invalid SCXML context",              context.get ("cat"));
+        Assert.assertEquals  ("Invalid SCXML context","felix",      context.get ("cat"));
+        Assert.assertNotNull ("Invalid Javascript bindings",        bindings.get("dog"));
+        Assert.assertEquals  ("Invalid Javascript bindings","rover",bindings.get("dog"));
+        Assert.assertNotNull ("Invalid JSbindings",                 jsx.get     ("cat"));
+        Assert.assertEquals  ("Invalid JSbindings","felix",         jsx.get     ("cat"));
+        Assert.assertNotNull ("Invalid JSbindings",                 jsx.get     ("dog"));
+        Assert.assertEquals  ("Invalid JSbindings","rover",         jsx.get     ("dog"));
     }
 
     /**
      * Tests the <code>put</code> method with items in the SCXML context as well as the
      * JavaScript Bindings.
      *
-     */
+     */    
+    @Test
     public void testPut() {
         Context    context  = new JSContext     ();
         Bindings   bindings = new SimpleBindings();
         JSBindings jsx      = new JSBindings    (context,bindings);
 
-        assertNull("Invalid SCXML context",      context.get ("bear"));
-        assertNull("Invalid Javascript bindings",bindings.get("bear"));
-        assertNull("Invalid JSbindings",         jsx.get     ("bear"));
+        Assert.assertNull("Invalid SCXML context",      context.get ("bear"));
+        Assert.assertNull("Invalid Javascript bindings",bindings.get("bear"));
+        Assert.assertNull("Invalid JSbindings",         jsx.get     ("bear"));
 
         jsx.put       ("bear","koala");
-        assertNotNull ("Invalid SCXML context",        context.get ("bear"));
-        assertEquals  ("Invalid SCXML context","koala",context.get("bear"));
-        assertNotNull ("Invalid JSbindings",           jsx.get ("bear"));
-        assertNull    ("Invalid Javascript bindings",  bindings.get("bear"));
+        Assert.assertNotNull ("Invalid SCXML context",        context.get ("bear"));
+        Assert.assertEquals  ("Invalid SCXML context","koala",context.get("bear"));
+        Assert.assertNotNull ("Invalid JSbindings",           jsx.get ("bear"));
+        Assert.assertNull    ("Invalid Javascript bindings",  bindings.get("bear"));
     }
 
     /**
      * Tests the <code>putAll</code> method with items in the SCXML context as well as the
      * JavaScript Bindings.
      *
-     */
+     */    
+    @Test
     public void testPutAll() {
         Context            context  = new JSContext     ();
         Bindings           bindings = new SimpleBindings();
@@ -519,41 +525,42 @@ public class JSBindingsTest extends Test
         vars.put("cat","felix");
         vars.put("dog","rover");
 
-        assertNull("Invalid SCXML context",      context.get ("bear"));
-        assertNull("Invalid SCXML context",      context.get ("cat"));
-        assertNull("Invalid SCXML context",      context.get ("dog"));
-
-        assertNull("Invalid Javascript bindings",bindings.get("bear"));
-        assertNull("Invalid Javascript bindings",bindings.get("cat"));
-        assertNull("Invalid Javascript bindings",bindings.get("dog"));
-
-        assertNull("Invalid JSbindings",         jsx.get     ("bear"));
-        assertNull("Invalid JSbindings",         jsx.get     ("cat"));
-        assertNull("Invalid JSbindings",         jsx.get     ("dog"));
+        Assert.assertNull("Invalid SCXML context",      context.get ("bear"));
+        Assert.assertNull("Invalid SCXML context",      context.get ("cat"));
+        Assert.assertNull("Invalid SCXML context",      context.get ("dog"));
+
+        Assert.assertNull("Invalid Javascript bindings",bindings.get("bear"));
+        Assert.assertNull("Invalid Javascript bindings",bindings.get("cat"));
+        Assert.assertNull("Invalid Javascript bindings",bindings.get("dog"));
+
+        Assert.assertNull("Invalid JSbindings",         jsx.get     ("bear"));
+        Assert.assertNull("Invalid JSbindings",         jsx.get     ("cat"));
+        Assert.assertNull("Invalid JSbindings",         jsx.get     ("dog"));
 
         context.set("bear","koala");
         jsx.putAll (vars);
 
-        assertNotNull ("Invalid SCXML context",        context.get ("bear"));
-        assertNull    ("Invalid SCXML context",        context.get ("cat"));
-        assertNull    ("Invalid SCXML context",        context.get ("dog"));
-        assertEquals  ("Invalid SCXML context","koala",context.get ("bear"));
-        assertEquals  ("Invalid SCXML context",1,      context.getVars().size());
-
-        assertNotNull ("Invalid Javascript bindings",          bindings.get("bear"));
-        assertNotNull ("Invalid Javascript bindings",          bindings.get("cat"));
-        assertNotNull ("Invalid Javascript bindings",          bindings.get("dog"));
-        assertEquals  ("Invalid Javascript bindings","grizzly",bindings.get("bear"));
-        assertEquals  ("Invalid Javascript bindings","felix",  bindings.get("cat"));
-        assertEquals  ("Invalid Javascript bindings","rover",  bindings.get("dog"));
-        assertEquals  ("Invalid Javascript bindings",3,        bindings.size());
+        Assert.assertNotNull ("Invalid SCXML context",        context.get ("bear"));
+        Assert.assertNull    ("Invalid SCXML context",        context.get ("cat"));
+        Assert.assertNull    ("Invalid SCXML context",        context.get ("dog"));
+        Assert.assertEquals  ("Invalid SCXML context","koala",context.get ("bear"));
+        Assert.assertEquals  ("Invalid SCXML context",1,      context.getVars().size());
+
+        Assert.assertNotNull ("Invalid Javascript bindings",          bindings.get("bear"));
+        Assert.assertNotNull ("Invalid Javascript bindings",          bindings.get("cat"));
+        Assert.assertNotNull ("Invalid Javascript bindings",          bindings.get("dog"));
+        Assert.assertEquals  ("Invalid Javascript bindings","grizzly",bindings.get("bear"));
+        Assert.assertEquals  ("Invalid Javascript bindings","felix",  bindings.get("cat"));
+        Assert.assertEquals  ("Invalid Javascript bindings","rover",  bindings.get("dog"));
+        Assert.assertEquals  ("Invalid Javascript bindings",3,        bindings.size());
     }
 
     /**
      * Tests the <code>remove</code> method with items in the SCXML context as well as the
      * JavaScript Bindings.
      *
-     */
+     */    
+    @Test
     public void testRemove() {
         Context            context  = new JSContext     ();
         Bindings           bindings = new SimpleBindings();
@@ -564,66 +571,67 @@ public class JSBindingsTest extends Test
         bindings.put("cat", "felix");
         bindings.put("dog", "rover");
 
-        assertNotNull("Invalid SCXML context",        context.get("bear"));
-        assertEquals ("Invalid SCXML context","koala",context.get("bear"));
-        assertEquals ("Invalid SCXML context",1,      context.getVars().size());
-
-        assertNotNull("Invalid Javascript bindings",          bindings.get("bear"));
-        assertNotNull("Invalid Javascript bindings",          bindings.get("cat"));
-        assertNotNull("Invalid Javascript bindings",          bindings.get("dog"));
-        assertEquals ("Invalid Javascript bindings","grizzly",bindings.get("bear"));
-        assertEquals ("Invalid Javascript bindings","felix",  bindings.get("cat"));
-        assertEquals ("Invalid Javascript bindings","rover",  bindings.get("dog"));
-        assertEquals ("Invalid Javascript bindings",3,        bindings.size());
+        Assert.assertNotNull("Invalid SCXML context",        context.get("bear"));
+        Assert.assertEquals ("Invalid SCXML context","koala",context.get("bear"));
+        Assert.assertEquals ("Invalid SCXML context",1,      context.getVars().size());
+
+        Assert.assertNotNull("Invalid Javascript bindings",          bindings.get("bear"));
+        Assert.assertNotNull("Invalid Javascript bindings",          bindings.get("cat"));
+        Assert.assertNotNull("Invalid Javascript bindings",          bindings.get("dog"));
+        Assert.assertEquals ("Invalid Javascript bindings","grizzly",bindings.get("bear"));
+        Assert.assertEquals ("Invalid Javascript bindings","felix",  bindings.get("cat"));
+        Assert.assertEquals ("Invalid Javascript bindings","rover",  bindings.get("dog"));
+        Assert.assertEquals ("Invalid Javascript bindings",3,        bindings.size());
 
         jsx.remove("cat");
 
-        assertNotNull("Invalid SCXML context",                context.get("bear"));
-        assertEquals ("Invalid SCXML context","koala",        context.get("bear"));
-        assertEquals ("Invalid SCXML context",1,              context.getVars().size());
-        assertNotNull("Invalid Javascript bindings",          bindings.get("bear"));
-        assertNull   ("Invalid Javascript bindings",          bindings.get("cat"));
-        assertNotNull("Invalid Javascript bindings",          bindings.get("dog"));
-        assertEquals ("Invalid Javascript bindings","grizzly",bindings.get("bear"));
-        assertEquals ("Invalid Javascript bindings","rover",  bindings.get("dog"));
-        assertEquals ("Invalid Javascript bindings",2,        bindings.size());
+        Assert.assertNotNull("Invalid SCXML context",                context.get("bear"));
+        Assert.assertEquals ("Invalid SCXML context","koala",        context.get("bear"));
+        Assert.assertEquals ("Invalid SCXML context",1,              context.getVars().size());
+        Assert.assertNotNull("Invalid Javascript bindings",          bindings.get("bear"));
+        Assert.assertNull   ("Invalid Javascript bindings",          bindings.get("cat"));
+        Assert.assertNotNull("Invalid Javascript bindings",          bindings.get("dog"));
+        Assert.assertEquals ("Invalid Javascript bindings","grizzly",bindings.get("bear"));
+        Assert.assertEquals ("Invalid Javascript bindings","rover",  bindings.get("dog"));
+        Assert.assertEquals ("Invalid Javascript bindings",2,        bindings.size());
 
         jsx.remove("dog");
 
-        assertNotNull("Invalid SCXML context",               context.get("bear"));
-        assertEquals ("Invalid SCXML context","koala",        context.get("bear"));
-        assertEquals ("Invalid SCXML context",1,              context.getVars().size());
-        assertNotNull("Invalid Javascript bindings",          bindings.get("bear"));
-        assertNull   ("Invalid Javascript bindings",          bindings.get("cat"));
-        assertNull   ("Invalid Javascript bindings",          bindings.get("dog"));
-        assertEquals ("Invalid Javascript bindings","grizzly",bindings.get("bear"));
-        assertEquals ("Invalid Javascript bindings",1,        bindings.size());
+        Assert.assertNotNull("Invalid SCXML context",               context.get("bear"));
+        Assert.assertEquals ("Invalid SCXML context","koala",        context.get("bear"));
+        Assert.assertEquals ("Invalid SCXML context",1,              context.getVars().size());
+        Assert.assertNotNull("Invalid Javascript bindings",          bindings.get("bear"));
+        Assert.assertNull   ("Invalid Javascript bindings",          bindings.get("cat"));
+        Assert.assertNull   ("Invalid Javascript bindings",          bindings.get("dog"));
+        Assert.assertEquals ("Invalid Javascript bindings","grizzly",bindings.get("bear"));
+        Assert.assertEquals ("Invalid Javascript bindings",1,        bindings.size());
 
         jsx.remove("bear");
 
-        assertNotNull("Invalid SCXML context",       context.get("bear"));
-        assertEquals("Invalid SCXML context","koala",context.get("bear"));
-        assertEquals("Invalid SCXML context",1,      context.getVars().size());
-        assertNull  ("Invalid Javascript bindings",  bindings.get("bear"));
-        assertNull  ("Invalid Javascript bindings",  bindings.get("cat"));
-        assertNull  ("Invalid Javascript bindings",  bindings.get("dog"));
-        assertEquals("Invalid Javascript bindings",0,bindings.size());
+        Assert.assertNotNull("Invalid SCXML context",       context.get("bear"));
+        Assert.assertEquals("Invalid SCXML context","koala",context.get("bear"));
+        Assert.assertEquals("Invalid SCXML context",1,      context.getVars().size());
+        Assert.assertNull  ("Invalid Javascript bindings",  bindings.get("bear"));
+        Assert.assertNull  ("Invalid Javascript bindings",  bindings.get("cat"));
+        Assert.assertNull  ("Invalid Javascript bindings",  bindings.get("dog"));
+        Assert.assertEquals("Invalid Javascript bindings",0,bindings.size());
 
         jsx.remove("bear");
 
-        assertNull  ("Invalid SCXML context",        context.get("bear"));
-        assertEquals("Invalid SCXML context",0,      context.getVars().size());
-        assertNull  ("Invalid Javascript bindings",  bindings.get("bear"));
-        assertNull  ("Invalid Javascript bindings",  bindings.get("cat"));
-        assertNull  ("Invalid Javascript bindings",  bindings.get("dog"));
-        assertEquals("Invalid Javascript bindings",0,bindings.size());
+        Assert.assertNull  ("Invalid SCXML context",        context.get("bear"));
+        Assert.assertEquals("Invalid SCXML context",0,      context.getVars().size());
+        Assert.assertNull  ("Invalid Javascript bindings",  bindings.get("bear"));
+        Assert.assertNull  ("Invalid Javascript bindings",  bindings.get("cat"));
+        Assert.assertNull  ("Invalid Javascript bindings",  bindings.get("dog"));
+        Assert.assertEquals("Invalid Javascript bindings",0,bindings.size());
     }
 
     /**
      * Tests the <code>clear</code> method with items in the SCXML context as well as the
      * JavaScript Bindings.
      *
-     */
+     */    
+    @Test
     public void testClear() {
         Context            context  = new JSContext     ();
         Bindings           bindings = new SimpleBindings();
@@ -634,27 +642,27 @@ public class JSBindingsTest extends Test
         bindings.put("cat", "felix");
         bindings.put("dog", "rover");
 
-        assertNotNull("Invalid SCXML context",        context.get("bear"));
-        assertEquals ("Invalid SCXML context","koala",context.get("bear"));
-        assertEquals ("Invalid SCXML context",1,      context.getVars().size());
-
-        assertNotNull("Invalid Javascript bindings",          bindings.get("bear"));
-        assertNotNull("Invalid Javascript bindings",          bindings.get("cat"));
-        assertNotNull("Invalid Javascript bindings",          bindings.get("dog"));
-        assertEquals ("Invalid Javascript bindings","grizzly",bindings.get("bear"));
-        assertEquals ("Invalid Javascript bindings","felix",  bindings.get("cat"));
-        assertEquals ("Invalid Javascript bindings","rover",  bindings.get("dog"));
-        assertEquals ("Invalid Javascript bindings",3,        bindings.size());
+        Assert.assertNotNull("Invalid SCXML context",        context.get("bear"));
+        Assert.assertEquals ("Invalid SCXML context","koala",context.get("bear"));
+        Assert.assertEquals ("Invalid SCXML context",1,      context.getVars().size());
+
+        Assert.assertNotNull("Invalid Javascript bindings",          bindings.get("bear"));
+        Assert.assertNotNull("Invalid Javascript bindings",          bindings.get("cat"));
+        Assert.assertNotNull("Invalid Javascript bindings",          bindings.get("dog"));
+        Assert.assertEquals ("Invalid Javascript bindings","grizzly",bindings.get("bear"));
+        Assert.assertEquals ("Invalid Javascript bindings","felix",  bindings.get("cat"));
+        Assert.assertEquals ("Invalid Javascript bindings","rover",  bindings.get("dog"));
+        Assert.assertEquals ("Invalid Javascript bindings",3,        bindings.size());
 
         jsx.clear();
 
-        assertNotNull("Invalid SCXML context",       context.get("bear"));
-        assertEquals("Invalid SCXML context","koala",context.get("bear"));
-        assertEquals("Invalid SCXML context",1,      context.getVars().size());
-        assertNull  ("Invalid Javascript bindings",  bindings.get("bear"));
-        assertNull  ("Invalid Javascript bindings",  bindings.get("cat"));
-        assertNull  ("Invalid Javascript bindings",  bindings.get("dog"));
-        assertEquals("Invalid Javascript bindings",0,bindings.size());
+        Assert.assertNotNull("Invalid SCXML context",       context.get("bear"));
+        Assert.assertEquals("Invalid SCXML context","koala",context.get("bear"));
+        Assert.assertEquals("Invalid SCXML context",1,      context.getVars().size());
+        Assert.assertNull  ("Invalid Javascript bindings",  bindings.get("bear"));
+        Assert.assertNull  ("Invalid Javascript bindings",  bindings.get("cat"));
+        Assert.assertNull  ("Invalid Javascript bindings",  bindings.get("dog"));
+        Assert.assertEquals("Invalid Javascript bindings",0,bindings.size());
     }
 
 }

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/javascript/JSContextTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/javascript/JSContextTest.java?rev=1532637&r1=1532636&r2=1532637&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/javascript/JSContextTest.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/javascript/JSContextTest.java Wed Oct 16 03:46:58 2013
@@ -17,16 +17,16 @@
 
 package org.apache.commons.scxml2.env.javascript;
 
-import junit.framework.TestCase;
-
 import org.apache.commons.scxml2.env.SimpleContext;
+import org.junit.Assert;
+import org.junit.Test;
 
 /**
  * JUnit 3 test case for the JSContext SCXML Context implementation for
  * the Javascript expression evaluator.
  *
  */
-public class JSContextTest extends TestCase {
+public class JSContextTest {
         // TEST CONSTANTS
 
         // TEST VARIABLES
@@ -45,32 +45,24 @@ public class JSContextTest extends TestC
             junit.textui.TestRunner.main(testCaseName);
         }
 
-        // CONSTRUCTORS
-
-        /**
-         * Initialises the test case with the supplied name.
-         *
-         */
-        public JSContextTest(String testName) {
-                super(testName);
-        }
-
         // INSTANCE METHOD TESTS
 
         /**
          * Tests implementation of JSContext default constructor.
          *
          */
+        @Test
         public void testDefaultConstructor() {
-            assertNotNull("Error in JSContext default constructor",new JSContext());
+            Assert.assertNotNull("Error in JSContext default constructor",new JSContext());
         }
 
         /**
          * Tests implementation of JSContext 'child' constructor.
          *
          */
+        @Test
         public void testChildConstructor() {
-                assertNotNull("Error in JSContext child constructor",new JSContext(new SimpleContext()));
+                Assert.assertNotNull("Error in JSContext child constructor",new JSContext(new SimpleContext()));
         }
 
 }

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/javascript/JSEvaluatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/javascript/JSEvaluatorTest.java?rev=1532637&r1=1532636&r2=1532637&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/javascript/JSEvaluatorTest.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/javascript/JSEvaluatorTest.java Wed Oct 16 03:46:58 2013
@@ -19,21 +19,22 @@ package org.apache.commons.scxml2.env.ja
 
 import java.io.StringReader;
 
-import javax.xml.xpath.XPath;
-import javax.xml.xpath.XPathConstants;
-import javax.xml.xpath.XPathFactory;
-
-import junit.framework.TestCase;
-
 import org.apache.commons.scxml2.Context;
 import org.apache.commons.scxml2.Evaluator;
 import org.apache.commons.scxml2.SCXMLExecutor;
 import org.apache.commons.scxml2.SCXMLExpressionException;
 import org.apache.commons.scxml2.io.SCXMLReader;
 import org.apache.commons.scxml2.model.SCXML;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathFactory;
+
 /** JUnit 3 test case for the JSEvaluator expression evaluator
  *  class. Includes basic tests for:
  *  <ul>
@@ -46,7 +47,7 @@ import org.w3c.dom.Node;
  *  </ul>
  */
 
-public class JSEvaluatorTest extends TestCase {
+public class JSEvaluatorTest {
     // TEST CONSTANTS
 
     private static final String BAD_EXPRESSION = ">";
@@ -108,8 +109,8 @@ public class JSEvaluatorTest extends Tes
      * Creates and initialises an SCXML data model in the context.
      *
      */
-    @Override
-    protected void setUp() throws Exception {
+    @Before
+    public void setUp() throws Exception {
             StringReader reader = new StringReader(SCRIPT);
 
             scxml     = SCXMLReader.read(reader);
@@ -137,45 +138,37 @@ public class JSEvaluatorTest extends Tes
         junit.textui.TestRunner.main(testCaseName);
     }
 
-    // CONSTRUCTORS
-
-    /**
-     * Initialises the test case with a name.
-     *
-     */
-    public JSEvaluatorTest(String testName) {
-            super(testName);
-    }
-
     // INSTANCE METHOD TESTS
 
     /**
      * Ensures implementation of JSEvaluator default constructor and test basic
      * expression evaluation.
      *
-     */
+     */    
+    @Test
     public void testBasic() throws SCXMLExpressionException {
         Evaluator evaluator = new JSEvaluator();
 
-        assertNotNull(evaluator);
-        assertTrue   (((Boolean) evaluator.eval(context, "1+1 == 2")).booleanValue());
+        Assert.assertNotNull(evaluator);
+        Assert.assertTrue   (((Boolean) evaluator.eval(context, "1+1 == 2")).booleanValue());
     }
 
     /**
      * Tests handling of illegal expressions.
      *
-     */
+     */    
+    @Test
     public void testIllegalExpresssion() {
         Evaluator evaluator = new JSEvaluator();
 
-        assertNotNull(evaluator);
+        Assert.assertNotNull(evaluator);
 
         try {
             evaluator.eval(context,BAD_EXPRESSION);
-            fail          ("JSEvaluator should throw SCXMLExpressionException");
+            Assert.fail          ("JSEvaluator should throw SCXMLExpressionException");
 
         } catch (SCXMLExpressionException x) {
-            assertTrue("JSEvaluator: Incorrect error message",
+            Assert.assertTrue("JSEvaluator: Incorrect error message",
                        x.getMessage().startsWith("Error evaluating ['" + BAD_EXPRESSION + "']"));
         }
     }
@@ -183,10 +176,11 @@ public class JSEvaluatorTest extends Tes
     /**
      * Tests evaluation with simple standard expressions.
      *
-     */
+     */    
+    @Test
     public void testStandardExpressions() throws Exception {
         for (TestItem item: SIMPLE_EXPRESSIONS) {
-            assertEquals("Invalid result: " + item.expression,
+            Assert.assertEquals("Invalid result: " + item.expression,
                          item.result,
                          evaluator.eval(context,item.expression));
         }
@@ -195,14 +189,15 @@ public class JSEvaluatorTest extends Tes
     /**
      * Tests evaluation with SCXML context variables.
      *
-     */
+     */    
+    @Test
     public void testVarExpressions() throws Exception {
         context.set("fibonacci",Integer.valueOf(12));
 
         for (TestItem item: VAR_EXPRESSIONS) {
-            assertNotNull(context.get("fibonacci"));
-            assertEquals (Integer.valueOf(12),context.get("fibonacci"));
-            assertEquals ("Invalid result: " + item.expression,
+            Assert.assertNotNull(context.get("fibonacci"));
+            Assert.assertEquals (Integer.valueOf(12),context.get("fibonacci"));
+            Assert.assertEquals ("Invalid result: " + item.expression,
                           item.result,
                           evaluator.eval(context,item.expression));
         }
@@ -211,13 +206,14 @@ public class JSEvaluatorTest extends Tes
     /**
      * Tests evaluation with invalid SCXML context variables.
      *
-     */
+     */    
+    @Test
     public void testInvalidVarExpressions() {
         for (TestItem item: VAR_EXPRESSIONS) {
             try {
-                assertNull    (context.get("fibonacci"));
+                Assert.assertNull    (context.get("fibonacci"));
                 evaluator.eval(context,item.expression);
-                fail          ("Evaluated invalid <var... expression: " + item.expression);
+                Assert.fail          ("Evaluated invalid <var... expression: " + item.expression);
 
             } catch (SCXMLExpressionException x) {
                 // expected, ignore
@@ -228,9 +224,10 @@ public class JSEvaluatorTest extends Tes
     /**
      * Tests evaluation with SCXML data model expressions.
      *
-     */
+     */    
+    @Test
     public void testDataModelExpressions() throws Exception {
-        assertEquals("Invalid result: " + "Data(forest,'tree/branch/twig')",
+        Assert.assertEquals("Invalid result: " + "Data(forest,'tree/branch/twig')",
                      "leaf",
                      evaluator.eval(context,"Data(forest,'tree/branch/twig')"));
     }
@@ -238,13 +235,14 @@ public class JSEvaluatorTest extends Tes
     /**
      * Tests evaluation with invalid SCXML data model expressions.
      *
-     */
+     */    
+    @Test
     public void testInvalidDataModelExpressions() {
-        assertNull(context.get("forestx"));
+        Assert.assertNull(context.get("forestx"));
 
         try {
             evaluator.eval(context,"Data(forestx,'tree/branch/twig')");
-            fail          ("Evaluated invalid Data() expression: " + "Data(forestx,'tree/branch/twig')");
+            Assert.fail          ("Evaluated invalid Data() expression: " + "Data(forestx,'tree/branch/twig')");
 
         } catch (SCXMLExpressionException x) {
             // expected, ignore
@@ -254,17 +252,18 @@ public class JSEvaluatorTest extends Tes
     /**
      * Tests evaluation of SCXML data model locations.
      *
-     */
+     */    
+    @Test
     public void testDataModelLocations() throws Exception {
-            assertNotNull(context.get("forest"));
+            Assert.assertNotNull(context.get("forest"));
             XPath  xpath = XPathFactory.newInstance().newXPath();
             Node   node  = (Node)   context.get("forest");
             Node   twig  = (Node)   xpath.evaluate("tree/branch/twig",        node,XPathConstants.NODE);
 
-            assertTrue  ("Invalid result: " + "Data(forest,'tree/branch/twig')",
+            Assert.assertTrue  ("Invalid result: " + "Data(forest,'tree/branch/twig')",
                           evaluator.evalLocation(context,"Data(forest,'tree/branch/twig')") instanceof Element);
 
-            assertSame ("Incorrect node returned: " + "Data(forest,'tree/branch/twig')",
+            Assert.assertSame ("Incorrect node returned: " + "Data(forest,'tree/branch/twig')",
                          twig,
                          evaluator.evalLocation(context,"Data(forest,'tree/branch/twig')"));
     }
@@ -272,21 +271,23 @@ public class JSEvaluatorTest extends Tes
     /**
      * Tests evaluation of invalid SCXML data model locations.
      *
-     */
+     */    
+    @Test
     public void testInvalidDataModelLocations() throws Exception {
-            assertNotNull(context.get("forest"));
-            assertNull("Invalid result: " + "Data(forest,'tree/branch/twigx')",
+            Assert.assertNotNull(context.get("forest"));
+            Assert.assertNull("Invalid result: " + "Data(forest,'tree/branch/twigx')",
                        evaluator.evalLocation(context,"Data(forest,'tree/branch/twigx')"));
     }
 
     /**
      * Tests evaluation of Javascript functions with variables from SCXML context.
      *
-     */
+     */    
+    @Test
     public void testScriptFunctions() throws Exception {
         context.set("FIVE",Integer.valueOf(5));
-        assertEquals(Integer.valueOf(5),context.get("FIVE"));
-        assertEquals("Invalid function result",Double.valueOf(120.0),evaluator.eval(context,FUNCTION));
+        Assert.assertEquals(Integer.valueOf(5),context.get("FIVE"));
+        Assert.assertEquals("Invalid function result",Double.valueOf(120.0),evaluator.eval(context,FUNCTION));
     }
 
 

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/javascript/JSExampleTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/javascript/JSExampleTest.java?rev=1532637&r1=1532636&r2=1532637&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/javascript/JSExampleTest.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/javascript/JSExampleTest.java Wed Oct 16 03:46:58 2013
@@ -23,8 +23,6 @@ import java.util.Collection;
 import java.util.List;
 import java.util.Set;
 
-import junit.framework.TestCase;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.scxml2.Context;
 import org.apache.commons.scxml2.ErrorReporter;
@@ -41,16 +39,16 @@ import org.apache.commons.scxml2.model.M
 import org.apache.commons.scxml2.model.SCXML;
 import org.apache.commons.scxml2.model.State;
 import org.apache.commons.scxml2.model.TransitionTarget;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
 /**
  * SCXML application for the example JavaScript scripts.
  *
  */
-public class JSExampleTest extends TestCase {
-
-    public JSExampleTest(String name) {
-        super(name);
-    }
+public class JSExampleTest {
 
     // Test data
     private URL example01;
@@ -59,7 +57,7 @@ public class JSExampleTest extends TestC
     /**
      * Set up instance variables required by this test case.
      */
-    @Override
+    @Before
     public void setUp() {
         example01 = this.getClass().getClassLoader().
             getResource("org/apache/commons/scxml2/env/javascript/example-01.xml");
@@ -68,13 +66,13 @@ public class JSExampleTest extends TestC
     /**
      * Tear down instance variables required by this test case.
      */
-    @Override
+    @After
     public void tearDown() {
         example01 = null;
     }
 
     // TEST METHODS
-
+    @Test
     public void testExample01Sample() throws Exception {
 
         List<CustomAction> actions  = new ArrayList<CustomAction>();        
@@ -86,10 +84,10 @@ public class JSExampleTest extends TestC
         Context context = new JSContext();
         exec = SCXMLTestHelper.getExecutor(scxml, context, evaluator);
 
-        assertNotNull(exec);
+        Assert.assertNotNull(exec);
         Set<TransitionTarget> currentStates = exec.getCurrentStatus().getStates();
-        assertEquals(1, currentStates.size());
-        assertEquals("end", ((State)currentStates.iterator().
+        Assert.assertEquals(1, currentStates.size());
+        Assert.assertEquals("end", ((State)currentStates.iterator().
             next()).getId());
     }
 

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/JexlContextTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/JexlContextTest.java?rev=1532637&r1=1532636&r2=1532637&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/JexlContextTest.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/JexlContextTest.java Wed Oct 16 03:46:58 2013
@@ -19,46 +19,45 @@ package org.apache.commons.scxml2.env.je
 import java.util.HashMap;
 import java.util.Map;
 
-import junit.framework.TestCase;
-
 import org.apache.commons.scxml2.Builtin;
+import org.junit.Assert;
+import org.junit.Test;
 
-public class JexlContextTest extends TestCase {
-
-    public JexlContextTest(String testName) {
-        super(testName);
-    }
+public class JexlContextTest {
 
+    @Test
     public void testNew() {
         JexlContext ctx = new JexlContext();
-        assertNotNull(ctx);
-        assertEquals(1, ctx.getVars().size());
-        assertTrue(ctx.get("_builtin") instanceof Builtin);
+        Assert.assertNotNull(ctx);
+        Assert.assertEquals(1, ctx.getVars().size());
+        Assert.assertTrue(ctx.get("_builtin") instanceof Builtin);
     }
-
+    
+    @Test
     public void testPrepopulated() {
         Map<String, Object> m = new HashMap<String, Object>();
         m.put("foo", "bar");
         JexlContext ctx = new JexlContext(m);
-        assertNotNull(ctx);
-        assertEquals(2, ctx.getVars().size());
-        assertTrue(ctx.get("_builtin") instanceof Builtin);
+        Assert.assertNotNull(ctx);
+        Assert.assertEquals(2, ctx.getVars().size());
+        Assert.assertTrue(ctx.get("_builtin") instanceof Builtin);
         String fooValue = (String) ctx.get("foo");
-        assertEquals("bar", fooValue);
+        Assert.assertEquals("bar", fooValue);
     }
-
+    
+    @Test
     public void testSetVars() {
         JexlContext ctx = new JexlContext();
-        assertNotNull(ctx);
-        assertEquals(1, ctx.getVars().size());
-        assertTrue(ctx.get("_builtin") instanceof Builtin);
+        Assert.assertNotNull(ctx);
+        Assert.assertEquals(1, ctx.getVars().size());
+        Assert.assertTrue(ctx.get("_builtin") instanceof Builtin);
         Map<String, Object> m = new HashMap<String, Object>();
         m.put("foo", "bar");
         ctx.setVars(m);
-        assertEquals(2, ctx.getVars().size());
+        Assert.assertEquals(2, ctx.getVars().size());
         String fooValue = (String) ctx.get("foo");
-        assertTrue(ctx.get("_builtin") instanceof Builtin);
-        assertEquals("bar", fooValue);
+        Assert.assertTrue(ctx.get("_builtin") instanceof Builtin);
+        Assert.assertEquals("bar", fooValue);
     }
 
 }

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/JexlEvaluatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/JexlEvaluatorTest.java?rev=1532637&r1=1532636&r2=1532637&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/JexlEvaluatorTest.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/JexlEvaluatorTest.java Wed Oct 16 03:46:58 2013
@@ -16,35 +16,33 @@
  */
 package org.apache.commons.scxml2.env.jexl;
 
-import junit.framework.TestCase;
-
 import org.apache.commons.scxml2.Context;
 import org.apache.commons.scxml2.Evaluator;
 import org.apache.commons.scxml2.SCXMLExpressionException;
+import org.junit.Assert;
+import org.junit.Test;
 
-public class JexlEvaluatorTest extends TestCase {
+public class JexlEvaluatorTest {
 
     private String BAD_EXPRESSION = ">";
     private Context ctx = new JexlContext();
 
-    public JexlEvaluatorTest(String testName) {
-        super(testName);
-    }
-
+    @Test
     public void testPristine() throws SCXMLExpressionException {
         Evaluator eval = new JexlEvaluator();
-        assertNotNull(eval);
-        assertTrue(((Boolean) eval.eval(ctx, "1+1 eq 2")).booleanValue());
+        Assert.assertNotNull(eval);
+        Assert.assertTrue(((Boolean) eval.eval(ctx, "1+1 eq 2")).booleanValue());
     }
-
+    
+    @Test
     public void testErrorMessage() {
         Evaluator eval = new JexlEvaluator();
-        assertNotNull(eval);
+        Assert.assertNotNull(eval);
         try {
             eval.eval(ctx, BAD_EXPRESSION);
-            fail("JexlEvaluator should throw SCXMLExpressionException");
+            Assert.fail("JexlEvaluator should throw SCXMLExpressionException");
         } catch (SCXMLExpressionException e) {
-            assertTrue("JexlEvaluator: Incorrect error message",
+            Assert.assertTrue("JexlEvaluator: Incorrect error message",
                 e.getMessage().startsWith("eval('" + BAD_EXPRESSION + "'):"));
         }
     }

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/StaticMethodTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/StaticMethodTest.java?rev=1532637&r1=1532636&r2=1532637&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/StaticMethodTest.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/StaticMethodTest.java Wed Oct 16 03:46:58 2013
@@ -19,25 +19,23 @@ package org.apache.commons.scxml2.env.je
 import java.net.URL;
 import java.util.Set;
 
-import junit.framework.TestCase;
-
 import org.apache.commons.scxml2.Context;
 import org.apache.commons.scxml2.SCXMLExecutor;
 import org.apache.commons.scxml2.SCXMLTestHelper;
 import org.apache.commons.scxml2.model.TransitionTarget;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
-public class StaticMethodTest extends TestCase {
+public class StaticMethodTest {
 
     private URL staticmethod;
-    
-    public StaticMethodTest(String testName) {
-        super(testName);
-    }
 
     /**
      * Set up instance variables required by this test case.
      */
-    @Override
+    @Before
     public void setUp() {
         staticmethod = this.getClass().getClassLoader().
             getResource("org/apache/commons/scxml2/env/jexl/static-method.xml");
@@ -46,19 +44,20 @@ public class StaticMethodTest extends Te
     /**
      * Tear down instance variables required by this test case.
      */
-    @Override
+    @After
     public void tearDown() {
         staticmethod = null;
     }
-
+    
+    @Test
     public void testJexlStaticMethodInvocation() throws Exception {
         Context jc = new JexlContext();
         jc.set("System", System.class);
         SCXMLExecutor exec = SCXMLTestHelper.getExecutor(staticmethod,
                 jc, new JexlEvaluator());
         Set<TransitionTarget> currentStates = exec.getCurrentStatus().getStates();
-        assertEquals(1, currentStates.size());
-        assertEquals("static", currentStates.iterator().next().getId());
+        Assert.assertEquals(1, currentStates.size());
+        Assert.assertEquals("static", currentStates.iterator().next().getId());
     }
 
 }

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jsp/ELEvaluatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jsp/ELEvaluatorTest.java?rev=1532637&r1=1532636&r2=1532637&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jsp/ELEvaluatorTest.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jsp/ELEvaluatorTest.java Wed Oct 16 03:46:58 2013
@@ -16,35 +16,33 @@
  */
 package org.apache.commons.scxml2.env.jsp;
 
-import junit.framework.TestCase;
-
 import org.apache.commons.scxml2.Context;
 import org.apache.commons.scxml2.Evaluator;
 import org.apache.commons.scxml2.SCXMLExpressionException;
+import org.junit.Assert;
+import org.junit.Test;
 
-public class ELEvaluatorTest extends TestCase {
+public class ELEvaluatorTest {
 
     private String BAD_EXPRESSION = "${${}";
     private Context ctx = new ELContext();
 
-    public ELEvaluatorTest(String testName) {
-        super(testName);
-    }
-
+    @Test
     public void testPristine() throws SCXMLExpressionException {
         Evaluator eval = new ELEvaluator();
-        assertNotNull(eval);
-        assertTrue(((Boolean) eval.eval(ctx, "${1+1 eq 2}")).booleanValue());
+        Assert.assertNotNull(eval);
+        Assert.assertTrue(((Boolean) eval.eval(ctx, "${1+1 eq 2}")).booleanValue());
     }
-
+    
+    @Test
     public void testErrorMessage() {
         Evaluator eval = new ELEvaluator();
-        assertNotNull(eval);
+        Assert.assertNotNull(eval);
         try {
             eval.eval(ctx, BAD_EXPRESSION);
-            fail("ELEvaluator should throw SCXMLExpressionException");
+            Assert.fail("ELEvaluator should throw SCXMLExpressionException");
         } catch (SCXMLExpressionException e) {
-            assertTrue("ELEvaluator: Incorrect error message",
+            Assert.assertTrue("ELEvaluator: Incorrect error message",
                 e.getMessage().startsWith("eval('" + BAD_EXPRESSION + "'):"));
         }
     }



Mime
View raw message