commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1634235 [2/3] - in /commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2: ./ env/ env/groovy/ env/javascript/ env/jexl/ env/xpath/ invoke/ io/ issues/ model/
Date Sat, 25 Oct 2014 15:24:28 GMT
Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/datamodel-02.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/datamodel-02.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/datamodel-02.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/datamodel-02.xml Sat Oct 25 15:24:25 2014
@@ -19,6 +19,7 @@
      prefixed XPath expressions in the Commons SCXML Data() function -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
        version="1.0"
+       datamodel="jexl"
        initial="ten">
 
     <!-- Start with same prefixes, defined in two different places -->

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/datamodel-03.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/datamodel-03.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/datamodel-03.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/datamodel-03.xml Sat Oct 25 15:24:25 2014
@@ -19,10 +19,11 @@
      prefixed XPath expressions in the Commons SCXML Data() function.
      Used by org.apache.commons.scxml2.NamespacePrefixedPathsTest.
      Also serves as testing the underlying functionality of the
-     underlying parsing technology (here, Digester 1.8) -->
+     underlying parsing technology -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
        xmlns:cs="http://commons.apache.org/scxml"
        version="1.0"
+       datamodel="jexl"
        initial="ten">
 
      <!-- Root data model -->

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/datamodel-04.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/datamodel-04.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/datamodel-04.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/datamodel-04.xml Sat Oct 25 15:24:25 2014
@@ -20,6 +20,7 @@
      to persist some _event.data -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
        version="1.0"
+       datamodel="jexl"
        initial="ten">
 
     <!-- Root or document datamodel -->

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/datamodel-05.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/datamodel-05.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/datamodel-05.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/datamodel-05.xml Sat Oct 25 15:24:25 2014
@@ -18,6 +18,7 @@
 <!-- A fictitious state machine used by test cases. -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
        version="1.0"
+       datamodel="jexl"
        initial="start">
 
     <datamodel>

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/eventdata-01.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/eventdata-01.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/eventdata-01.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/eventdata-01.xml Sat Oct 25 15:24:25 2014
@@ -17,6 +17,7 @@
 -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
       version="1.0"
+      datamodel="jexl"
       initial="state1">
      <state id="state1">
            <transition event="event.foo" cond="_event.data eq 2"

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/eventdata-02.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/eventdata-02.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/eventdata-02.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/eventdata-02.xml Sat Oct 25 15:24:25 2014
@@ -17,6 +17,7 @@
 -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
       version="1.0"
+      datamodel="jexl"
       initial="state0">
      <state id="state0">
            <!-- Payload can be any object, such as a String ... -->

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/eventdata-03.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/eventdata-03.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/eventdata-03.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/eventdata-03.xml Sat Oct 25 15:24:25 2014
@@ -18,6 +18,7 @@
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
        xmlns:cs="http://commons.apache.org/scxml"
        version="1.0"
+       datamodel="jexl"
        initial="ten">
 
     <datamodel>

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/eventdata-04.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/eventdata-04.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/eventdata-04.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/eventdata-04.xml Sat Oct 25 15:24:25 2014
@@ -17,6 +17,7 @@
 -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
      version="1.0"
+     datamodel="jexl"
      initial="start">
 
    <parallel id="start">

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/foreach.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/foreach.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/foreach.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/foreach.xml Sat Oct 25 15:24:25 2014
@@ -15,7 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
 -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0">
+<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" datamodel="jexl">
   <datamodel>
     <data id="var1" expr="[1,2,3]"/>
     <data id="var2" expr="0"/>

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/microwave-01.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/microwave-01.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/microwave-01.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/microwave-01.xml Sat Oct 25 15:24:25 2014
@@ -21,6 +21,7 @@
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
        xmlns:cs="http://commons.apache.org/scxml"
        version="1.0"
+       datamodel="jexl"
        initial="off">
   
   <!--  trivial microwave oven example -->

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/microwave-02.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/microwave-02.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/microwave-02.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/microwave-02.xml Sat Oct 25 15:24:25 2014
@@ -20,7 +20,8 @@
 -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0"
        xmlns:cs="http://commons.apache.org/scxml"
-       initial="microwave"> 
+       datamodel="jexl"
+       initial="microwave">
 
   <!--  trivial microwave oven example -->
   <!-- using parallel and In() predicate -->

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/microwave-03.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/microwave-03.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/microwave-03.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/microwave-03.xml Sat Oct 25 15:24:25 2014
@@ -21,6 +21,7 @@
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
        xmlns:cs="http://commons.apache.org/scxml"
        version="1.0"
+       datamodel="jexl"
        initial="off">
   
   <!--  trivial microwave oven example -->

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/microwave-04.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/microwave-04.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/microwave-04.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/microwave-04.xml Sat Oct 25 15:24:25 2014
@@ -21,6 +21,7 @@
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
        xmlns:cs="http://commons.apache.org/scxml"
        version="1.0"
+       datamodel="jexl"
        initial="microwave">
 
   <!--  trivial microwave oven example -->

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/microwave-05.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/microwave-05.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/microwave-05.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/microwave-05.xml Sat Oct 25 15:24:25 2014
@@ -21,6 +21,7 @@
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
        xmlns:cs="http://commons.apache.org/scxml"
        version="1.0"
+       datamodel="jexl"
        initial="microwave">
 
   <!--  trivial microwave oven example -->

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/script-01.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/script-01.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/script-01.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/script-01.xml Sat Oct 25 15:24:25 2014
@@ -17,6 +17,7 @@
 -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
        version="1.0"
+       datamodel="jexl"
        initial="script">
 
     <datamodel>

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/stateless-01.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/stateless-01.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/stateless-01.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/stateless-01.xml Sat Oct 25 15:24:25 2014
@@ -18,6 +18,7 @@
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
        xmlns:cs="http://commons.apache.org/scxml"
        version="1.0"
+       datamodel="jexl"
        initial="main">
 
     <state id="main">

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/static-method.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/static-method.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/static-method.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/static-method.xml Sat Oct 25 15:24:25 2014
@@ -20,6 +20,7 @@
 -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
        version="1.0"
+       datamodel="jexl"
        initial="static">
 
     <final id="static">

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/wildcard-01.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/wildcard-01.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/wildcard-01.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/wildcard-01.xml Sat Oct 25 15:24:25 2014
@@ -18,6 +18,7 @@
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
        xmlns:cs="http://commons.apache.org/scxml"
        version="1.0"
+       datamodel="jexl"
        initial="state1">
      <state id="state1">
            <onentry>

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/wildcard-02.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/wildcard-02.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/wildcard-02.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/wildcard-02.xml Sat Oct 25 15:24:25 2014
@@ -17,6 +17,7 @@
 -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
       version="1.0"
+      datamodel="jexl"
       initial="state1">
 
     <state id="state1">

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/wizard-01.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/wizard-01.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/wizard-01.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/wizard-01.xml Sat Oct 25 15:24:25 2014
@@ -17,6 +17,7 @@
 -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
       version="1.0"
+      datamodel="jexl"
       initial="state1">
      <state id="state1">
            <transition event="event2" target="state2"/>

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/wizard-02.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/wizard-02.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/wizard-02.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/wizard-02.xml Sat Oct 25 15:24:25 2014
@@ -18,6 +18,7 @@
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
        xmlns:cs="http://commons.apache.org/scxml"
        version="1.0"
+       datamodel="jexl"
        initial="state1">
      <state id="state1">
            <onentry>

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/xpath/XPathExampleTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/xpath/XPathExampleTest.java?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/xpath/XPathExampleTest.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/xpath/XPathExampleTest.java Sat Oct 25 15:24:25 2014
@@ -17,21 +17,14 @@
 
 package org.apache.commons.scxml2.env.xpath;
 
-import java.net.URL;
 import java.util.Set;
 
-import org.apache.commons.scxml2.Context;
-import org.apache.commons.scxml2.Evaluator;
 import org.apache.commons.scxml2.SCXMLExecutor;
 import org.apache.commons.scxml2.SCXMLTestHelper;
 import org.apache.commons.scxml2.TriggerEvent;
 import org.apache.commons.scxml2.model.EnterableState;
-import org.apache.commons.scxml2.model.SCXML;
-import org.apache.commons.scxml2.model.State;
 
-import org.junit.After;
 import org.junit.Assert;
-import org.junit.Before;
 import org.junit.Test;
 
 /**
@@ -40,30 +33,6 @@ import org.junit.Test;
  */
 public class XPathExampleTest {
 
-    // Test data
-    private URL example01, example02;
-    private SCXMLExecutor exec;
-
-    /**
-     * Set up instance variables required by this test case.
-     */
-    @Before
-    public void setUp() {
-        example01 = this.getClass().getClassLoader().
-            getResource("org/apache/commons/scxml2/env/xpath/example-01.xml");
-        example02 = this.getClass().getClassLoader().
-            getResource("org/apache/commons/scxml2/env/xpath/example-02.xml");
-    }
-
-    /**
-     * Tear down instance variables required by this test case.
-     */
-    @After
-    public void tearDown() {
-        example01 = example02 = null;
-    }
-
-    // TEST METHODS
     /* TODO: disabled test because the XPathContext cannot yet resolve $_event/data
              and the old $_eventdata system variable has been removed.
              this probably requires replacing the XPathContext handling with Commons JXPath or similar solution
@@ -71,17 +40,11 @@ public class XPathExampleTest {
     */
     public void testExample01Sample() throws Exception {
 
-        SCXML scxml = SCXMLTestHelper.parse(example01);
-        Evaluator evaluator = null;
-        evaluator = new XPathEvaluator();
-        Context context = new XPathContext(null);
-        exec = SCXMLTestHelper.getExecutor(scxml, context, evaluator);
-
-        Assert.assertNotNull(exec);
+        SCXMLExecutor exec = SCXMLTestHelper.getExecutor("org/apache/commons/scxml2/env/xpath/example-01.xml");
+        exec.go();
         Set<EnterableState> currentStates = exec.getCurrentStatus().getStates();
         Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("mid", ((State)currentStates.iterator().
-            next()).getId());
+        Assert.assertEquals("mid", currentStates.iterator().next().getId());
 
         String payload = "<test xmlns=''><status>complete</status></test>";
         SCXMLTestHelper.assertPostTriggerState(exec,
@@ -94,18 +57,12 @@ public class XPathExampleTest {
     @Test
     public void testExample02Sample() throws Exception {
 
-        SCXML scxml = SCXMLTestHelper.parse(example02);
-        Evaluator evaluator = null;
-        evaluator = new XPathEvaluator();
-        Context context = new XPathContext(null);
-        exec = SCXMLTestHelper.getExecutor(scxml, context, evaluator);
-
-        Assert.assertNotNull(exec);
+        SCXMLExecutor exec = SCXMLTestHelper.getExecutor("org/apache/commons/scxml2/env/xpath/example-02.xml");
+        exec.go();
         Set<EnterableState> currentStates = exec.getCurrentStatus().getStates();
         Assert.assertEquals(1, currentStates.size());
         Assert.assertEquals("end", currentStates.iterator().next().getId());
 
     }
-
 }
 

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/xpath/example-01.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/xpath/example-01.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/xpath/example-01.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/xpath/example-01.xml Sat Oct 25 15:24:25 2014
@@ -17,7 +17,7 @@
 -->
 <!-- SCXML XPath environment: example script -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
-       xmlns:cs="http://commons.apache.org/scxml" initial="start"
+       xmlns:cs="http://commons.apache.org/scxml" initial="start" datamodel="xpath"
        version="1.0">
 
     <datamodel>
@@ -38,17 +38,17 @@
     <state id="start">
         <onentry>
             <log label="Lion"
-                 expr="cs:Data('jungle','animals/lion/name')" />
+                 expr="$jungle/animals/lion/name" />
         </onentry>
-        <transition cond="cs:Data('jungle','animals/lion/age') = 12"
+        <transition cond="$jungle/animals/lion/age = 12"
                     target="mid" />
     </state>
 
     <state id="mid">
         <onentry>
             <log label="Total age"
-                expr="cs:Data('jungle','animals/lion/age') +
-                      cs:Data('jungle','animals/tiger/age')" />
+                expr="$jungle/animals/lion/age +
+                      $jungle/animals/tiger/age" />
         </onentry>
         <transition event="foo" cond="$_event/data/test/status = 'complete'"
                     target="end" />

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/xpath/example-02.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/xpath/example-02.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/xpath/example-02.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/xpath/example-02.xml Sat Oct 25 15:24:25 2014
@@ -16,7 +16,7 @@
   * limitations under the License.
 -->
 <!-- SCXML XPath environment: example script using XPath with namespaces -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" initial="start" version="1.0"
+<scxml xmlns="http://www.w3.org/2005/07/scxml" initial="start" datamodel="xpath" version="1.0"
        xmlns:a="http://example.com/a"
        xmlns:b="http://example.com/b"
        xmlns:c="http://example.com/c">

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/external-hello-world.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/external-hello-world.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/external-hello-world.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/external-hello-world.xml Sat Oct 25 15:24:25 2014
@@ -20,6 +20,7 @@
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
        xmlns:my="http://my.custom-actions.domain/CUSTOM"
        version="1.0"
+       datamodel="jexl"
        initial="external-hello">
 
     <state id="external-hello" src="custom-hello-world-02.xml">

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/hello-world.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/hello-world.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/hello-world.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/hello-world.xml Sat Oct 25 15:24:25 2014
@@ -19,6 +19,7 @@
      CustomActionTest.java in model package -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
        version="1.0"
+       datamodel="jexl"
        initial="hello">
 
     <final id="hello">

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/history-deep-01.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/history-deep-01.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/history-deep-01.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/history-deep-01.xml Sat Oct 25 15:24:25 2014
@@ -18,7 +18,7 @@
 <!--
    This document is an example of using deep history
 -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0"
+<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" datamodel="jexl"
        initial="flow">
 
     <state id="flow">

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/history-default-01.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/history-default-01.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/history-default-01.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/history-default-01.xml Sat Oct 25 15:24:25 2014
@@ -19,7 +19,7 @@
    This document is an example of specifying default transitions for
    history states (if the parent state has never been visited before)
 -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0"
+<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" datamodel="jexl"
        initial="state1">
 
     <state id="state1">

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/history-parallel-01.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/history-parallel-01.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/history-parallel-01.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/history-parallel-01.xml Sat Oct 25 15:24:25 2014
@@ -18,7 +18,7 @@
 <!--
    This document is an example of using history in parallel
 -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0"
+<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" datamodel="jexl"
         initial="off_call">
 
     <state id="off_call">

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/history-shallow-01.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/history-shallow-01.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/history-shallow-01.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/history-shallow-01.xml Sat Oct 25 15:24:25 2014
@@ -18,7 +18,7 @@
 <!--
    This document is an example of using shallow history
 -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0"
+<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" datamodel="jexl"
     initial="flow">
 
     <state id="flow">

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/InvokeParamNameTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/InvokeParamNameTest.java?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/InvokeParamNameTest.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/InvokeParamNameTest.java Sat Oct 25 15:24:25 2014
@@ -16,7 +16,6 @@
  */
 package org.apache.commons.scxml2.invoke;
 
-import java.net.URL;
 import java.util.Map;
 
 import org.apache.commons.scxml2.Evaluator;
@@ -24,8 +23,6 @@ import org.apache.commons.scxml2.SCXMLEx
 import org.apache.commons.scxml2.SCXMLIOProcessor;
 import org.apache.commons.scxml2.SCXMLTestHelper;
 import org.apache.commons.scxml2.TriggerEvent;
-import org.apache.commons.scxml2.env.jexl.JexlContext;
-import org.apache.commons.scxml2.env.jexl.JexlEvaluator;
 import org.apache.commons.scxml2.model.ModelException;
 import org.junit.After;
 import org.junit.Assert;
@@ -37,7 +34,6 @@ import org.w3c.dom.Node;
 // Tests for 4.3.1 in WD-scxml-20080516
 public class InvokeParamNameTest {
 
-    private URL invoker04;
     private SCXMLExecutor exec;
 
     static String lastSource;
@@ -45,17 +41,14 @@ public class InvokeParamNameTest {
     
     @Before
     public void setUp() throws Exception {
-        invoker04 = this.getClass().getClassLoader().
-            getResource("org/apache/commons/scxml2/invoke/invoker-04.xml");
-        exec = SCXMLTestHelper.getExecutor(invoker04,
-                new JexlContext(), new JexlEvaluator());
+        exec = SCXMLTestHelper.getExecutor("org/apache/commons/scxml2/invoke/invoker-04.xml");
         exec.registerInvokerClass("x-test", DummyInvoker.class);
+        exec.go();
     }
     
     @After
     public void tearDown() {
         exec.unregisterInvokerClass("x-test");    
-        invoker04 = null;
     }
     
     private void trigger() throws ModelException {

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/InvokeTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/InvokeTest.java?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/InvokeTest.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/InvokeTest.java Sat Oct 25 15:24:25 2014
@@ -23,14 +23,10 @@ import org.apache.commons.scxml2.SCXMLEx
 import org.apache.commons.scxml2.SCXMLTestHelper;
 import org.apache.commons.scxml2.env.SimpleDispatcher;
 import org.apache.commons.scxml2.env.SimpleErrorReporter;
-import org.apache.commons.scxml2.env.jexl.JexlContext;
-import org.apache.commons.scxml2.env.jexl.JexlEvaluator;
 import org.apache.commons.scxml2.io.SCXMLReader;
 import org.apache.commons.scxml2.model.EnterableState;
 import org.apache.commons.scxml2.model.SCXML;
-import org.junit.After;
 import org.junit.Assert;
-import org.junit.Before;
 import org.junit.Test;
 
 /**
@@ -39,41 +35,13 @@ import org.junit.Test;
  */
 public class InvokeTest {
 
-    // Test data
-    private URL invoke01, invoke02, invoke03;
-    private SCXMLExecutor exec;
-
-    /**
-     * Set up instance variables required by this test case.
-     */
-    @Before
-    public void setUp() {
-        invoke01 = this.getClass().getClassLoader().
-            getResource("org/apache/commons/scxml2/invoke/invoker-01.xml");
-        invoke02 = this.getClass().getClassLoader().
-            getResource("org/apache/commons/scxml2/invoke/invoker-02.xml");
-        invoke03 = this.getClass().getClassLoader().
-            getResource("org/apache/commons/scxml2/invoke/invoker-03.xml");
-    }
-
-    /**
-     * Tear down instance variables required by this test case.
-     */
-    @After
-    public void tearDown() {
-        invoke01 = invoke02 = invoke03 = null;
-    }
-
     /**
      * Test the SCXML documents, usage of &lt;invoke&gt;
      */    
     @Test
     public void testInvoke01Sample() throws Exception {
-        SCXML scxml = SCXMLReader.read(invoke01);
-        exec = new SCXMLExecutor(new JexlEvaluator(), new SimpleDispatcher(),
-            new SimpleErrorReporter());
-        Assert.assertNotNull(exec);
-        exec.setRootContext(new JexlContext());
+        SCXML scxml = SCXMLReader.read(SCXMLTestHelper.getResource("org/apache/commons/scxml2/invoke/invoker-01.xml"));
+        SCXMLExecutor exec = new SCXMLExecutor(null, new SimpleDispatcher(), new SimpleErrorReporter());
         exec.setStateMachine(scxml);
         exec.registerInvokerClass("scxml", SimpleSCXMLInvoker.class);
         exec.go();
@@ -84,11 +52,8 @@ public class InvokeTest {
     
     @Test
     public void testInvoke02Sample() throws Exception {
-        SCXML scxml = SCXMLReader.read(invoke02);
-        exec = new SCXMLExecutor(new JexlEvaluator(), new SimpleDispatcher(),
-            new SimpleErrorReporter());
-        Assert.assertNotNull(exec);
-        exec.setRootContext(new JexlContext());
+        SCXML scxml = SCXMLReader.read(SCXMLTestHelper.getResource("org/apache/commons/scxml2/invoke/invoker-02.xml"));
+        SCXMLExecutor exec = new SCXMLExecutor(null, new SimpleDispatcher(), new SimpleErrorReporter());
         exec.setStateMachine(scxml);
         exec.registerInvokerClass("scxml", SimpleSCXMLInvoker.class);
         exec.go();
@@ -98,11 +63,8 @@ public class InvokeTest {
     
     @Test
     public void testInvoke03Sample() throws Exception {
-        SCXML scxml = SCXMLReader.read(invoke03);
-        exec = new SCXMLExecutor(new JexlEvaluator(), new SimpleDispatcher(),
-            new SimpleErrorReporter());
-        Assert.assertNotNull(exec);
-        exec.setRootContext(new JexlContext());
+        SCXML scxml = SCXMLReader.read(SCXMLTestHelper.getResource("org/apache/commons/scxml2/invoke/invoker-03.xml"));
+        SCXMLExecutor exec = new SCXMLExecutor(null, new SimpleDispatcher(), new SimpleErrorReporter());
         exec.setStateMachine(scxml);
         exec.registerInvokerClass("scxml", SimpleSCXMLInvoker.class);
         exec.go();

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoked-01.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoked-01.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoked-01.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoked-01.xml Sat Oct 25 15:24:25 2014
@@ -17,6 +17,7 @@
 -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
        version="1.0"
+       datamodel="jexl"
        initial="state1">
 
     <state id="state1">

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoked-02.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoked-02.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoked-02.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoked-02.xml Sat Oct 25 15:24:25 2014
@@ -17,6 +17,7 @@
 -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
        version="1.0"
+       datamodel="jexl"
        initial="state1">
 
     <state id="state1">

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoked-03-01.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoked-03-01.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoked-03-01.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoked-03-01.xml Sat Oct 25 15:24:25 2014
@@ -18,6 +18,7 @@
 <!-- Used by InvokeTest#testInvoke03Sample() -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
        version="1.0"
+       datamodel="jexl"
        initial="s1">
 
     <state id="s1">

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoked-03.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoked-03.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoked-03.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoked-03.xml Sat Oct 25 15:24:25 2014
@@ -18,6 +18,7 @@
 <!-- Used by InvokeTest#testInvoke03Sample() -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
        version="1.0"
+       datamodel="jexl"
        initial="state1">
 
     <state id="state1">

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoker-01.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoker-01.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoker-01.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoker-01.xml Sat Oct 25 15:24:25 2014
@@ -17,6 +17,7 @@
 -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
        version="1.0"
+       datamodel="jexl"
        initial="invoker">
 
     <state id="invoker">

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoker-02.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoker-02.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoker-02.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoker-02.xml Sat Oct 25 15:24:25 2014
@@ -17,6 +17,7 @@
 -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
        version="1.0"
+       datamodel="jexl"
        initial="invoker">
 
     <state id="invoker">

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoker-03.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoker-03.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoker-03.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoker-03.xml Sat Oct 25 15:24:25 2014
@@ -18,6 +18,7 @@
 <!-- Used by InvokeTest#testInvoke03Sample() -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
        version="1.0"
+       datamodel="jexl"
        initial="invoker">
 
     <state id="invoker">

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoker-04.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoker-04.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoker-04.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoker-04.xml Sat Oct 25 15:24:25 2014
@@ -21,6 +21,7 @@
      
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
        version="1.0"
+       datamodel="jexl"
        initial="wait">
 
     <datamodel>

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/SCXMLReaderTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/SCXMLReaderTest.java?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/SCXMLReaderTest.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/SCXMLReaderTest.java Sat Oct 25 15:24:25 2014
@@ -18,7 +18,6 @@ package org.apache.commons.scxml2.io;
 
 import java.io.IOException;
 import java.io.StringReader;
-import java.net.URL;
 import java.util.ArrayList;
 import java.util.LinkedList;
 import java.util.List;
@@ -61,13 +60,6 @@ public class SCXMLReaderTest {
 
     private static String oldLogFactoryProperty;
 
-    // Test data
-    private URL transitions01, prefix01, send01,
-        microwave03, microwave04, scxmlinitialattr, action01,
-        scxmlWithInvalidElems, groovyClosure;
-    private SCXML scxml;
-    private String scxmlAsString;
-
     private Log scxmlReaderLog;
 
     @BeforeClass
@@ -90,79 +82,44 @@ public class SCXMLReaderTest {
      */
     @Before
     public void before() {
-        microwave03 = this.getClass().getClassLoader().
-            getResource("org/apache/commons/scxml2/env/jexl/microwave-03.xml");
-        microwave04 = this.getClass().getClassLoader().
-            getResource("org/apache/commons/scxml2/env/jexl/microwave-04.xml");
-        transitions01 = this.getClass().getClassLoader().
-            getResource("org/apache/commons/scxml2/transitions-01.xml");
-        send01 = this.getClass().getClassLoader().
-            getResource("org/apache/commons/scxml2/send-01.xml");
-        prefix01 = this.getClass().getClassLoader().
-            getResource("org/apache/commons/scxml2/prefix-01.xml");
-        scxmlinitialattr = this.getClass().getClassLoader().
-            getResource("org/apache/commons/scxml2/io/scxml-initial-attr.xml");
-        action01 = this.getClass().getClassLoader().
-            getResource("org/apache/commons/scxml2/io/custom-action-body-test-1.xml");
-        scxmlWithInvalidElems = this.getClass().getClassLoader().
-            getResource("org/apache/commons/scxml2/io/scxml-with-invalid-elems.xml");
-        groovyClosure = this.getClass().getClassLoader().
-                getResource("org/apache/commons/scxml2/env/groovy/groovy-closure.xml");
-
         scxmlReaderLog = LogFactory.getLog(SCXMLReader.class);
         clearRecordedLogMessages();
     }
 
     /**
-     * Tear down instance variables required by this test case.
-     */
-    @After
-    public void after() {
-        microwave03 = microwave04 = transitions01 = prefix01 = send01 = action01 =
-                scxmlinitialattr = scxmlWithInvalidElems = groovyClosure = null;
-        scxml = null;
-        scxmlAsString = null;
-    }
-
-    /**
      * Test the implementation
      */    
     @Test
     public void testSCXMLReaderMicrowave03Sample() throws Exception {
-        scxml = SCXMLTestHelper.parse(microwave03);
+        SCXML scxml = SCXMLTestHelper.parse("org/apache/commons/scxml2/env/jexl/microwave-03.xml");
         Assert.assertNotNull(scxml);
-        scxmlAsString = serialize(scxml);
-        Assert.assertNotNull(scxmlAsString);
+        Assert.assertNotNull(serialize(scxml));
     }
     
     @Test
     public void testSCXMLReaderMicrowave04Sample() throws Exception {
-        scxml = SCXMLTestHelper.parse(microwave04);
+        SCXML scxml = SCXMLTestHelper.parse("org/apache/commons/scxml2/env/jexl/microwave-04.xml");
         Assert.assertNotNull(scxml);
-        scxmlAsString = serialize(scxml);
-        Assert.assertNotNull(scxmlAsString);
+        Assert.assertNotNull(serialize(scxml));
     }
     
     @Test
     public void testSCXMLReaderTransitions01Sample() throws Exception {
-        scxml = SCXMLTestHelper.parse(transitions01);
+        SCXML scxml = SCXMLTestHelper.parse("org/apache/commons/scxml2/transitions-01.xml");
         Assert.assertNotNull(scxml);
-        scxmlAsString = serialize(scxml);
-        Assert.assertNotNull(scxmlAsString);
+        Assert.assertNotNull(serialize(scxml));
     }
     
     @Test
     public void testSCXMLReaderPrefix01Sample() throws Exception {
-        scxml = SCXMLTestHelper.parse(prefix01);
+        SCXML scxml = SCXMLTestHelper.parse("org/apache/commons/scxml2/prefix-01.xml");
         Assert.assertNotNull(scxml);
-        scxmlAsString = serialize(scxml);
-        Assert.assertNotNull(scxmlAsString);
+        Assert.assertNotNull(serialize(scxml));
     }
     
     @Test
     public void testSCXMLReaderSend01Sample() throws Exception {
-        // Digest
-        scxml = SCXMLTestHelper.parse(send01);
+        SCXML scxml = SCXMLTestHelper.parse("org/apache/commons/scxml2/send-01.xml");
         State ten = (State) scxml.getInitialTransition().getTargets().iterator().next();
         Assert.assertEquals("ten", ten.getId());
         List<Transition> ten_done = ten.getTransitionsList("done.state.ten");
@@ -185,10 +142,9 @@ public class SCXMLReaderTest {
     
     @Test
     public void testSCXMLReaderInitialAttr() throws Exception {
-        scxml = SCXMLTestHelper.parse(scxmlinitialattr);
+        SCXML scxml = SCXMLTestHelper.parse("org/apache/commons/scxml2/io/scxml-initial-attr.xml");
         Assert.assertNotNull(scxml);
-        scxmlAsString = serialize(scxml);
-        Assert.assertNotNull(scxmlAsString);
+        Assert.assertNotNull(serialize(scxml));
         Final foo = (Final) scxml.getInitialTransition().getTargets().iterator().next();
         Assert.assertEquals("foo", foo.getId());
     }
@@ -217,7 +173,7 @@ public class SCXMLReaderTest {
         CustomAction ca = new CustomAction("http://my.custom-actions.domain",
             "action", MyAction.class);
         cas.add(ca);
-        scxml = SCXMLTestHelper.parse(action01, cas);
+        SCXML scxml = SCXMLTestHelper.parse("org/apache/commons/scxml2/io/custom-action-body-test-1.xml", cas);
         EnterableState state = (EnterableState) scxml.getInitialTransition().getTargets().iterator().next();
         Assert.assertEquals("actions", state.getId());
         List<Action> actions = state.getOnEntries().get(0).getActions();
@@ -232,10 +188,10 @@ public class SCXMLReaderTest {
         // In the default lenient/verbose mode (strict == false && silent == false),
         // the model exception should be just logged without a model exception.
         Configuration configuration = new Configuration();
-        scxml = SCXMLReader.read(scxmlWithInvalidElems, configuration);
+        SCXML scxml = SCXMLReader.read(SCXMLTestHelper.getResource("org/apache/commons/scxml2/io/scxml-with-invalid-elems.xml"),
+                        configuration);
         Assert.assertNotNull(scxml);
-        scxmlAsString = serialize(scxml);
-        Assert.assertNotNull(scxmlAsString);
+        Assert.assertNotNull(serialize(scxml));
         Final foo = (Final) scxml.getInitialTransition().getTargets().iterator().next();
         Assert.assertEquals("foo", foo.getId());
         Datamodel dataModel = scxml.getDatamodel();
@@ -243,10 +199,10 @@ public class SCXMLReaderTest {
         List<Data> dataList = dataModel.getData();
         Assert.assertEquals(1, dataList.size());
         Assert.assertEquals("time", dataList.get(0).getId());
-        assertContainsRecordedLogMessage("Ignoring unknown or invalid element <baddata> in namespace \"http://www.w3.org/2005/07/scxml\" as child  of <datamodel>");
-        assertContainsRecordedLogMessage("Ignoring unknown or invalid element <baddata> in namespace \"http://www.example.com/scxml\" as child  of <datamodel>");
-        assertContainsRecordedLogMessage("Ignoring unknown or invalid element <trace> in namespace \"http://www.w3.org/2005/07/scxml\" as child  of <onentry>");
-        assertContainsRecordedLogMessage("Ignoring unknown or invalid element <onbeforeexit> in namespace \"http://www.w3.org/2005/07/scxml\" as child  of <final>");
+        assertContainsRecordedLogMessage("Ignoring unknown or invalid element <baddata> in namespace \"http://www.w3.org/2005/07/scxml\" as child of <datamodel>");
+        assertContainsRecordedLogMessage("Ignoring unknown or invalid element <baddata> in namespace \"http://www.example.com/scxml\" as child of <datamodel>");
+        assertContainsRecordedLogMessage("Ignoring unknown or invalid element <trace> in namespace \"http://www.w3.org/2005/07/scxml\" as child of <onentry>");
+        assertContainsRecordedLogMessage("Ignoring unknown or invalid element <onbeforeexit> in namespace \"http://www.w3.org/2005/07/scxml\" as child of <final>");
 
         // In the lenient/silent mode (strict == false && silent == true),
         // no model exception is logged.
@@ -255,10 +211,10 @@ public class SCXMLReaderTest {
         configuration = new Configuration();
         configuration.setStrict(false);
         configuration.setSilent(true);
-        scxml = SCXMLReader.read(scxmlWithInvalidElems, configuration);
+        scxml = SCXMLReader.read(SCXMLTestHelper.getResource("org/apache/commons/scxml2/io/scxml-with-invalid-elems.xml"),
+                configuration);
         Assert.assertNotNull(scxml);
-        scxmlAsString = serialize(scxml);
-        Assert.assertNotNull(scxmlAsString);
+        Assert.assertNotNull(serialize(scxml));
         foo = (Final) scxml.getInitialTransition().getTargets().iterator().next();
         Assert.assertEquals("foo", foo.getId());
         dataModel = scxml.getDatamodel();
@@ -266,10 +222,10 @@ public class SCXMLReaderTest {
         dataList = dataModel.getData();
         Assert.assertEquals(1, dataList.size());
         Assert.assertEquals("time", dataList.get(0).getId());
-        assertNotContainsRecordedLogMessage("Ignoring unknown or invalid element <baddata> in namespace \"http://www.w3.org/2005/07/scxml\" as child  of <datamodel>");
-        assertNotContainsRecordedLogMessage("Ignoring unknown or invalid element <baddata> in namespace \"http://www.example.com/scxml\" as child  of <datamodel>");
-        assertNotContainsRecordedLogMessage("Ignoring unknown or invalid element <trace> in namespace \"http://www.w3.org/2005/07/scxml\" as child  of <onentry>");
-        assertNotContainsRecordedLogMessage("Ignoring unknown or invalid element <onbeforeexit> in namespace \"http://www.w3.org/2005/07/scxml\" as child  of <final>");
+        assertNotContainsRecordedLogMessage("Ignoring unknown or invalid element <baddata> in namespace \"http://www.w3.org/2005/07/scxml\" as child of <datamodel>");
+        assertNotContainsRecordedLogMessage("Ignoring unknown or invalid element <baddata> in namespace \"http://www.example.com/scxml\" as child of <datamodel>");
+        assertNotContainsRecordedLogMessage("Ignoring unknown or invalid element <trace> in namespace \"http://www.w3.org/2005/07/scxml\" as child of <onentry>");
+        assertNotContainsRecordedLogMessage("Ignoring unknown or invalid element <onbeforeexit> in namespace \"http://www.w3.org/2005/07/scxml\" as child of <final>");
 
         // In strict/verbose mode (strict == true && silent == false), it should fail to read the model and catch a model exception
         // with warning logs because of the invalid <baddata> element.
@@ -279,15 +235,16 @@ public class SCXMLReaderTest {
         configuration.setStrict(true);
         configuration.setSilent(false);
         try {
-            scxml = SCXMLReader.read(scxmlWithInvalidElems, configuration);
+            scxml = SCXMLReader.read(SCXMLTestHelper.getResource("org/apache/commons/scxml2/io/scxml-with-invalid-elems.xml"),
+                    configuration);
             Assert.fail("In strict mode, it should have thrown a model exception.");
         } catch (ModelException e) {
             Assert.assertTrue(e.getMessage().contains("Ignoring unknown or invalid element <baddata>"));
         }
-        assertContainsRecordedLogMessage("Ignoring unknown or invalid element <baddata> in namespace \"http://www.w3.org/2005/07/scxml\" as child  of <datamodel>");
-        assertContainsRecordedLogMessage("Ignoring unknown or invalid element <baddata> in namespace \"http://www.example.com/scxml\" as child  of <datamodel>");
-        assertContainsRecordedLogMessage("Ignoring unknown or invalid element <trace> in namespace \"http://www.w3.org/2005/07/scxml\" as child  of <onentry>");
-        assertContainsRecordedLogMessage("Ignoring unknown or invalid element <onbeforeexit> in namespace \"http://www.w3.org/2005/07/scxml\" as child  of <final>");
+        assertContainsRecordedLogMessage("Ignoring unknown or invalid element <baddata> in namespace \"http://www.w3.org/2005/07/scxml\" as child of <datamodel>");
+        assertContainsRecordedLogMessage("Ignoring unknown or invalid element <baddata> in namespace \"http://www.example.com/scxml\" as child of <datamodel>");
+        assertContainsRecordedLogMessage("Ignoring unknown or invalid element <trace> in namespace \"http://www.w3.org/2005/07/scxml\" as child of <onentry>");
+        assertContainsRecordedLogMessage("Ignoring unknown or invalid element <onbeforeexit> in namespace \"http://www.w3.org/2005/07/scxml\" as child of <final>");
 
         // In strict/silent mode (strict == true && silent == true), it should fail to read the model and catch a model exception
         // without warning logs because of the invalid <baddata> element.
@@ -297,23 +254,24 @@ public class SCXMLReaderTest {
         configuration.setStrict(true);
         configuration.setSilent(true);
         try {
-            scxml = SCXMLReader.read(scxmlWithInvalidElems, configuration);
+            scxml = SCXMLReader.read(SCXMLTestHelper.getResource("org/apache/commons/scxml2/io/scxml-with-invalid-elems.xml"),
+                    configuration);
             Assert.fail("In strict mode, it should have thrown a model exception.");
         } catch (ModelException e) {
             Assert.assertTrue(e.getMessage().contains("Ignoring unknown or invalid element <baddata>"));
         }
-        assertNotContainsRecordedLogMessage("Ignoring unknown or invalid element <baddata> in namespace \"http://www.w3.org/2005/07/scxml\" as child  of <datamodel>");
-        assertNotContainsRecordedLogMessage("Ignoring unknown or invalid element <baddata> in namespace \"http://www.example.com/scxml\" as child  of <datamodel>");
-        assertNotContainsRecordedLogMessage("Ignoring unknown or invalid element <trace> in namespace \"http://www.w3.org/2005/07/scxml\" as child  of <onentry>");
-        assertNotContainsRecordedLogMessage("Ignoring unknown or invalid element <onbeforeexit> in namespace \"http://www.w3.org/2005/07/scxml\" as child  of <final>");
+        assertNotContainsRecordedLogMessage("Ignoring unknown or invalid element <baddata> in namespace \"http://www.w3.org/2005/07/scxml\" as child of <datamodel>");
+        assertNotContainsRecordedLogMessage("Ignoring unknown or invalid element <baddata> in namespace \"http://www.example.com/scxml\" as child of <datamodel>");
+        assertNotContainsRecordedLogMessage("Ignoring unknown or invalid element <trace> in namespace \"http://www.w3.org/2005/07/scxml\" as child of <onentry>");
+        assertNotContainsRecordedLogMessage("Ignoring unknown or invalid element <onbeforeexit> in namespace \"http://www.w3.org/2005/07/scxml\" as child of <final>");
     }
 
     @Test
     public void testSCXMLReaderGroovyClosure() throws Exception {
-        scxml = SCXMLTestHelper.parse(groovyClosure);
+        SCXML scxml = SCXMLTestHelper.parse("org/apache/commons/scxml2/env/groovy/groovy-closure.xml");
         Assert.assertNotNull(scxml);
         Assert.assertNotNull(scxml.getGlobalScript());
-        scxmlAsString = serialize(scxml);
+        String scxmlAsString = serialize(scxml);
         Assert.assertNotNull(scxmlAsString);
         scxml = SCXMLTestHelper.parse(new StringReader(scxmlAsString), null);
         Assert.assertNotNull(scxml);
@@ -321,7 +279,7 @@ public class SCXMLReaderTest {
     }
 
     private String serialize(final SCXML scxml) throws IOException, XMLStreamException {
-        scxmlAsString = SCXMLWriter.write(scxml);
+        String scxmlAsString = SCXMLWriter.write(scxml);
         Assert.assertNotNull(scxmlAsString);
         return scxmlAsString;
     }
@@ -329,14 +287,14 @@ public class SCXMLReaderTest {
     private void assertContainsRecordedLogMessage(final String message) {
         if (scxmlReaderLog instanceof RecordingSimpleLog) {
             Assert.assertTrue(((RecordingSimpleLog) scxmlReaderLog).containsMessage(
-                    "Ignoring unknown or invalid element <baddata> in namespace \"http://www.w3.org/2005/07/scxml\" as child  of <datamodel>"));
+                    "Ignoring unknown or invalid element <baddata> in namespace \"http://www.w3.org/2005/07/scxml\" as child of <datamodel>"));
         }
     }
 
     private void assertNotContainsRecordedLogMessage(final String message) {
         if (scxmlReaderLog instanceof RecordingSimpleLog) {
             Assert.assertFalse(((RecordingSimpleLog) scxmlReaderLog).containsMessage(
-                    "Ignoring unknown or invalid element <baddata> in namespace \"http://www.w3.org/2005/07/scxml\" as child  of <datamodel>"));
+                    "Ignoring unknown or invalid element <baddata> in namespace \"http://www.w3.org/2005/07/scxml\" as child of <datamodel>"));
         }
     }
 

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/SCXMLRequiredAttributesTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/SCXMLRequiredAttributesTest.java?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/SCXMLRequiredAttributesTest.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/SCXMLRequiredAttributesTest.java Sat Oct 25 15:24:25 2014
@@ -20,8 +20,6 @@ import java.io.StringReader;
 
 import org.apache.commons.scxml2.SCXMLExecutor;
 import org.apache.commons.scxml2.SCXMLTestHelper;
-import org.apache.commons.scxml2.env.jexl.JexlContext;
-import org.apache.commons.scxml2.env.jexl.JexlEvaluator;
 import org.apache.commons.scxml2.model.ModelException;
 import org.apache.commons.scxml2.model.SCXML;
 import org.junit.Test;
@@ -43,7 +41,7 @@ import static org.junit.Assert.fail;
 public class SCXMLRequiredAttributesTest {
 
     private static final String VALID_SCXML =
-            "<scxml xmlns=\"http://www.w3.org/2005/07/scxml\" version=\"1.0\">\n" +
+            "<scxml xmlns=\"http://www.w3.org/2005/07/scxml\" datamodel=\"jexl\" version=\"1.0\">\n" +
                     "  <state id=\"s1\">\n" +
                     "    <transition target=\"fine\">\n" +
                     "      <if cond=\"true\"><log expr=\"'hello'\"/></if>\n" +
@@ -99,7 +97,7 @@ public class SCXMLRequiredAttributesTest
                     "</scxml>";
 
     private static final String SCXML_WITH_ASSIGN_WITHOUT_LOCATION =
-            "<scxml xmlns=\"http://www.w3.org/2005/07/scxml\" version=\"1.0\">\n" +
+            "<scxml xmlns=\"http://www.w3.org/2005/07/scxml\" datamodel=\"jexl\" version=\"1.0\">\n" +
                     "  <datamodel><data id=\"x\"></data></datamodel>\n" +
                     "  <state id=\"s1\">\n" +
                     "    <transition target=\"fine\">\n" +
@@ -150,7 +148,7 @@ public class SCXMLRequiredAttributesTest
                     "</scxml>";
 
     private static final String SCXML_WITH_FOREACH =
-            "<scxml xmlns=\"http://www.w3.org/2005/07/scxml\" version=\"1.0\">\n" +
+            "<scxml xmlns=\"http://www.w3.org/2005/07/scxml\" datamodel=\"jexl\" version=\"1.0\">\n" +
                     "  <state id=\"s1\">\n" +
                     "    <transition target=\"fine\">\n" +
                     "      <foreach array=\"[1,2]\" item=\"x\"></foreach>\n" +
@@ -162,8 +160,8 @@ public class SCXMLRequiredAttributesTest
     @Test
     public void testValidSCXML() throws Exception {
         SCXML scxml = SCXMLTestHelper.parse(new StringReader(VALID_SCXML), null);
-        assertNotNull(scxml);
-        SCXMLExecutor exec = executeSCXML(scxml);
+        SCXMLExecutor exec = SCXMLTestHelper.getExecutor(scxml);
+        exec.go();
         assertTrue(exec.getCurrentStatus().isFinal());
     }
 
@@ -236,8 +234,8 @@ public class SCXMLRequiredAttributesTest
     @Test
     public void testSCXMLWithAssignWithoutLocation() throws Exception {
         SCXML scxml = SCXMLTestHelper.parse(new StringReader(SCXML_WITH_ASSIGN_WITHOUT_LOCATION), null);
-        assertNotNull(scxml);
-        SCXMLExecutor exec = executeSCXML(scxml);
+        SCXMLExecutor exec = SCXMLTestHelper.getExecutor(scxml);
+        exec.go();
         assertTrue(exec.getCurrentStatus().isFinal());
     }
 
@@ -254,8 +252,7 @@ public class SCXMLRequiredAttributesTest
 
     @Test
     public void testSCXMLParamWithName() throws Exception {
-        SCXML scxml = SCXMLTestHelper.parse(new StringReader(SCXML_WITH_PARAM_AND_NAME), null);
-        assertNotNull(scxml);
+        SCXMLTestHelper.parse(new StringReader(SCXML_WITH_PARAM_AND_NAME), null);
         // Note: cannot execute this instance without providing proper <invoke> src attribute
     }
 
@@ -284,14 +281,8 @@ public class SCXMLRequiredAttributesTest
     @Test
     public void testSCXMLWithForEach() throws Exception {
         SCXML scxml = SCXMLTestHelper.parse(new StringReader(SCXML_WITH_FOREACH), null);
-        assertNotNull(scxml);
-        SCXMLExecutor exec = executeSCXML(scxml);
-        assertTrue(exec.getCurrentStatus().isFinal());
-    }
-
-    private SCXMLExecutor executeSCXML(SCXML scxml) throws Exception {
-        SCXMLExecutor exec = SCXMLTestHelper.getExecutor(scxml, new JexlContext(), new JexlEvaluator());
+        SCXMLExecutor exec = SCXMLTestHelper.getExecutor(scxml);
         exec.go();
-        return exec;
+        assertTrue(exec.getCurrentStatus().isFinal());
     }
 }

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/StateSrcTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/StateSrcTest.java?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/StateSrcTest.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/StateSrcTest.java Sat Oct 25 15:24:25 2014
@@ -16,60 +16,23 @@
  */
 package org.apache.commons.scxml2.io;
 
-import java.net.URL;
 import java.util.Set;
 
 import org.apache.commons.scxml2.SCXMLExecutor;
 import org.apache.commons.scxml2.SCXMLTestHelper;
 import org.apache.commons.scxml2.model.EnterableState;
 import org.apache.commons.scxml2.model.ModelException;
-import org.apache.commons.scxml2.model.SCXML;
-import org.junit.After;
 import org.junit.Assert;
-import org.junit.Before;
 import org.junit.Test;
 /**
  * Test white box nature of <state> element "src" attribute.
  */
 public class StateSrcTest {
 
-    // Test data
-    private URL src01, src04, src05;
-    private SCXML scxml;
-    private SCXMLExecutor exec;
-
-    /**
-     * Set up instance variables required by this test case.
-     */
-    @Before
-    public void setUp() {
-        src01 = this.getClass().getClassLoader().
-            getResource("org/apache/commons/scxml2/io/src-test-1.xml");
-        src04 = this.getClass().getClassLoader().
-            getResource("org/apache/commons/scxml2/io/src-test-4.xml");
-        src05 = this.getClass().getClassLoader().
-            getResource("org/apache/commons/scxml2/io/src-test-5.xml");
-    }
-
-    /**
-     * Tear down instance variables required by this test case.
-     */
-    @After
-    public void tearDown() {
-        src01 = src04 = src05 = null;
-        scxml = null;
-        exec = null;
-    }
-
-    /**
-     * Test the implementation
-     */    
     @Test
     public void testRecursiveSrcInclude() throws Exception {
-        scxml = SCXMLTestHelper.parse(src01);
-        Assert.assertNotNull(scxml);
-        exec = SCXMLTestHelper.getExecutor(scxml);
-        Assert.assertNotNull(exec);
+        SCXMLExecutor exec = SCXMLTestHelper.getExecutor("org/apache/commons/scxml2/io/src-test-1.xml");
+        exec.go();
         Set<EnterableState> states = exec.getCurrentStatus().getStates();
         Assert.assertEquals(1, states.size());
         Assert.assertEquals("srctest3", states.iterator().next().getId());
@@ -82,7 +45,7 @@ public class StateSrcTest {
     @Test
     public void testBadSrcInclude() throws Exception {
         try {
-            scxml = SCXMLReader.read(src04);
+            SCXMLReader.read(SCXMLTestHelper.getResource("org/apache/commons/scxml2/io/src-test-4.xml"));
             Assert.fail("Document with bad <state> src attribute shouldn't be parsed!");
         } catch (ModelException me) {
             Assert.assertTrue("Unexpected error message for bad <state> 'src' URI",
@@ -93,7 +56,7 @@ public class StateSrcTest {
     @Test
     public void testBadSrcFragmentInclude() throws Exception {
         try {
-            scxml = SCXMLReader.read(src05);
+            SCXMLReader.read(SCXMLTestHelper.getResource("org/apache/commons/scxml2/io/src-test-5.xml"));
             Assert.fail("Document with bad <state> src attribute shouldn't be parsed!");
         } catch (ModelException me) {
             Assert.assertTrue("Unexpected error message for bad <state> 'src' URI fragment",

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/custom-action-body-test-1.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/custom-action-body-test-1.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/custom-action-body-test-1.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/custom-action-body-test-1.xml Sat Oct 25 15:24:25 2014
@@ -19,6 +19,7 @@
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
        xmlns:my="http://my.custom-actions.domain"
        version="1.0"
+       datamodel="jexl"
        initial="actions">
 
     <final id="actions">

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/scxml-initial-attr.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/scxml-initial-attr.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/scxml-initial-attr.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/scxml-initial-attr.xml Sat Oct 25 15:24:25 2014
@@ -18,6 +18,7 @@
 <!-- Used for SrcTest.java in io package -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
        version="1.0"
+       datamodel="jexl"
        initial="foo">
 
     <final id="foo"/>

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/scxml-invalid-transition-targets-test1.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/scxml-invalid-transition-targets-test1.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/scxml-invalid-transition-targets-test1.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/scxml-invalid-transition-targets-test1.xml Sat Oct 25 15:24:25 2014
@@ -19,7 +19,7 @@
      will be marked invalid by ModuleUpdater#verifyTransitionTargets and according to the rules in
      http://www.w3.org/TR/scxml/#LegalStateConfigurations
 -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0"
+<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" datamodel="jexl"
        initial="s1s1p1s0 s1s1p1s1 s1s1p1s1s1">
   <state id="s1">
     <state id="s1s1">

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/scxml-invalid-transition-targets-test2.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/scxml-invalid-transition-targets-test2.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/scxml-invalid-transition-targets-test2.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/scxml-invalid-transition-targets-test2.xml Sat Oct 25 15:24:25 2014
@@ -19,7 +19,7 @@
      will be marked invalid by ModuleUpdater#verifyTransitionTargets and according to the rules in
      http://www.w3.org/TR/scxml/#LegalStateConfigurations
 -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0"
+<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" datamodel="jexl"
        initial="s1s1p1s0 s1s1p1s1 s1s1p2s0">
   <state id="s1">
     <state id="s1s1">

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/scxml-valid-transition-targets-test.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/scxml-valid-transition-targets-test.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/scxml-valid-transition-targets-test.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/scxml-valid-transition-targets-test.xml Sat Oct 25 15:24:25 2014
@@ -19,7 +19,7 @@
      can be reached as validated by ModuleUpdater#verifyTransitionTargets and according to the rules in
      http://www.w3.org/TR/scxml/#LegalStateConfigurations
 -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0"
+<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" datamodel="jexl"
        initial="s1s1p1s1 s1s1p1s2 s1s1p1s3">
   <state id="s1">
     <state id="s1s1">

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/scxml-with-invalid-elems.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/scxml-with-invalid-elems.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/scxml-with-invalid-elems.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/scxml-with-invalid-elems.xml Sat Oct 25 15:24:25 2014
@@ -19,6 +19,7 @@
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
        xmlns:example="http://www.example.com/scxml"
        version="1.0"
+       datamodel="jexl"
        initial="foo">
 
   <datamodel>

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-1.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-1.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-1.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-1.xml Sat Oct 25 15:24:25 2014
@@ -18,6 +18,7 @@
 <!-- Used for SrcTest.java in io package -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
        version="1.0"
+       datamodel="jexl"
        initial="srctest1">
 
     <state id="srctest1" src="src-test-2.xml">

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-2.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-2.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-2.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-2.xml Sat Oct 25 15:24:25 2014
@@ -18,6 +18,7 @@
 <!-- Used for SrcTest.java in io package -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
        version="1.0"
+       datamodel="jexl"
        initial="srctest2">
 
     <state id="srctest2" src="src-test-3.xml">

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-3.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-3.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-3.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-3.xml Sat Oct 25 15:24:25 2014
@@ -18,6 +18,7 @@
 <!-- Used for SrcTest.java in io package -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
        version="1.0"
+       datamodel="jexl"
        initial="srctest3">
 
     <state id="srctest3"/>

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-4.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-4.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-4.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-4.xml Sat Oct 25 15:24:25 2014
@@ -18,6 +18,7 @@
 <!-- Used for SrcTest.java in io package -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
        version="1.0"
+       datamodel="jexl"
        initial="srctest1">
 
     <state id="srctest1" src="bad-document-404.xml">

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-5.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-5.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-5.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-5.xml Sat Oct 25 15:24:25 2014
@@ -18,6 +18,7 @@
 <!-- Used for SrcTest.java in io package -->
 <scxml xmlns="http://www.w3.org/2005/07/scxml"
        version="1.0"
+       datamodel="jexl"
        initial="srctest1">
 
     <state id="srctest1" src="src-test-3.xml#badstateid404">

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/Issue112Test.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/Issue112Test.java?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/Issue112Test.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/Issue112Test.java Sat Oct 25 15:24:25 2014
@@ -16,7 +16,6 @@
  */
 package org.apache.commons.scxml2.issues;
 
-import java.net.URL;
 import java.util.ArrayList;
 import java.util.LinkedList;
 import java.util.List;
@@ -41,25 +40,11 @@ import org.junit.Test;
  */
 public class Issue112Test {
 
-    private URL queue01;
-    private SCXMLExecutor exec;
-
-    /**
-     * Set up instance variables required by this test case.
-     */
-    @Before
-    public void setUp() {
-        queue01 = this.getClass().getClassLoader().
-            getResource("org/apache/commons/scxml2/issues/queue-01.xml");
-    }
-
     /**
      * Tear down instance variables required by this test case.
      */
     @After
     public void tearDown() {
-        queue01 = null;
-        exec = null;
         Application.QUEUE.clear();
     }
 
@@ -69,14 +54,13 @@ public class Issue112Test {
     public void test01issue112() throws Exception {
 
         CustomAction ca1 =
-            new CustomAction("http://my.custom-actions.domain/CUSTOM",
-                             "enqueue", Enqueue.class);
+            new CustomAction("http://my.custom-actions.domain/CUSTOM", "enqueue", Enqueue.class);
         List<CustomAction> customActions = new ArrayList<CustomAction>();
         customActions.add(ca1);
 
-        SCXML scxml = SCXMLTestHelper.parse(queue01, customActions);
-
-        exec = SCXMLTestHelper.getExecutor(scxml);
+        SCXML scxml = SCXMLTestHelper.parse("org/apache/commons/scxml2/issues/queue-01.xml", customActions);
+        SCXMLExecutor exec = SCXMLTestHelper.getExecutor(scxml);
+        exec.go();
         Assert.assertEquals("init", exec.getCurrentStatus().getStates().
                 iterator().next().getId());
 

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/Issue62Test.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/Issue62Test.java?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/Issue62Test.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/Issue62Test.java Sat Oct 25 15:24:25 2014
@@ -16,16 +16,13 @@
  */
 package org.apache.commons.scxml2.issues;
 
-import java.net.URL;
 import java.util.Set;
 
 import org.apache.commons.scxml2.SCXMLExecutor;
 import org.apache.commons.scxml2.SCXMLTestHelper;
 import org.apache.commons.scxml2.model.EnterableState;
 
-import org.junit.After;
 import org.junit.Assert;
-import org.junit.Before;
 import org.junit.Test;
 
 /**
@@ -34,34 +31,10 @@ import org.junit.Test;
  */
 public class Issue62Test {
 
-    private URL test01, test02, test03;
-    private SCXMLExecutor exec;
-
-    /**
-     * Set up instance variables required by this test case.
-     */
-    @Before
-    public void setUp() {
-        test01 = this.getClass().getClassLoader().
-            getResource("org/apache/commons/scxml2/issues/issue62-01.xml");
-        test02 = this.getClass().getClassLoader().
-            getResource("org/apache/commons/scxml2/issues/issue62-02.xml");
-        test03 = this.getClass().getClassLoader().
-            getResource("org/apache/commons/scxml2/issues/issue62-03.xml");
-    }
-
-    /**
-     * Tear down instance variables required by this test case.
-     */
-    @After
-    public void tearDown() {
-        test01 = test02 = null;
-        exec = null;
-    }
-    
     @Test
     public void test01issue62() throws Exception {
-        exec = SCXMLTestHelper.getExecutor(test01);
+        SCXMLExecutor exec = SCXMLTestHelper.getExecutor("org/apache/commons/scxml2/issues/issue62-01.xml");
+        exec.go();
         Set<EnterableState> currentStates = exec.getCurrentStatus().getStates();
         Assert.assertEquals(1, currentStates.size());
         Assert.assertEquals("s1.1", currentStates.iterator().next().getId());
@@ -70,17 +43,19 @@ public class Issue62Test {
     
     @Test
     public void test02issue62() throws Exception {
-        exec = SCXMLTestHelper.getExecutor(test02);
-        fragmenttest();
+        SCXMLExecutor exec = SCXMLTestHelper.getExecutor("org/apache/commons/scxml2/issues/issue62-02.xml");
+        exec.go();
+        fragmenttest(exec);
     }
     
     @Test
     public void test03issue62() throws Exception {
-        exec = SCXMLTestHelper.getExecutor(SCXMLTestHelper.parse(test03));
-        fragmenttest();
+        SCXMLExecutor exec = SCXMLTestHelper.getExecutor("org/apache/commons/scxml2/issues/issue62-03.xml");
+        exec.go();
+        fragmenttest(exec);
     }
 
-    private void fragmenttest() throws Exception {
+    private void fragmenttest(SCXMLExecutor exec) throws Exception {
         Set<EnterableState> currentStates = exec.getCurrentStatus().getStates();
         Assert.assertEquals(1, currentStates.size());
         Assert.assertEquals("s1", currentStates.iterator().next().getId());

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/Issue64Test.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/Issue64Test.java?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/Issue64Test.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/Issue64Test.java Sat Oct 25 15:24:25 2014
@@ -16,12 +16,8 @@
  */
 package org.apache.commons.scxml2.issues;
 
-import java.net.URL;
-
 import org.apache.commons.scxml2.SCXMLExecutor;
 import org.apache.commons.scxml2.SCXMLTestHelper;
-import org.junit.After;
-import org.junit.Before;
 import org.junit.Test;
 
 /**
@@ -30,38 +26,17 @@ import org.junit.Test;
  */
 public class Issue64Test {
 
-    private URL works, fails;
-    private SCXMLExecutor exec;
-
-    /**
-     * Set up instance variables required by this test case.
-     */
-    @Before
-    public void setUp() {
-        works = this.getClass().getClassLoader().
-            getResource("org/apache/commons/scxml2/issues/issue64-01.xml");
-        fails = this.getClass().getClassLoader().
-            getResource("org/apache/commons/scxml2/issues/issue64-02.xml");
-    }
-
-    /**
-     * Tear down instance variables required by this test case.
-     */
-    @After
-    public void tearDown() {
-        works = fails = null;
-        exec = null;
-    }
-    
     @Test
     public void test01issue64() throws Exception {
-        exec = SCXMLTestHelper.getExecutor(SCXMLTestHelper.parse(works));
+        SCXMLExecutor exec = SCXMLTestHelper.getExecutor("org/apache/commons/scxml2/issues/issue64-01.xml");
+        exec.go();
         SCXMLTestHelper.assertPostTriggerState(exec, "show.bug", "end");
     }
     
     @Test
     public void test02issue64() throws Exception {
-        exec = SCXMLTestHelper.getExecutor(SCXMLTestHelper.parse(fails));
+        SCXMLExecutor exec = SCXMLTestHelper.getExecutor("org/apache/commons/scxml2/issues/issue64-02.xml");
+        exec.go();
         SCXMLTestHelper.assertPostTriggerState(exec, "show.bug", "end");
     }
 }

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/issue62-01-ext.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/issue62-01-ext.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/issue62-01-ext.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/issue62-01-ext.xml Sat Oct 25 15:24:25 2014
@@ -15,7 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
 -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0"
+<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" datamodel="jexl"
        initial="ext">
 
     <state id="ext">

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/issue62-01.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/issue62-01.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/issue62-01.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/issue62-01.xml Sat Oct 25 15:24:25 2014
@@ -15,7 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
 -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0"
+<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" datamodel="jexl"
        initial="s1">
 
     <state id="s1">

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/issue62-02-ext.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/issue62-02-ext.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/issue62-02-ext.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/issue62-02-ext.xml Sat Oct 25 15:24:25 2014
@@ -15,7 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
 -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0"
+<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" datamodel="jexl"
        initial="e1">
 
     <state id="e1">

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/issue62-02.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/issue62-02.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/issue62-02.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/issue62-02.xml Sat Oct 25 15:24:25 2014
@@ -15,7 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
 -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0"
+<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" datamodel="jexl"
        initial="s1">
 
     <state id="s1">

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/issue62-03-ext.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/issue62-03-ext.xml?rev=1634235&r1=1634234&r2=1634235&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/issue62-03-ext.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/issue62-03-ext.xml Sat Oct 25 15:24:25 2014
@@ -15,7 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
 -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0"
+<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" datamodel="jexl"
        initial="e1">
 
     <state id="e1">



Mime
View raw message