commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r899679 [17/23] - in /websites/production/commons/content/proper/commons-scxml: ./ 0.5/ 0.6/ 0.7/ 0.8/ 0.9/ apidocs/ apidocs/org/apache/commons/scxml2/ apidocs/org/apache/commons/scxml2/class-use/ apidocs/org/apache/commons/scxml2/env/ apid...
Date Sun, 02 Mar 2014 02:25:51 GMT
Modified: websites/production/commons/content/proper/commons-scxml/testapidocs/src-html/org/apache/commons/scxml2/model/StatelessModelTest.html
==============================================================================
--- websites/production/commons/content/proper/commons-scxml/testapidocs/src-html/org/apache/commons/scxml2/model/StatelessModelTest.html (original)
+++ websites/production/commons/content/proper/commons-scxml/testapidocs/src-html/org/apache/commons/scxml2/model/StatelessModelTest.html Sun Mar  2 02:25:48 2014
@@ -32,233 +32,198 @@
 <span class="sourceLineNo">024</span>import org.apache.commons.scxml2.SCXMLTestHelper;<a name="line.24"></a>
 <span class="sourceLineNo">025</span>import org.apache.commons.scxml2.TriggerEvent;<a name="line.25"></a>
 <span class="sourceLineNo">026</span>import org.apache.commons.scxml2.env.SimpleSCXMLListener;<a name="line.26"></a>
-<span class="sourceLineNo">027</span>import org.apache.commons.scxml2.env.jsp.ELContext;<a name="line.27"></a>
-<span class="sourceLineNo">028</span>import org.apache.commons.scxml2.env.jsp.ELEvaluator;<a name="line.28"></a>
-<span class="sourceLineNo">029</span>import org.junit.After;<a name="line.29"></a>
-<span class="sourceLineNo">030</span>import org.junit.Assert;<a name="line.30"></a>
-<span class="sourceLineNo">031</span>import org.junit.Before;<a name="line.31"></a>
-<span class="sourceLineNo">032</span>import org.junit.Test;<a name="line.32"></a>
-<span class="sourceLineNo">033</span>/**<a name="line.33"></a>
-<span class="sourceLineNo">034</span> * Unit tests {@link org.apache.commons.scxml2.SCXMLExecutor}.<a name="line.34"></a>
-<span class="sourceLineNo">035</span> */<a name="line.35"></a>
-<span class="sourceLineNo">036</span>public class StatelessModelTest {<a name="line.36"></a>
-<span class="sourceLineNo">037</span><a name="line.37"></a>
-<span class="sourceLineNo">038</span>    // Test data<a name="line.38"></a>
-<span class="sourceLineNo">039</span>    private URL stateless01jexl, stateless01jsp, stateless01par;<a name="line.39"></a>
-<span class="sourceLineNo">040</span>    private SCXML scxml01jexl, scxml01jsp, scxml01par, scxml02par;<a name="line.40"></a>
-<span class="sourceLineNo">041</span>    private SCXMLExecutor exec01, exec02;<a name="line.41"></a>
-<span class="sourceLineNo">042</span><a name="line.42"></a>
-<span class="sourceLineNo">043</span>    /**<a name="line.43"></a>
-<span class="sourceLineNo">044</span>     * Set up instance variables required by this test case.<a name="line.44"></a>
-<span class="sourceLineNo">045</span>     */<a name="line.45"></a>
-<span class="sourceLineNo">046</span>    @Before<a name="line.46"></a>
-<span class="sourceLineNo">047</span>    public void setUp() throws Exception {<a name="line.47"></a>
-<span class="sourceLineNo">048</span>        stateless01jexl = this.getClass().getClassLoader().<a name="line.48"></a>
-<span class="sourceLineNo">049</span>            getResource("org/apache/commons/scxml2/env/jexl/stateless-01.xml");<a name="line.49"></a>
-<span class="sourceLineNo">050</span>        stateless01jsp = this.getClass().getClassLoader().<a name="line.50"></a>
-<span class="sourceLineNo">051</span>            getResource("org/apache/commons/scxml2/env/jsp/stateless-01.xml");<a name="line.51"></a>
-<span class="sourceLineNo">052</span>        stateless01par = this.getClass().getClassLoader().<a name="line.52"></a>
-<span class="sourceLineNo">053</span>            getResource("org/apache/commons/scxml2/model/stateless-parallel-01.xml");<a name="line.53"></a>
-<span class="sourceLineNo">054</span>        scxml01jexl = SCXMLTestHelper.parse(stateless01jexl);<a name="line.54"></a>
-<span class="sourceLineNo">055</span>        scxml01jsp = SCXMLTestHelper.parse(stateless01jsp);<a name="line.55"></a>
-<span class="sourceLineNo">056</span>        scxml01par = SCXMLTestHelper.parse(stateless01par);<a name="line.56"></a>
-<span class="sourceLineNo">057</span>        scxml02par = SCXMLTestHelper.parse(stateless01par);<a name="line.57"></a>
-<span class="sourceLineNo">058</span>    }<a name="line.58"></a>
-<span class="sourceLineNo">059</span><a name="line.59"></a>
-<span class="sourceLineNo">060</span>    /**<a name="line.60"></a>
-<span class="sourceLineNo">061</span>     * Tear down instance variables required by this test case.<a name="line.61"></a>
-<span class="sourceLineNo">062</span>     */<a name="line.62"></a>
-<span class="sourceLineNo">063</span>    @After<a name="line.63"></a>
-<span class="sourceLineNo">064</span>    public void tearDown() {<a name="line.64"></a>
-<span class="sourceLineNo">065</span>        stateless01jexl = null;<a name="line.65"></a>
-<span class="sourceLineNo">066</span>    }<a name="line.66"></a>
-<span class="sourceLineNo">067</span><a name="line.67"></a>
-<span class="sourceLineNo">068</span>    /**<a name="line.68"></a>
-<span class="sourceLineNo">069</span>     * Test the stateless model, simultaneous executions, JEXL expressions<a name="line.69"></a>
-<span class="sourceLineNo">070</span>     */    <a name="line.70"></a>
-<span class="sourceLineNo">071</span>    @Test<a name="line.71"></a>
-<span class="sourceLineNo">072</span>    public void testStatelessModelSimultaneousJexl() throws Exception {<a name="line.72"></a>
-<span class="sourceLineNo">073</span>        // parse once, use many times<a name="line.73"></a>
-<span class="sourceLineNo">074</span>        exec01 = SCXMLTestHelper.getExecutor(scxml01jexl);<a name="line.74"></a>
-<span class="sourceLineNo">075</span>        Assert.assertNotNull(exec01);<a name="line.75"></a>
-<span class="sourceLineNo">076</span>        exec02 = SCXMLTestHelper.getExecutor(scxml01jexl);<a name="line.76"></a>
-<span class="sourceLineNo">077</span>        Assert.assertNotNull(exec02);<a name="line.77"></a>
-<span class="sourceLineNo">078</span>        Assert.assertFalse(exec01 == exec02);<a name="line.78"></a>
-<span class="sourceLineNo">079</span>        runSimultaneousTest();<a name="line.79"></a>
-<span class="sourceLineNo">080</span>    }<a name="line.80"></a>
-<span class="sourceLineNo">081</span><a name="line.81"></a>
-<span class="sourceLineNo">082</span>    /**<a name="line.82"></a>
-<span class="sourceLineNo">083</span>     * Test the stateless model, sequential executions, JEXL expressions<a name="line.83"></a>
-<span class="sourceLineNo">084</span>     */    <a name="line.84"></a>
-<span class="sourceLineNo">085</span>    @Test<a name="line.85"></a>
-<span class="sourceLineNo">086</span>    public void testStatelessModelSequentialJexl() throws Exception {<a name="line.86"></a>
-<span class="sourceLineNo">087</span>        // rinse and repeat<a name="line.87"></a>
-<span class="sourceLineNo">088</span>        for (int i = 0; i &lt; 3; i++) {<a name="line.88"></a>
-<span class="sourceLineNo">089</span>            exec01 = SCXMLTestHelper.getExecutor(scxml01jexl);<a name="line.89"></a>
-<span class="sourceLineNo">090</span>            Assert.assertNotNull(exec01);<a name="line.90"></a>
-<span class="sourceLineNo">091</span>            runSequentialTest();<a name="line.91"></a>
-<span class="sourceLineNo">092</span>        }<a name="line.92"></a>
-<span class="sourceLineNo">093</span>    }<a name="line.93"></a>
-<span class="sourceLineNo">094</span><a name="line.94"></a>
-<span class="sourceLineNo">095</span>    /**<a name="line.95"></a>
-<span class="sourceLineNo">096</span>     * Test the stateless model, simultaneous executions, EL expressions<a name="line.96"></a>
-<span class="sourceLineNo">097</span>     */    <a name="line.97"></a>
-<span class="sourceLineNo">098</span>    @Test<a name="line.98"></a>
-<span class="sourceLineNo">099</span>    public void testStatelessModelSimultaneousEl() throws Exception {<a name="line.99"></a>
-<span class="sourceLineNo">100</span>        // parse once, use many times<a name="line.100"></a>
-<span class="sourceLineNo">101</span>        exec01 = SCXMLTestHelper.getExecutor(scxml01jsp,<a name="line.101"></a>
-<span class="sourceLineNo">102</span>            new ELContext(), new ELEvaluator());<a name="line.102"></a>
-<span class="sourceLineNo">103</span>        Assert.assertNotNull(exec01);<a name="line.103"></a>
-<span class="sourceLineNo">104</span>        exec02 = SCXMLTestHelper.getExecutor(scxml01jsp,<a name="line.104"></a>
-<span class="sourceLineNo">105</span>            new ELContext(), new ELEvaluator());<a name="line.105"></a>
-<span class="sourceLineNo">106</span>        Assert.assertNotNull(exec02);<a name="line.106"></a>
-<span class="sourceLineNo">107</span>        Assert.assertFalse(exec01 == exec02);<a name="line.107"></a>
-<span class="sourceLineNo">108</span>        runSimultaneousTest();<a name="line.108"></a>
-<span class="sourceLineNo">109</span>    }<a name="line.109"></a>
-<span class="sourceLineNo">110</span><a name="line.110"></a>
-<span class="sourceLineNo">111</span>    /**<a name="line.111"></a>
-<span class="sourceLineNo">112</span>     * Test the stateless model, sequential executions, EL expressions<a name="line.112"></a>
-<span class="sourceLineNo">113</span>     */    <a name="line.113"></a>
-<span class="sourceLineNo">114</span>    @Test<a name="line.114"></a>
-<span class="sourceLineNo">115</span>    public void testStatelessModelSequentialEl() throws Exception {<a name="line.115"></a>
-<span class="sourceLineNo">116</span>        // rinse and repeat<a name="line.116"></a>
-<span class="sourceLineNo">117</span>        for (int i = 0; i &lt; 3; i++) {<a name="line.117"></a>
-<span class="sourceLineNo">118</span>            exec01 = SCXMLTestHelper.getExecutor(scxml01jsp,<a name="line.118"></a>
-<span class="sourceLineNo">119</span>                new ELContext(), new ELEvaluator());<a name="line.119"></a>
-<span class="sourceLineNo">120</span>            Assert.assertNotNull(exec01);<a name="line.120"></a>
-<span class="sourceLineNo">121</span>            runSequentialTest();<a name="line.121"></a>
-<span class="sourceLineNo">122</span>        }<a name="line.122"></a>
-<span class="sourceLineNo">123</span>    }<a name="line.123"></a>
-<span class="sourceLineNo">124</span><a name="line.124"></a>
-<span class="sourceLineNo">125</span>    /**<a name="line.125"></a>
-<span class="sourceLineNo">126</span>     * Test sharing a single SCXML object between two executors<a name="line.126"></a>
-<span class="sourceLineNo">127</span>     */    <a name="line.127"></a>
-<span class="sourceLineNo">128</span>    @Test<a name="line.128"></a>
-<span class="sourceLineNo">129</span>    public void testStatelessModelParallelSharedSCXML() throws Exception {<a name="line.129"></a>
-<span class="sourceLineNo">130</span>        exec01 = SCXMLTestHelper.getExecutor(scxml01par);<a name="line.130"></a>
-<span class="sourceLineNo">131</span>        Assert.assertNotNull(exec01);<a name="line.131"></a>
-<span class="sourceLineNo">132</span>        exec02 = SCXMLTestHelper.getExecutor(scxml01par);<a name="line.132"></a>
-<span class="sourceLineNo">133</span>        Assert.assertNotNull(exec02);<a name="line.133"></a>
-<span class="sourceLineNo">134</span>        Assert.assertFalse(exec01 == exec02);<a name="line.134"></a>
-<span class="sourceLineNo">135</span><a name="line.135"></a>
-<span class="sourceLineNo">136</span>        Set&lt;TransitionTarget&gt; currentStates = exec01.getCurrentStatus().getStates();<a name="line.136"></a>
-<span class="sourceLineNo">137</span>        checkParallelStates(currentStates, "state1.init", "state2.init", "exec01");<a name="line.137"></a>
-<span class="sourceLineNo">138</span><a name="line.138"></a>
-<span class="sourceLineNo">139</span>        currentStates = exec02.getCurrentStatus().getStates();<a name="line.139"></a>
-<span class="sourceLineNo">140</span>        checkParallelStates(currentStates, "state1.init", "state2.init", "exec02");<a name="line.140"></a>
-<span class="sourceLineNo">141</span><a name="line.141"></a>
-<span class="sourceLineNo">142</span>        currentStates = fireEvent("state1.event", exec01);<a name="line.142"></a>
-<span class="sourceLineNo">143</span>        checkParallelStates(currentStates, "state1.final", "state2.init", "exec01");<a name="line.143"></a>
-<span class="sourceLineNo">144</span><a name="line.144"></a>
-<span class="sourceLineNo">145</span>        currentStates = fireEvent("state2.event", exec02);<a name="line.145"></a>
-<span class="sourceLineNo">146</span>        checkParallelStates(currentStates, "state1.init", "state2.final", "exec02");<a name="line.146"></a>
-<span class="sourceLineNo">147</span><a name="line.147"></a>
-<span class="sourceLineNo">148</span>        currentStates = fireEvent("state2.event", exec01);<a name="line.148"></a>
-<span class="sourceLineNo">149</span>        checkParallelStates(currentStates, "next", null, "exec01");<a name="line.149"></a>
-<span class="sourceLineNo">150</span><a name="line.150"></a>
-<span class="sourceLineNo">151</span>        currentStates = fireEvent("state1.event", exec02);<a name="line.151"></a>
-<span class="sourceLineNo">152</span>        checkParallelStates(currentStates, "next", null, "exec02");<a name="line.152"></a>
-<span class="sourceLineNo">153</span>    }<a name="line.153"></a>
-<span class="sourceLineNo">154</span><a name="line.154"></a>
-<span class="sourceLineNo">155</span>    /**<a name="line.155"></a>
-<span class="sourceLineNo">156</span>     * Test sharing two SCXML objects between one executor (not recommended)<a name="line.156"></a>
-<span class="sourceLineNo">157</span>     */    <a name="line.157"></a>
-<span class="sourceLineNo">158</span>    @Test<a name="line.158"></a>
-<span class="sourceLineNo">159</span>    public void testStatelessModelParallelSwapSCXML() throws Exception {<a name="line.159"></a>
-<span class="sourceLineNo">160</span>        exec01 = SCXMLTestHelper.getExecutor(scxml01par);<a name="line.160"></a>
-<span class="sourceLineNo">161</span>        Assert.assertNotNull(exec01);<a name="line.161"></a>
-<span class="sourceLineNo">162</span>        Assert.assertTrue(scxml01par != scxml02par);<a name="line.162"></a>
-<span class="sourceLineNo">163</span><a name="line.163"></a>
-<span class="sourceLineNo">164</span>        Set&lt;TransitionTarget&gt; currentStates = exec01.getCurrentStatus().getStates();<a name="line.164"></a>
-<span class="sourceLineNo">165</span>        checkParallelStates(currentStates, "state1.init", "state2.init", "exec01");<a name="line.165"></a>
-<span class="sourceLineNo">166</span><a name="line.166"></a>
-<span class="sourceLineNo">167</span>        currentStates = fireEvent("state1.event", exec01);<a name="line.167"></a>
-<span class="sourceLineNo">168</span>        checkParallelStates(currentStates, "state1.final", "state2.init", "exec01");<a name="line.168"></a>
-<span class="sourceLineNo">169</span>        exec01.setStateMachine(scxml02par);<a name="line.169"></a>
-<span class="sourceLineNo">170</span>        exec01.addListener(scxml02par, new SimpleSCXMLListener());<a name="line.170"></a>
-<span class="sourceLineNo">171</span><a name="line.171"></a>
-<span class="sourceLineNo">172</span>        currentStates = fireEvent("state2.event", exec01);<a name="line.172"></a>
-<span class="sourceLineNo">173</span>        checkParallelStates(currentStates, "next", null, "exec01");<a name="line.173"></a>
-<span class="sourceLineNo">174</span>    }<a name="line.174"></a>
-<span class="sourceLineNo">175</span><a name="line.175"></a>
-<span class="sourceLineNo">176</span>    private void checkParallelStates(Set&lt;TransitionTarget&gt; currentStates,<a name="line.176"></a>
-<span class="sourceLineNo">177</span>            String s1, String s2, String label) {<a name="line.177"></a>
-<span class="sourceLineNo">178</span>        Iterator&lt;TransitionTarget&gt; i = currentStates.iterator();<a name="line.178"></a>
-<span class="sourceLineNo">179</span>        Assert.assertTrue("Not enough states", i.hasNext());<a name="line.179"></a>
-<span class="sourceLineNo">180</span>        String cs1 = i.next().getId();<a name="line.180"></a>
-<span class="sourceLineNo">181</span>        String cs2 = null;<a name="line.181"></a>
-<span class="sourceLineNo">182</span>        if (s2 != null) {<a name="line.182"></a>
-<span class="sourceLineNo">183</span>            Assert.assertTrue("Not enough states, found one state: " + cs1, i.hasNext());<a name="line.183"></a>
-<span class="sourceLineNo">184</span>            cs2 = i.next().getId();<a name="line.184"></a>
-<span class="sourceLineNo">185</span>            Assert.assertFalse("Too many states", i.hasNext());<a name="line.185"></a>
-<span class="sourceLineNo">186</span>            if (s2.equals(cs2)) {<a name="line.186"></a>
-<span class="sourceLineNo">187</span>                cs2 = null;<a name="line.187"></a>
-<span class="sourceLineNo">188</span>            } else if (s1.equals(cs2)) {<a name="line.188"></a>
-<span class="sourceLineNo">189</span>                cs2 = null;<a name="line.189"></a>
-<span class="sourceLineNo">190</span>            } else {<a name="line.190"></a>
-<span class="sourceLineNo">191</span>                Assert.fail(label + " in unexpected state " + cs2);<a name="line.191"></a>
-<span class="sourceLineNo">192</span>            }<a name="line.192"></a>
-<span class="sourceLineNo">193</span>        } else {<a name="line.193"></a>
-<span class="sourceLineNo">194</span>            Assert.assertFalse("Too many states", i.hasNext());<a name="line.194"></a>
-<span class="sourceLineNo">195</span>        }<a name="line.195"></a>
-<span class="sourceLineNo">196</span>        if (s1 != null &amp;&amp; s1.equals(cs1)) {<a name="line.196"></a>
-<span class="sourceLineNo">197</span>            return;<a name="line.197"></a>
-<span class="sourceLineNo">198</span>        }<a name="line.198"></a>
-<span class="sourceLineNo">199</span>        if (s2 != null &amp;&amp; s2.equals(cs1)) {<a name="line.199"></a>
-<span class="sourceLineNo">200</span>            return;<a name="line.200"></a>
-<span class="sourceLineNo">201</span>        }<a name="line.201"></a>
-<span class="sourceLineNo">202</span>        Assert.fail(label + " in unexpected state " + cs1);<a name="line.202"></a>
-<span class="sourceLineNo">203</span>    }<a name="line.203"></a>
-<span class="sourceLineNo">204</span><a name="line.204"></a>
-<span class="sourceLineNo">205</span>    private void runSimultaneousTest() throws Exception {<a name="line.205"></a>
-<span class="sourceLineNo">206</span>        //// Interleaved<a name="line.206"></a>
-<span class="sourceLineNo">207</span>        // exec01<a name="line.207"></a>
-<span class="sourceLineNo">208</span>        Set&lt;TransitionTarget&gt; currentStates = exec01.getCurrentStatus().getStates();<a name="line.208"></a>
-<span class="sourceLineNo">209</span>        Assert.assertEquals(1, currentStates.size());<a name="line.209"></a>
-<span class="sourceLineNo">210</span>        Assert.assertEquals("ten", currentStates.iterator().next().getId());<a name="line.210"></a>
-<span class="sourceLineNo">211</span>        currentStates = fireEvent("ten.done", exec01);<a name="line.211"></a>
-<span class="sourceLineNo">212</span>        Assert.assertEquals(1, currentStates.size());<a name="line.212"></a>
-<span class="sourceLineNo">213</span>        Assert.assertEquals("twenty", currentStates.iterator().next().getId());<a name="line.213"></a>
-<span class="sourceLineNo">214</span>        // exec02<a name="line.214"></a>
-<span class="sourceLineNo">215</span>        currentStates = exec02.getCurrentStatus().getStates();<a name="line.215"></a>
-<span class="sourceLineNo">216</span>        Assert.assertEquals(1, currentStates.size());<a name="line.216"></a>
-<span class="sourceLineNo">217</span>        Assert.assertEquals("ten", currentStates.iterator().next().getId());<a name="line.217"></a>
-<span class="sourceLineNo">218</span>        // exec01<a name="line.218"></a>
-<span class="sourceLineNo">219</span>        currentStates = fireEvent("twenty.done", exec01);<a name="line.219"></a>
-<span class="sourceLineNo">220</span>        Assert.assertEquals(1, currentStates.size());<a name="line.220"></a>
-<span class="sourceLineNo">221</span>        Assert.assertEquals("thirty", currentStates.iterator().next().getId());<a name="line.221"></a>
-<span class="sourceLineNo">222</span>        // exec02<a name="line.222"></a>
-<span class="sourceLineNo">223</span>        currentStates = fireEvent("ten.done", exec02);<a name="line.223"></a>
-<span class="sourceLineNo">224</span>        Assert.assertEquals(1, currentStates.size());<a name="line.224"></a>
-<span class="sourceLineNo">225</span>        Assert.assertEquals("twenty", currentStates.iterator().next().getId());<a name="line.225"></a>
-<span class="sourceLineNo">226</span>        currentStates = fireEvent("twenty.done", exec02);<a name="line.226"></a>
-<span class="sourceLineNo">227</span>        Assert.assertEquals(1, currentStates.size());<a name="line.227"></a>
-<span class="sourceLineNo">228</span>        Assert.assertEquals("thirty", currentStates.iterator().next().getId());<a name="line.228"></a>
-<span class="sourceLineNo">229</span>    }<a name="line.229"></a>
-<span class="sourceLineNo">230</span><a name="line.230"></a>
-<span class="sourceLineNo">231</span>    private void runSequentialTest() throws Exception {<a name="line.231"></a>
-<span class="sourceLineNo">232</span>        Set&lt;TransitionTarget&gt; currentStates = exec01.getCurrentStatus().getStates();<a name="line.232"></a>
-<span class="sourceLineNo">233</span>        Assert.assertEquals(1, currentStates.size());<a name="line.233"></a>
-<span class="sourceLineNo">234</span>        Assert.assertEquals("ten", ((State)currentStates.iterator().<a name="line.234"></a>
-<span class="sourceLineNo">235</span>            next()).getId());<a name="line.235"></a>
-<span class="sourceLineNo">236</span>        currentStates = fireEvent("ten.done", exec01);<a name="line.236"></a>
-<span class="sourceLineNo">237</span>        Assert.assertEquals(1, currentStates.size());<a name="line.237"></a>
-<span class="sourceLineNo">238</span>        Assert.assertEquals("twenty", ((State)currentStates.iterator().<a name="line.238"></a>
-<span class="sourceLineNo">239</span>            next()).getId());<a name="line.239"></a>
-<span class="sourceLineNo">240</span>        currentStates = fireEvent("twenty.done", exec01);<a name="line.240"></a>
-<span class="sourceLineNo">241</span>        Assert.assertEquals(1, currentStates.size());<a name="line.241"></a>
-<span class="sourceLineNo">242</span>        Assert.assertEquals("thirty", ((State)currentStates.iterator().<a name="line.242"></a>
-<span class="sourceLineNo">243</span>            next()).getId());<a name="line.243"></a>
-<span class="sourceLineNo">244</span>    }<a name="line.244"></a>
-<span class="sourceLineNo">245</span><a name="line.245"></a>
-<span class="sourceLineNo">246</span>    private Set&lt;TransitionTarget&gt; fireEvent(String name, SCXMLExecutor exec) throws Exception {<a name="line.246"></a>
-<span class="sourceLineNo">247</span>        TriggerEvent[] evts = {new TriggerEvent(name,<a name="line.247"></a>
-<span class="sourceLineNo">248</span>                TriggerEvent.SIGNAL_EVENT, null)};<a name="line.248"></a>
-<span class="sourceLineNo">249</span>        exec.triggerEvents(evts);<a name="line.249"></a>
-<span class="sourceLineNo">250</span>        return exec.getCurrentStatus().getStates();<a name="line.250"></a>
-<span class="sourceLineNo">251</span>    }<a name="line.251"></a>
-<span class="sourceLineNo">252</span>}<a name="line.252"></a>
-<span class="sourceLineNo">253</span><a name="line.253"></a>
+<span class="sourceLineNo">027</span>import org.junit.After;<a name="line.27"></a>
+<span class="sourceLineNo">028</span>import org.junit.Assert;<a name="line.28"></a>
+<span class="sourceLineNo">029</span>import org.junit.Before;<a name="line.29"></a>
+<span class="sourceLineNo">030</span>import org.junit.Test;<a name="line.30"></a>
+<span class="sourceLineNo">031</span>/**<a name="line.31"></a>
+<span class="sourceLineNo">032</span> * Unit tests {@link org.apache.commons.scxml2.SCXMLExecutor}.<a name="line.32"></a>
+<span class="sourceLineNo">033</span> */<a name="line.33"></a>
+<span class="sourceLineNo">034</span>public class StatelessModelTest {<a name="line.34"></a>
+<span class="sourceLineNo">035</span><a name="line.35"></a>
+<span class="sourceLineNo">036</span>    // Test data<a name="line.36"></a>
+<span class="sourceLineNo">037</span>    private URL stateless01jexl, stateless01par;<a name="line.37"></a>
+<span class="sourceLineNo">038</span>    private SCXML scxml01jexl, scxml01par, scxml02par;<a name="line.38"></a>
+<span class="sourceLineNo">039</span>    private SCXMLExecutor exec01, exec02;<a name="line.39"></a>
+<span class="sourceLineNo">040</span><a name="line.40"></a>
+<span class="sourceLineNo">041</span>    /**<a name="line.41"></a>
+<span class="sourceLineNo">042</span>     * Set up instance variables required by this test case.<a name="line.42"></a>
+<span class="sourceLineNo">043</span>     */<a name="line.43"></a>
+<span class="sourceLineNo">044</span>    @Before<a name="line.44"></a>
+<span class="sourceLineNo">045</span>    public void setUp() throws Exception {<a name="line.45"></a>
+<span class="sourceLineNo">046</span>        stateless01jexl = this.getClass().getClassLoader().<a name="line.46"></a>
+<span class="sourceLineNo">047</span>            getResource("org/apache/commons/scxml2/env/jexl/stateless-01.xml");<a name="line.47"></a>
+<span class="sourceLineNo">048</span>        stateless01par = this.getClass().getClassLoader().<a name="line.48"></a>
+<span class="sourceLineNo">049</span>            getResource("org/apache/commons/scxml2/model/stateless-parallel-01.xml");<a name="line.49"></a>
+<span class="sourceLineNo">050</span>        scxml01jexl = SCXMLTestHelper.parse(stateless01jexl);<a name="line.50"></a>
+<span class="sourceLineNo">051</span>        scxml01par = SCXMLTestHelper.parse(stateless01par);<a name="line.51"></a>
+<span class="sourceLineNo">052</span>        scxml02par = SCXMLTestHelper.parse(stateless01par);<a name="line.52"></a>
+<span class="sourceLineNo">053</span>    }<a name="line.53"></a>
+<span class="sourceLineNo">054</span><a name="line.54"></a>
+<span class="sourceLineNo">055</span>    /**<a name="line.55"></a>
+<span class="sourceLineNo">056</span>     * Tear down instance variables required by this test case.<a name="line.56"></a>
+<span class="sourceLineNo">057</span>     */<a name="line.57"></a>
+<span class="sourceLineNo">058</span>    @After<a name="line.58"></a>
+<span class="sourceLineNo">059</span>    public void tearDown() {<a name="line.59"></a>
+<span class="sourceLineNo">060</span>        stateless01jexl = null;<a name="line.60"></a>
+<span class="sourceLineNo">061</span>    }<a name="line.61"></a>
+<span class="sourceLineNo">062</span><a name="line.62"></a>
+<span class="sourceLineNo">063</span>    /**<a name="line.63"></a>
+<span class="sourceLineNo">064</span>     * Test the stateless model, simultaneous executions, JEXL expressions<a name="line.64"></a>
+<span class="sourceLineNo">065</span>     */    <a name="line.65"></a>
+<span class="sourceLineNo">066</span>    @Test<a name="line.66"></a>
+<span class="sourceLineNo">067</span>    public void testStatelessModelSimultaneousJexl() throws Exception {<a name="line.67"></a>
+<span class="sourceLineNo">068</span>        // parse once, use many times<a name="line.68"></a>
+<span class="sourceLineNo">069</span>        exec01 = SCXMLTestHelper.getExecutor(scxml01jexl);<a name="line.69"></a>
+<span class="sourceLineNo">070</span>        Assert.assertNotNull(exec01);<a name="line.70"></a>
+<span class="sourceLineNo">071</span>        exec02 = SCXMLTestHelper.getExecutor(scxml01jexl);<a name="line.71"></a>
+<span class="sourceLineNo">072</span>        Assert.assertNotNull(exec02);<a name="line.72"></a>
+<span class="sourceLineNo">073</span>        Assert.assertFalse(exec01 == exec02);<a name="line.73"></a>
+<span class="sourceLineNo">074</span>        runSimultaneousTest();<a name="line.74"></a>
+<span class="sourceLineNo">075</span>    }<a name="line.75"></a>
+<span class="sourceLineNo">076</span><a name="line.76"></a>
+<span class="sourceLineNo">077</span>    /**<a name="line.77"></a>
+<span class="sourceLineNo">078</span>     * Test the stateless model, sequential executions, JEXL expressions<a name="line.78"></a>
+<span class="sourceLineNo">079</span>     */    <a name="line.79"></a>
+<span class="sourceLineNo">080</span>    @Test<a name="line.80"></a>
+<span class="sourceLineNo">081</span>    public void testStatelessModelSequentialJexl() throws Exception {<a name="line.81"></a>
+<span class="sourceLineNo">082</span>        // rinse and repeat<a name="line.82"></a>
+<span class="sourceLineNo">083</span>        for (int i = 0; i &lt; 3; i++) {<a name="line.83"></a>
+<span class="sourceLineNo">084</span>            exec01 = SCXMLTestHelper.getExecutor(scxml01jexl);<a name="line.84"></a>
+<span class="sourceLineNo">085</span>            Assert.assertNotNull(exec01);<a name="line.85"></a>
+<span class="sourceLineNo">086</span>            runSequentialTest();<a name="line.86"></a>
+<span class="sourceLineNo">087</span>        }<a name="line.87"></a>
+<span class="sourceLineNo">088</span>    }<a name="line.88"></a>
+<span class="sourceLineNo">089</span><a name="line.89"></a>
+<span class="sourceLineNo">090</span>    /**<a name="line.90"></a>
+<span class="sourceLineNo">091</span>     * Test sharing a single SCXML object between two executors<a name="line.91"></a>
+<span class="sourceLineNo">092</span>     */    <a name="line.92"></a>
+<span class="sourceLineNo">093</span>    @Test<a name="line.93"></a>
+<span class="sourceLineNo">094</span>    public void testStatelessModelParallelSharedSCXML() throws Exception {<a name="line.94"></a>
+<span class="sourceLineNo">095</span>        exec01 = SCXMLTestHelper.getExecutor(scxml01par);<a name="line.95"></a>
+<span class="sourceLineNo">096</span>        Assert.assertNotNull(exec01);<a name="line.96"></a>
+<span class="sourceLineNo">097</span>        exec02 = SCXMLTestHelper.getExecutor(scxml01par);<a name="line.97"></a>
+<span class="sourceLineNo">098</span>        Assert.assertNotNull(exec02);<a name="line.98"></a>
+<span class="sourceLineNo">099</span>        Assert.assertFalse(exec01 == exec02);<a name="line.99"></a>
+<span class="sourceLineNo">100</span><a name="line.100"></a>
+<span class="sourceLineNo">101</span>        Set&lt;TransitionTarget&gt; currentStates = exec01.getCurrentStatus().getStates();<a name="line.101"></a>
+<span class="sourceLineNo">102</span>        checkParallelStates(currentStates, "state1.init", "state2.init", "exec01");<a name="line.102"></a>
+<span class="sourceLineNo">103</span><a name="line.103"></a>
+<span class="sourceLineNo">104</span>        currentStates = exec02.getCurrentStatus().getStates();<a name="line.104"></a>
+<span class="sourceLineNo">105</span>        checkParallelStates(currentStates, "state1.init", "state2.init", "exec02");<a name="line.105"></a>
+<span class="sourceLineNo">106</span><a name="line.106"></a>
+<span class="sourceLineNo">107</span>        currentStates = fireEvent("state1.event", exec01);<a name="line.107"></a>
+<span class="sourceLineNo">108</span>        checkParallelStates(currentStates, "state1.final", "state2.init", "exec01");<a name="line.108"></a>
+<span class="sourceLineNo">109</span><a name="line.109"></a>
+<span class="sourceLineNo">110</span>        currentStates = fireEvent("state2.event", exec02);<a name="line.110"></a>
+<span class="sourceLineNo">111</span>        checkParallelStates(currentStates, "state1.init", "state2.final", "exec02");<a name="line.111"></a>
+<span class="sourceLineNo">112</span><a name="line.112"></a>
+<span class="sourceLineNo">113</span>        currentStates = fireEvent("state2.event", exec01);<a name="line.113"></a>
+<span class="sourceLineNo">114</span>        checkParallelStates(currentStates, "next", null, "exec01");<a name="line.114"></a>
+<span class="sourceLineNo">115</span><a name="line.115"></a>
+<span class="sourceLineNo">116</span>        currentStates = fireEvent("state1.event", exec02);<a name="line.116"></a>
+<span class="sourceLineNo">117</span>        checkParallelStates(currentStates, "next", null, "exec02");<a name="line.117"></a>
+<span class="sourceLineNo">118</span>    }<a name="line.118"></a>
+<span class="sourceLineNo">119</span><a name="line.119"></a>
+<span class="sourceLineNo">120</span>    /**<a name="line.120"></a>
+<span class="sourceLineNo">121</span>     * Test sharing two SCXML objects between one executor (not recommended)<a name="line.121"></a>
+<span class="sourceLineNo">122</span>     */    <a name="line.122"></a>
+<span class="sourceLineNo">123</span>    @Test<a name="line.123"></a>
+<span class="sourceLineNo">124</span>    public void testStatelessModelParallelSwapSCXML() throws Exception {<a name="line.124"></a>
+<span class="sourceLineNo">125</span>        exec01 = SCXMLTestHelper.getExecutor(scxml01par);<a name="line.125"></a>
+<span class="sourceLineNo">126</span>        Assert.assertNotNull(exec01);<a name="line.126"></a>
+<span class="sourceLineNo">127</span>        Assert.assertTrue(scxml01par != scxml02par);<a name="line.127"></a>
+<span class="sourceLineNo">128</span><a name="line.128"></a>
+<span class="sourceLineNo">129</span>        Set&lt;TransitionTarget&gt; currentStates = exec01.getCurrentStatus().getStates();<a name="line.129"></a>
+<span class="sourceLineNo">130</span>        checkParallelStates(currentStates, "state1.init", "state2.init", "exec01");<a name="line.130"></a>
+<span class="sourceLineNo">131</span><a name="line.131"></a>
+<span class="sourceLineNo">132</span>        currentStates = fireEvent("state1.event", exec01);<a name="line.132"></a>
+<span class="sourceLineNo">133</span>        checkParallelStates(currentStates, "state1.final", "state2.init", "exec01");<a name="line.133"></a>
+<span class="sourceLineNo">134</span>        exec01.setStateMachine(scxml02par);<a name="line.134"></a>
+<span class="sourceLineNo">135</span>        exec01.addListener(scxml02par, new SimpleSCXMLListener());<a name="line.135"></a>
+<span class="sourceLineNo">136</span><a name="line.136"></a>
+<span class="sourceLineNo">137</span>        currentStates = fireEvent("state2.event", exec01);<a name="line.137"></a>
+<span class="sourceLineNo">138</span>        checkParallelStates(currentStates, "next", null, "exec01");<a name="line.138"></a>
+<span class="sourceLineNo">139</span>    }<a name="line.139"></a>
+<span class="sourceLineNo">140</span><a name="line.140"></a>
+<span class="sourceLineNo">141</span>    private void checkParallelStates(Set&lt;TransitionTarget&gt; currentStates,<a name="line.141"></a>
+<span class="sourceLineNo">142</span>            String s1, String s2, String label) {<a name="line.142"></a>
+<span class="sourceLineNo">143</span>        Iterator&lt;TransitionTarget&gt; i = currentStates.iterator();<a name="line.143"></a>
+<span class="sourceLineNo">144</span>        Assert.assertTrue("Not enough states", i.hasNext());<a name="line.144"></a>
+<span class="sourceLineNo">145</span>        String cs1 = i.next().getId();<a name="line.145"></a>
+<span class="sourceLineNo">146</span>        String cs2;<a name="line.146"></a>
+<span class="sourceLineNo">147</span>        if (s2 != null) {<a name="line.147"></a>
+<span class="sourceLineNo">148</span>            Assert.assertTrue("Not enough states, found one state: " + cs1, i.hasNext());<a name="line.148"></a>
+<span class="sourceLineNo">149</span>            cs2 = i.next().getId();<a name="line.149"></a>
+<span class="sourceLineNo">150</span>            Assert.assertFalse("Too many states", i.hasNext());<a name="line.150"></a>
+<span class="sourceLineNo">151</span>            if (s2.equals(cs2)) {<a name="line.151"></a>
+<span class="sourceLineNo">152</span>                cs2 = null;<a name="line.152"></a>
+<span class="sourceLineNo">153</span>            } else if (s1.equals(cs2)) {<a name="line.153"></a>
+<span class="sourceLineNo">154</span>                cs2 = null;<a name="line.154"></a>
+<span class="sourceLineNo">155</span>            } else {<a name="line.155"></a>
+<span class="sourceLineNo">156</span>                Assert.fail(label + " in unexpected state " + cs2);<a name="line.156"></a>
+<span class="sourceLineNo">157</span>            }<a name="line.157"></a>
+<span class="sourceLineNo">158</span>        } else {<a name="line.158"></a>
+<span class="sourceLineNo">159</span>            Assert.assertFalse("Too many states", i.hasNext());<a name="line.159"></a>
+<span class="sourceLineNo">160</span>        }<a name="line.160"></a>
+<span class="sourceLineNo">161</span>        if (s1 != null &amp;&amp; s1.equals(cs1)) {<a name="line.161"></a>
+<span class="sourceLineNo">162</span>            return;<a name="line.162"></a>
+<span class="sourceLineNo">163</span>        }<a name="line.163"></a>
+<span class="sourceLineNo">164</span>        if (s2 != null &amp;&amp; s2.equals(cs1)) {<a name="line.164"></a>
+<span class="sourceLineNo">165</span>            return;<a name="line.165"></a>
+<span class="sourceLineNo">166</span>        }<a name="line.166"></a>
+<span class="sourceLineNo">167</span>        Assert.fail(label + " in unexpected state " + cs1);<a name="line.167"></a>
+<span class="sourceLineNo">168</span>    }<a name="line.168"></a>
+<span class="sourceLineNo">169</span><a name="line.169"></a>
+<span class="sourceLineNo">170</span>    private void runSimultaneousTest() throws Exception {<a name="line.170"></a>
+<span class="sourceLineNo">171</span>        //// Interleaved<a name="line.171"></a>
+<span class="sourceLineNo">172</span>        // exec01<a name="line.172"></a>
+<span class="sourceLineNo">173</span>        Set&lt;TransitionTarget&gt; currentStates = exec01.getCurrentStatus().getStates();<a name="line.173"></a>
+<span class="sourceLineNo">174</span>        Assert.assertEquals(1, currentStates.size());<a name="line.174"></a>
+<span class="sourceLineNo">175</span>        Assert.assertEquals("ten", currentStates.iterator().next().getId());<a name="line.175"></a>
+<span class="sourceLineNo">176</span>        currentStates = fireEvent("ten.done", exec01);<a name="line.176"></a>
+<span class="sourceLineNo">177</span>        Assert.assertEquals(1, currentStates.size());<a name="line.177"></a>
+<span class="sourceLineNo">178</span>        Assert.assertEquals("twenty", currentStates.iterator().next().getId());<a name="line.178"></a>
+<span class="sourceLineNo">179</span>        // exec02<a name="line.179"></a>
+<span class="sourceLineNo">180</span>        currentStates = exec02.getCurrentStatus().getStates();<a name="line.180"></a>
+<span class="sourceLineNo">181</span>        Assert.assertEquals(1, currentStates.size());<a name="line.181"></a>
+<span class="sourceLineNo">182</span>        Assert.assertEquals("ten", currentStates.iterator().next().getId());<a name="line.182"></a>
+<span class="sourceLineNo">183</span>        // exec01<a name="line.183"></a>
+<span class="sourceLineNo">184</span>        currentStates = fireEvent("twenty.done", exec01);<a name="line.184"></a>
+<span class="sourceLineNo">185</span>        Assert.assertEquals(1, currentStates.size());<a name="line.185"></a>
+<span class="sourceLineNo">186</span>        Assert.assertEquals("thirty", currentStates.iterator().next().getId());<a name="line.186"></a>
+<span class="sourceLineNo">187</span>        // exec02<a name="line.187"></a>
+<span class="sourceLineNo">188</span>        currentStates = fireEvent("ten.done", exec02);<a name="line.188"></a>
+<span class="sourceLineNo">189</span>        Assert.assertEquals(1, currentStates.size());<a name="line.189"></a>
+<span class="sourceLineNo">190</span>        Assert.assertEquals("twenty", currentStates.iterator().next().getId());<a name="line.190"></a>
+<span class="sourceLineNo">191</span>        currentStates = fireEvent("twenty.done", exec02);<a name="line.191"></a>
+<span class="sourceLineNo">192</span>        Assert.assertEquals(1, currentStates.size());<a name="line.192"></a>
+<span class="sourceLineNo">193</span>        Assert.assertEquals("thirty", currentStates.iterator().next().getId());<a name="line.193"></a>
+<span class="sourceLineNo">194</span>    }<a name="line.194"></a>
+<span class="sourceLineNo">195</span><a name="line.195"></a>
+<span class="sourceLineNo">196</span>    private void runSequentialTest() throws Exception {<a name="line.196"></a>
+<span class="sourceLineNo">197</span>        Set&lt;TransitionTarget&gt; currentStates = exec01.getCurrentStatus().getStates();<a name="line.197"></a>
+<span class="sourceLineNo">198</span>        Assert.assertEquals(1, currentStates.size());<a name="line.198"></a>
+<span class="sourceLineNo">199</span>        Assert.assertEquals("ten", (currentStates.iterator().<a name="line.199"></a>
+<span class="sourceLineNo">200</span>            next()).getId());<a name="line.200"></a>
+<span class="sourceLineNo">201</span>        currentStates = fireEvent("ten.done", exec01);<a name="line.201"></a>
+<span class="sourceLineNo">202</span>        Assert.assertEquals(1, currentStates.size());<a name="line.202"></a>
+<span class="sourceLineNo">203</span>        Assert.assertEquals("twenty", (currentStates.iterator().<a name="line.203"></a>
+<span class="sourceLineNo">204</span>            next()).getId());<a name="line.204"></a>
+<span class="sourceLineNo">205</span>        currentStates = fireEvent("twenty.done", exec01);<a name="line.205"></a>
+<span class="sourceLineNo">206</span>        Assert.assertEquals(1, currentStates.size());<a name="line.206"></a>
+<span class="sourceLineNo">207</span>        Assert.assertEquals("thirty", (currentStates.iterator().<a name="line.207"></a>
+<span class="sourceLineNo">208</span>            next()).getId());<a name="line.208"></a>
+<span class="sourceLineNo">209</span>    }<a name="line.209"></a>
+<span class="sourceLineNo">210</span><a name="line.210"></a>
+<span class="sourceLineNo">211</span>    private Set&lt;TransitionTarget&gt; fireEvent(String name, SCXMLExecutor exec) throws Exception {<a name="line.211"></a>
+<span class="sourceLineNo">212</span>        TriggerEvent[] evts = {new TriggerEvent(name,<a name="line.212"></a>
+<span class="sourceLineNo">213</span>                TriggerEvent.SIGNAL_EVENT, null)};<a name="line.213"></a>
+<span class="sourceLineNo">214</span>        exec.triggerEvents(evts);<a name="line.214"></a>
+<span class="sourceLineNo">215</span>        return exec.getCurrentStatus().getStates();<a name="line.215"></a>
+<span class="sourceLineNo">216</span>    }<a name="line.216"></a>
+<span class="sourceLineNo">217</span>}<a name="line.217"></a>
+<span class="sourceLineNo">218</span><a name="line.218"></a>
 
 
 

Modified: websites/production/commons/content/proper/commons-scxml/usecases.html
==============================================================================
--- websites/production/commons/content/proper/commons-scxml/usecases.html (original)
+++ websites/production/commons/content/proper/commons-scxml/usecases.html Sun Mar  2 02:25:48 2014
@@ -78,7 +78,7 @@
 		              <a href="index.html" title="Overview">
     Overview</a>
   				</li>
- 																		                                                                                                                                                                                                              								<li class="collapsed">
+ 																		                                                                                                                                                                                            								<li class="collapsed">
 		              <a href="guide.html" title="User Guide">
     User Guide</a>
   									</li>
@@ -90,7 +90,7 @@
 		              <a href="faq.html" title="FAQ">
     FAQ</a>
   				</li>
- 																		                                                                                											<li class="expanded active">
+ 																		                          											<li class="expanded active">
 		              <a href="usecases.html" title="Usecases">
     Usecases</a>
   									<ul>
@@ -98,18 +98,6 @@
 		              <a href="usecases/scxml-stopwatch.html" title="SCXML Stopwatch">
     SCXML Stopwatch</a>
   				</li>
- 																		<li class="none">
-		              <a href="usecases/scxml-in-rdc-group.html" title="SCXML in RDC group container">
-    SCXML in RDC group container</a>
-  				</li>
- 																		<li class="none">
-		              <a href="usecases/scxml-in-shale-dialogs.html" title="SCXML in Shale dialogs">
-    SCXML in Shale dialogs</a>
-  				</li>
- 																		<li class="none">
-		              <a href="usecases/scxml-stopwatch-on-android.html" title="SCXML in Google Android">
-    SCXML in Google Android</a>
-  				</li>
  										</ul>
 							</li>
  														<li class="none">
@@ -315,30 +303,6 @@
     
    </div>
    
-<div class="section">
-<h3>Advanced<a name="Advanced"></a></h3>
-    
-<p>These are usecases within frameworks available in the open source
-       community, and are labeled advanced since they require some additional
-       knowledge about the framework relevant to the particular usecase.
-       </p>
-<ul>
-        
-<li><a href="usecases/scxml-in-rdc-group.html">Usecase 2</a> - Use in
-        <a class="externalLink" href="http://jakarta.apache.org/taglibs/doc/rdc-doc/intro.html">
-        Reusable Dialog Components (RDC) Framework</a> &lt;group&gt;
-        container.</li>
-        
-<li><a href="usecases/scxml-in-shale-dialogs.html">Usecase 3</a> -
-        Use in <a class="externalLink" href="http://shale.apache.org/">Shale</a> dialogs</li>
-        
-<li><a href="usecases/scxml-stopwatch-on-android.html">Usecase 4</a> -
-        SCXML stopwatch example in <a class="externalLink" href="http://code.google.com/android/">Google Android</a>
-        </li>
-       </ul>
-    
-   </div>
-   
 <p>If you know of another usecase we should list or if you are interesting
    in seeing if SCXML fits a usecase you have in mind, contact us via the
    <a href="mail-lists.html">mailing lists</a>.

Modified: websites/production/commons/content/proper/commons-scxml/usecases/scxml-stopwatch.html
==============================================================================
--- websites/production/commons/content/proper/commons-scxml/usecases/scxml-stopwatch.html (original)
+++ websites/production/commons/content/proper/commons-scxml/usecases/scxml-stopwatch.html Sun Mar  2 02:25:48 2014
@@ -78,7 +78,7 @@
 		              <a href="../index.html" title="Overview">
     Overview</a>
   				</li>
- 																		                                                                                                                                                                                                              								<li class="collapsed">
+ 																		                                                                                                                                                                                            								<li class="collapsed">
 		              <a href="../guide.html" title="User Guide">
     User Guide</a>
   									</li>
@@ -90,7 +90,7 @@
 		              <a href="../faq.html" title="FAQ">
     FAQ</a>
   				</li>
- 																		                                                                                      										<li class="expanded">
+ 																		                                										<li class="expanded">
 		              <a href="../usecases.html" title="Usecases">
     Usecases</a>
   									<ul>
@@ -98,18 +98,6 @@
 		              <a href="../usecases/scxml-stopwatch.html" title="SCXML Stopwatch">
     SCXML Stopwatch</a>
   				</li>
- 																		<li class="none">
-		              <a href="../usecases/scxml-in-rdc-group.html" title="SCXML in RDC group container">
-    SCXML in RDC group container</a>
-  				</li>
- 																		<li class="none">
-		              <a href="../usecases/scxml-in-shale-dialogs.html" title="SCXML in Shale dialogs">
-    SCXML in Shale dialogs</a>
-  				</li>
- 																		<li class="none">
-		              <a href="../usecases/scxml-stopwatch-on-android.html" title="SCXML in Google Android">
-    SCXML in Google Android</a>
-  				</li>
  										</ul>
 							</li>
  														<li class="none">
@@ -289,10 +277,7 @@
     
 <ul>
      
-<li>Demonstrate a &quot;standalone&quot; usecase of Commons SCXML
-         (some of the other usecases are &quot;frameworky&quot; in nature and require
-         additional knowledge of the framework the particular usecase
-         refers to).</li>
+<li>Demonstrate a &quot;standalone&quot; usecase of Commons SCXML</li>
      
 <li>Demonstrate the useful separation of concerns, the
          simplicity of the resulting artifacts, and the direct association

Modified: websites/production/commons/content/proper/commons-scxml/xref-test/allclasses-frame.html
==============================================================================
--- websites/production/commons/content/proper/commons-scxml/xref-test/allclasses-frame.html (original)
+++ websites/production/commons/content/proper/commons-scxml/xref-test/allclasses-frame.html Sun Mar  2 02:25:48 2014
@@ -48,9 +48,6 @@
 				<a href="org/apache/commons/scxml2/invoke/InvokeParamNameTest.html" target="classFrame">DummyInvoker</a>
 			</li>
 						<li>
-				<a href="org/apache/commons/scxml2/env/jsp/ELEvaluatorTest.html" target="classFrame">ELEvaluatorTest</a>
-			</li>
-						<li>
 				<a href="org/apache/commons/scxml2/issues/Issue112Test.html" target="classFrame">Enqueue</a>
 			</li>
 						<li>
@@ -120,9 +117,6 @@
 				<a href="org/apache/commons/scxml2/env/MockErrorReporter.html" target="classFrame">MockErrorReporter</a>
 			</li>
 						<li>
-				<a href="org/apache/commons/scxml2/env/jsp/MockJspContext.html" target="classFrame">MockJspContext</a>
-			</li>
-						<li>
 				<a href="org/apache/commons/scxml2/io/SCXMLReaderTest.html" target="classFrame">MyAction</a>
 			</li>
 						<li>
@@ -141,18 +135,6 @@
 				<a href="org/apache/commons/scxml2/io/SCXMLReaderTest.html" target="classFrame">RecordingSimpleLog</a>
 			</li>
 						<li>
-				<a href="org/apache/commons/scxml2/env/rhino/RhinoContextTest.html" target="classFrame">RhinoContextTest</a>
-			</li>
-						<li>
-				<a href="org/apache/commons/scxml2/env/rhino/RhinoEvaluatorTest.html" target="classFrame">RhinoEvaluatorTest</a>
-			</li>
-						<li>
-				<a href="org/apache/commons/scxml2/env/rhino/RhinoExampleTest.html" target="classFrame">RhinoExampleTest</a>
-			</li>
-						<li>
-				<a href="org/apache/commons/scxml2/env/jsp/RootContextTest.html" target="classFrame">RootContextTest</a>
-			</li>
-						<li>
 				<a href="org/apache/commons/scxml2/SCInstanceTest.html" target="classFrame">SCInstanceTest</a>
 			</li>
 						<li>
@@ -183,12 +165,6 @@
 				<a href="org/apache/commons/scxml2/env/groovy/SerializableInitialBaseScriptTest.html" target="classFrame">SerializableInitialBaseScriptTest</a>
 			</li>
 						<li>
-				<a href="org/apache/commons/scxml2/env/servlet/ServletContextResolverTest.html" target="classFrame">ServletContextResolverTest</a>
-			</li>
-						<li>
-				<a href="org/apache/commons/scxml2/env/faces/SessionContextTest.html" target="classFrame">SessionContextTest</a>
-			</li>
-						<li>
 				<a href="org/apache/commons/scxml2/env/SimpleContextTest.html" target="classFrame">SimpleContextTest</a>
 			</li>
 						<li>

Modified: websites/production/commons/content/proper/commons-scxml/xref-test/org/apache/commons/scxml2/NamespacePrefixedXPathsTest.html
==============================================================================
--- websites/production/commons/content/proper/commons-scxml/xref-test/org/apache/commons/scxml2/NamespacePrefixedXPathsTest.html (original)
+++ websites/production/commons/content/proper/commons-scxml/xref-test/org/apache/commons/scxml2/NamespacePrefixedXPathsTest.html Sun Mar  2 02:25:48 2014
@@ -27,110 +27,99 @@
 <a class="jxr_linenumber" name="L19" href="#L19">19</a>  <strong class="jxr_keyword">import</strong> java.net.URL;
 <a class="jxr_linenumber" name="L20" href="#L20">20</a>  <strong class="jxr_keyword">import</strong> java.util.Set;
 <a class="jxr_linenumber" name="L21" href="#L21">21</a>  
-<a class="jxr_linenumber" name="L22" href="#L22">22</a>  <strong class="jxr_keyword">import</strong> org.apache.commons.scxml2.env.jsp.ELContext;
-<a class="jxr_linenumber" name="L23" href="#L23">23</a>  <strong class="jxr_keyword">import</strong> org.apache.commons.scxml2.env.jsp.ELEvaluator;
-<a class="jxr_linenumber" name="L24" href="#L24">24</a>  <strong class="jxr_keyword">import</strong> org.apache.commons.scxml2.model.State;
-<a class="jxr_linenumber" name="L25" href="#L25">25</a>  <strong class="jxr_keyword">import</strong> org.apache.commons.scxml2.model.TransitionTarget;
-<a class="jxr_linenumber" name="L26" href="#L26">26</a>  <strong class="jxr_keyword">import</strong> org.junit.After;
-<a class="jxr_linenumber" name="L27" href="#L27">27</a>  <strong class="jxr_keyword">import</strong> org.junit.Assert;
-<a class="jxr_linenumber" name="L28" href="#L28">28</a>  <strong class="jxr_keyword">import</strong> org.junit.Before;
-<a class="jxr_linenumber" name="L29" href="#L29">29</a>  <strong class="jxr_keyword">import</strong> org.junit.Test;
-<a class="jxr_linenumber" name="L30" href="#L30">30</a>  
-<a class="jxr_linenumber" name="L31" href="#L31">31</a>  <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L32" href="#L32">32</a>  <em class="jxr_javadoccomment"> * Unit tests for namespace prefixes in XPaths pointing bits in a &amp;lt;data&amp;gt;.</em>
-<a class="jxr_linenumber" name="L33" href="#L33">33</a>  <em class="jxr_javadoccomment"> */</em>
-<a class="jxr_linenumber" name="L34" href="#L34">34</a>  <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../org/apache/commons/scxml2/NamespacePrefixedXPathsTest.html">NamespacePrefixedXPathsTest</a> {
-<a class="jxr_linenumber" name="L35" href="#L35">35</a>  
-<a class="jxr_linenumber" name="L36" href="#L36">36</a>      <em class="jxr_comment">// Test data</em>
-<a class="jxr_linenumber" name="L37" href="#L37">37</a>      <strong class="jxr_keyword">private</strong> URL datamodel03jexl, datamodel03jsp;
-<a class="jxr_linenumber" name="L38" href="#L38">38</a>      <strong class="jxr_keyword">private</strong> SCXMLExecutor exec01, exec02;
-<a class="jxr_linenumber" name="L39" href="#L39">39</a>  
-<a class="jxr_linenumber" name="L40" href="#L40">40</a>      <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L41" href="#L41">41</a>  <em class="jxr_javadoccomment">     * Set up instance variables required by this test case.</em>
-<a class="jxr_linenumber" name="L42" href="#L42">42</a>  <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L43" href="#L43">43</a>      @Before
-<a class="jxr_linenumber" name="L44" href="#L44">44</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> setUp() <strong class="jxr_keyword">throws</strong> Exception {
-<a class="jxr_linenumber" name="L45" href="#L45">45</a>          datamodel03jexl = <strong class="jxr_keyword">this</strong>.getClass().getClassLoader().
-<a class="jxr_linenumber" name="L46" href="#L46">46</a>              getResource(<span class="jxr_string">"org/apache/commons/scxml2/env/jexl/datamodel-03.xml"</span>);
-<a class="jxr_linenumber" name="L47" href="#L47">47</a>          datamodel03jsp = <strong class="jxr_keyword">this</strong>.getClass().getClassLoader().
-<a class="jxr_linenumber" name="L48" href="#L48">48</a>              getResource(<span class="jxr_string">"org/apache/commons/scxml2/env/jsp/datamodel-03.xml"</span>);
-<a class="jxr_linenumber" name="L49" href="#L49">49</a>          exec01 = SCXMLTestHelper.getExecutor(datamodel03jexl);
-<a class="jxr_linenumber" name="L50" href="#L50">50</a>          exec02 = SCXMLTestHelper.getExecutor(datamodel03jsp, <strong class="jxr_keyword">new</strong> ELContext(), <strong class="jxr_keyword">new</strong> ELEvaluator());
-<a class="jxr_linenumber" name="L51" href="#L51">51</a>      }
-<a class="jxr_linenumber" name="L52" href="#L52">52</a>  
-<a class="jxr_linenumber" name="L53" href="#L53">53</a>      <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L54" href="#L54">54</a>  <em class="jxr_javadoccomment">     * Tear down instance variables required by this test case.</em>
-<a class="jxr_linenumber" name="L55" href="#L55">55</a>  <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L56" href="#L56">56</a>      @After
-<a class="jxr_linenumber" name="L57" href="#L57">57</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> tearDown() {
-<a class="jxr_linenumber" name="L58" href="#L58">58</a>          datamodel03jexl = datamodel03jsp = <strong class="jxr_keyword">null</strong>;
-<a class="jxr_linenumber" name="L59" href="#L59">59</a>          exec01 = exec02 = <strong class="jxr_keyword">null</strong>;
-<a class="jxr_linenumber" name="L60" href="#L60">60</a>      }
-<a class="jxr_linenumber" name="L61" href="#L61">61</a>  
-<a class="jxr_linenumber" name="L62" href="#L62">62</a>      <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L63" href="#L63">63</a>  <em class="jxr_javadoccomment">     * Test the XPath evaluation</em>
-<a class="jxr_linenumber" name="L64" href="#L64">64</a>  <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L65" href="#L65">65</a>      <em class="jxr_comment">// JEXL</em>
-<a class="jxr_linenumber" name="L66" href="#L66">66</a>      @Test
-<a class="jxr_linenumber" name="L67" href="#L67">67</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testNamespacePrefixedXPathsJexl() <strong class="jxr_keyword">throws</strong> Exception {
-<a class="jxr_linenumber" name="L68" href="#L68">68</a>          runtest(exec01);
-<a class="jxr_linenumber" name="L69" href="#L69">69</a>      }
-<a class="jxr_linenumber" name="L70" href="#L70">70</a>  
-<a class="jxr_linenumber" name="L71" href="#L71">71</a>      <em class="jxr_comment">// EL</em>
-<a class="jxr_linenumber" name="L72" href="#L72">72</a>      @Test
-<a class="jxr_linenumber" name="L73" href="#L73">73</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testNamespacePrefixedXPathsEL() <strong class="jxr_keyword">throws</strong> Exception {
-<a class="jxr_linenumber" name="L74" href="#L74">74</a>          runtest(exec02);
-<a class="jxr_linenumber" name="L75" href="#L75">75</a>      }
-<a class="jxr_linenumber" name="L76" href="#L76">76</a>  
-<a class="jxr_linenumber" name="L77" href="#L77">77</a>      <em class="jxr_comment">// Same test, since same documents (different expression languages)</em>
-<a class="jxr_linenumber" name="L78" href="#L78">78</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">void</strong> runtest(SCXMLExecutor exec) <strong class="jxr_keyword">throws</strong> Exception {
-<a class="jxr_linenumber" name="L79" href="#L79">79</a>          <em class="jxr_comment">// must be in state "ten" at the onset</em>
-<a class="jxr_linenumber" name="L80" href="#L80">80</a>          Set&lt;TransitionTarget&gt; currentStates = exec.getCurrentStatus().getStates();
-<a class="jxr_linenumber" name="L81" href="#L81">81</a>          Assert.assertEquals(1, currentStates.size());
-<a class="jxr_linenumber" name="L82" href="#L82">82</a>          Assert.assertEquals(<span class="jxr_string">"ten"</span>, currentStates.iterator().next().getId());
-<a class="jxr_linenumber" name="L83" href="#L83">83</a>  
-<a class="jxr_linenumber" name="L84" href="#L84">84</a>          <em class="jxr_comment">// should move to "twenty"</em>
-<a class="jxr_linenumber" name="L85" href="#L85">85</a>          currentStates = SCXMLTestHelper.fireEvent(exec, <span class="jxr_string">"ten.done"</span>);
-<a class="jxr_linenumber" name="L86" href="#L86">86</a>          Assert.assertEquals(1, currentStates.size());
-<a class="jxr_linenumber" name="L87" href="#L87">87</a>          Assert.assertEquals(<span class="jxr_string">"twenty"</span>, currentStates.iterator().next().getId());
-<a class="jxr_linenumber" name="L88" href="#L88">88</a>  
-<a class="jxr_linenumber" name="L89" href="#L89">89</a>          <em class="jxr_comment">// This is set while exiting "ten"</em>
-<a class="jxr_linenumber" name="L90" href="#L90">90</a>          Double retval = (Double) exec.getRootContext().get(<span class="jxr_string">"retval"</span>);
-<a class="jxr_linenumber" name="L91" href="#L91">91</a>          Assert.assertEquals(Double.valueOf(<span class="jxr_string">"11"</span>), retval);
-<a class="jxr_linenumber" name="L92" href="#L92">92</a>  
-<a class="jxr_linenumber" name="L93" href="#L93">93</a>          <em class="jxr_comment">// On to "thirty"</em>
-<a class="jxr_linenumber" name="L94" href="#L94">94</a>          currentStates = SCXMLTestHelper.fireEvent(exec, <span class="jxr_string">"twenty.done"</span>);
-<a class="jxr_linenumber" name="L95" href="#L95">95</a>          Assert.assertEquals(1, currentStates.size());
-<a class="jxr_linenumber" name="L96" href="#L96">96</a>          Assert.assertEquals(<span class="jxr_string">"thirty"</span>, currentStates.iterator().next().getId());
-<a class="jxr_linenumber" name="L97" href="#L97">97</a>          exec = SCXMLTestHelper.testExecutorSerializability(exec);
-<a class="jxr_linenumber" name="L98" href="#L98">98</a>  
-<a class="jxr_linenumber" name="L99" href="#L99">99</a>          <em class="jxr_comment">// Tests XPath on SCXML actions, set while exiting "twenty"</em>
-<a class="jxr_linenumber" name="L100" href="#L100">100</a>         String retvalstr = (String) exec.getRootContext().get(<span class="jxr_string">"retval"</span>);
-<a class="jxr_linenumber" name="L101" href="#L101">101</a>         Assert.assertEquals(<span class="jxr_string">"Equal to 20"</span>, retvalstr);
-<a class="jxr_linenumber" name="L102" href="#L102">102</a> 
-<a class="jxr_linenumber" name="L103" href="#L103">103</a>         <em class="jxr_comment">// and so on ...</em>
-<a class="jxr_linenumber" name="L104" href="#L104">104</a>         currentStates = SCXMLTestHelper.fireEvent(exec, <span class="jxr_string">"thirty.done"</span>);
-<a class="jxr_linenumber" name="L105" href="#L105">105</a>         Assert.assertEquals(1, currentStates.size());
-<a class="jxr_linenumber" name="L106" href="#L106">106</a>         Assert.assertEquals(<span class="jxr_string">"forty"</span>, currentStates.iterator().next().getId());
-<a class="jxr_linenumber" name="L107" href="#L107">107</a> 
-<a class="jxr_linenumber" name="L108" href="#L108">108</a>         currentStates = SCXMLTestHelper.fireEvent(exec, <span class="jxr_string">"forty.done"</span>);
-<a class="jxr_linenumber" name="L109" href="#L109">109</a>         Assert.assertEquals(1, currentStates.size());
-<a class="jxr_linenumber" name="L110" href="#L110">110</a>         Assert.assertEquals(<span class="jxr_string">"fifty"</span>, currentStates.iterator().next().getId());
-<a class="jxr_linenumber" name="L111" href="#L111">111</a> 
-<a class="jxr_linenumber" name="L112" href="#L112">112</a>         currentStates = SCXMLTestHelper.fireEvent(exec, <span class="jxr_string">"fifty.done"</span>);
-<a class="jxr_linenumber" name="L113" href="#L113">113</a>         Assert.assertEquals(1, currentStates.size());
-<a class="jxr_linenumber" name="L114" href="#L114">114</a>         Assert.assertEquals(<span class="jxr_string">"sixty"</span>, ((State)currentStates.iterator().
-<a class="jxr_linenumber" name="L115" href="#L115">115</a>             next()).getId());
-<a class="jxr_linenumber" name="L116" href="#L116">116</a> 
-<a class="jxr_linenumber" name="L117" href="#L117">117</a>         currentStates = SCXMLTestHelper.fireEvent(exec, <span class="jxr_string">"sixty.done"</span>);
-<a class="jxr_linenumber" name="L118" href="#L118">118</a>         Assert.assertEquals(1, currentStates.size());
-<a class="jxr_linenumber" name="L119" href="#L119">119</a>         Assert.assertEquals(<span class="jxr_string">"seventy"</span>, currentStates.iterator().next().getId());
-<a class="jxr_linenumber" name="L120" href="#L120">120</a> 
-<a class="jxr_linenumber" name="L121" href="#L121">121</a>         <em class="jxr_comment">// done</em>
-<a class="jxr_linenumber" name="L122" href="#L122">122</a>         Assert.assertTrue(exec.getCurrentStatus().isFinal());
-<a class="jxr_linenumber" name="L123" href="#L123">123</a>     }
-<a class="jxr_linenumber" name="L124" href="#L124">124</a> }
-<a class="jxr_linenumber" name="L125" href="#L125">125</a> 
+<a class="jxr_linenumber" name="L22" href="#L22">22</a>  <strong class="jxr_keyword">import</strong> org.apache.commons.scxml2.model.State;
+<a class="jxr_linenumber" name="L23" href="#L23">23</a>  <strong class="jxr_keyword">import</strong> org.apache.commons.scxml2.model.TransitionTarget;
+<a class="jxr_linenumber" name="L24" href="#L24">24</a>  <strong class="jxr_keyword">import</strong> org.junit.After;
+<a class="jxr_linenumber" name="L25" href="#L25">25</a>  <strong class="jxr_keyword">import</strong> org.junit.Assert;
+<a class="jxr_linenumber" name="L26" href="#L26">26</a>  <strong class="jxr_keyword">import</strong> org.junit.Before;
+<a class="jxr_linenumber" name="L27" href="#L27">27</a>  <strong class="jxr_keyword">import</strong> org.junit.Test;
+<a class="jxr_linenumber" name="L28" href="#L28">28</a>  
+<a class="jxr_linenumber" name="L29" href="#L29">29</a>  <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L30" href="#L30">30</a>  <em class="jxr_javadoccomment"> * Unit tests for namespace prefixes in XPaths pointing bits in a &amp;lt;data&amp;gt;.</em>
+<a class="jxr_linenumber" name="L31" href="#L31">31</a>  <em class="jxr_javadoccomment"> */</em>
+<a class="jxr_linenumber" name="L32" href="#L32">32</a>  <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../org/apache/commons/scxml2/NamespacePrefixedXPathsTest.html">NamespacePrefixedXPathsTest</a> {
+<a class="jxr_linenumber" name="L33" href="#L33">33</a>  
+<a class="jxr_linenumber" name="L34" href="#L34">34</a>      <em class="jxr_comment">// Test data</em>
+<a class="jxr_linenumber" name="L35" href="#L35">35</a>      <strong class="jxr_keyword">private</strong> URL datamodel03jexl;
+<a class="jxr_linenumber" name="L36" href="#L36">36</a>      <strong class="jxr_keyword">private</strong> SCXMLExecutor exec01;
+<a class="jxr_linenumber" name="L37" href="#L37">37</a>  
+<a class="jxr_linenumber" name="L38" href="#L38">38</a>      <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L39" href="#L39">39</a>  <em class="jxr_javadoccomment">     * Set up instance variables required by this test case.</em>
+<a class="jxr_linenumber" name="L40" href="#L40">40</a>  <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L41" href="#L41">41</a>      @Before
+<a class="jxr_linenumber" name="L42" href="#L42">42</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> setUp() <strong class="jxr_keyword">throws</strong> Exception {
+<a class="jxr_linenumber" name="L43" href="#L43">43</a>          datamodel03jexl = <strong class="jxr_keyword">this</strong>.getClass().getClassLoader().
+<a class="jxr_linenumber" name="L44" href="#L44">44</a>              getResource(<span class="jxr_string">"org/apache/commons/scxml2/env/jexl/datamodel-03.xml"</span>);
+<a class="jxr_linenumber" name="L45" href="#L45">45</a>          exec01 = SCXMLTestHelper.getExecutor(datamodel03jexl);
+<a class="jxr_linenumber" name="L46" href="#L46">46</a>      }
+<a class="jxr_linenumber" name="L47" href="#L47">47</a>  
+<a class="jxr_linenumber" name="L48" href="#L48">48</a>      <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L49" href="#L49">49</a>  <em class="jxr_javadoccomment">     * Tear down instance variables required by this test case.</em>
+<a class="jxr_linenumber" name="L50" href="#L50">50</a>  <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L51" href="#L51">51</a>      @After
+<a class="jxr_linenumber" name="L52" href="#L52">52</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> tearDown() {
+<a class="jxr_linenumber" name="L53" href="#L53">53</a>          datamodel03jexl = <strong class="jxr_keyword">null</strong>;
+<a class="jxr_linenumber" name="L54" href="#L54">54</a>          exec01 = <strong class="jxr_keyword">null</strong>;
+<a class="jxr_linenumber" name="L55" href="#L55">55</a>      }
+<a class="jxr_linenumber" name="L56" href="#L56">56</a>  
+<a class="jxr_linenumber" name="L57" href="#L57">57</a>      <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L58" href="#L58">58</a>  <em class="jxr_javadoccomment">     * Test the XPath evaluation</em>
+<a class="jxr_linenumber" name="L59" href="#L59">59</a>  <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L60" href="#L60">60</a>      <em class="jxr_comment">// JEXL</em>
+<a class="jxr_linenumber" name="L61" href="#L61">61</a>      @Test
+<a class="jxr_linenumber" name="L62" href="#L62">62</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testNamespacePrefixedXPathsJexl() <strong class="jxr_keyword">throws</strong> Exception {
+<a class="jxr_linenumber" name="L63" href="#L63">63</a>          runtest(exec01);
+<a class="jxr_linenumber" name="L64" href="#L64">64</a>      }
+<a class="jxr_linenumber" name="L65" href="#L65">65</a>  
+<a class="jxr_linenumber" name="L66" href="#L66">66</a>      <em class="jxr_comment">// Same test, since same documents (different expression languages)</em>
+<a class="jxr_linenumber" name="L67" href="#L67">67</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">void</strong> runtest(SCXMLExecutor exec) <strong class="jxr_keyword">throws</strong> Exception {
+<a class="jxr_linenumber" name="L68" href="#L68">68</a>          <em class="jxr_comment">// must be in state "ten" at the onset</em>
+<a class="jxr_linenumber" name="L69" href="#L69">69</a>          Set&lt;TransitionTarget&gt; currentStates = exec.getCurrentStatus().getStates();
+<a class="jxr_linenumber" name="L70" href="#L70">70</a>          Assert.assertEquals(1, currentStates.size());
+<a class="jxr_linenumber" name="L71" href="#L71">71</a>          Assert.assertEquals(<span class="jxr_string">"ten"</span>, currentStates.iterator().next().getId());
+<a class="jxr_linenumber" name="L72" href="#L72">72</a>  
+<a class="jxr_linenumber" name="L73" href="#L73">73</a>          <em class="jxr_comment">// should move to "twenty"</em>
+<a class="jxr_linenumber" name="L74" href="#L74">74</a>          currentStates = SCXMLTestHelper.fireEvent(exec, <span class="jxr_string">"ten.done"</span>);
+<a class="jxr_linenumber" name="L75" href="#L75">75</a>          Assert.assertEquals(1, currentStates.size());
+<a class="jxr_linenumber" name="L76" href="#L76">76</a>          Assert.assertEquals(<span class="jxr_string">"twenty"</span>, currentStates.iterator().next().getId());
+<a class="jxr_linenumber" name="L77" href="#L77">77</a>  
+<a class="jxr_linenumber" name="L78" href="#L78">78</a>          <em class="jxr_comment">// This is set while exiting "ten"</em>
+<a class="jxr_linenumber" name="L79" href="#L79">79</a>          Double retval = (Double) exec.getRootContext().get(<span class="jxr_string">"retval"</span>);
+<a class="jxr_linenumber" name="L80" href="#L80">80</a>          Assert.assertEquals(Double.valueOf(<span class="jxr_string">"11"</span>), retval);
+<a class="jxr_linenumber" name="L81" href="#L81">81</a>  
+<a class="jxr_linenumber" name="L82" href="#L82">82</a>          <em class="jxr_comment">// On to "thirty"</em>
+<a class="jxr_linenumber" name="L83" href="#L83">83</a>          currentStates = SCXMLTestHelper.fireEvent(exec, <span class="jxr_string">"twenty.done"</span>);
+<a class="jxr_linenumber" name="L84" href="#L84">84</a>          Assert.assertEquals(1, currentStates.size());
+<a class="jxr_linenumber" name="L85" href="#L85">85</a>          Assert.assertEquals(<span class="jxr_string">"thirty"</span>, currentStates.iterator().next().getId());
+<a class="jxr_linenumber" name="L86" href="#L86">86</a>          exec = SCXMLTestHelper.testExecutorSerializability(exec);
+<a class="jxr_linenumber" name="L87" href="#L87">87</a>  
+<a class="jxr_linenumber" name="L88" href="#L88">88</a>          <em class="jxr_comment">// Tests XPath on SCXML actions, set while exiting "twenty"</em>
+<a class="jxr_linenumber" name="L89" href="#L89">89</a>          String retvalstr = (String) exec.getRootContext().get(<span class="jxr_string">"retval"</span>);
+<a class="jxr_linenumber" name="L90" href="#L90">90</a>          Assert.assertEquals(<span class="jxr_string">"Equal to 20"</span>, retvalstr);
+<a class="jxr_linenumber" name="L91" href="#L91">91</a>  
+<a class="jxr_linenumber" name="L92" href="#L92">92</a>          <em class="jxr_comment">// and so on ...</em>
+<a class="jxr_linenumber" name="L93" href="#L93">93</a>          currentStates = SCXMLTestHelper.fireEvent(exec, <span class="jxr_string">"thirty.done"</span>);
+<a class="jxr_linenumber" name="L94" href="#L94">94</a>          Assert.assertEquals(1, currentStates.size());
+<a class="jxr_linenumber" name="L95" href="#L95">95</a>          Assert.assertEquals(<span class="jxr_string">"forty"</span>, currentStates.iterator().next().getId());
+<a class="jxr_linenumber" name="L96" href="#L96">96</a>  
+<a class="jxr_linenumber" name="L97" href="#L97">97</a>          currentStates = SCXMLTestHelper.fireEvent(exec, <span class="jxr_string">"forty.done"</span>);
+<a class="jxr_linenumber" name="L98" href="#L98">98</a>          Assert.assertEquals(1, currentStates.size());
+<a class="jxr_linenumber" name="L99" href="#L99">99</a>          Assert.assertEquals(<span class="jxr_string">"fifty"</span>, currentStates.iterator().next().getId());
+<a class="jxr_linenumber" name="L100" href="#L100">100</a> 
+<a class="jxr_linenumber" name="L101" href="#L101">101</a>         currentStates = SCXMLTestHelper.fireEvent(exec, <span class="jxr_string">"fifty.done"</span>);
+<a class="jxr_linenumber" name="L102" href="#L102">102</a>         Assert.assertEquals(1, currentStates.size());
+<a class="jxr_linenumber" name="L103" href="#L103">103</a>         Assert.assertEquals(<span class="jxr_string">"sixty"</span>, (currentStates.iterator().
+<a class="jxr_linenumber" name="L104" href="#L104">104</a>             next()).getId());
+<a class="jxr_linenumber" name="L105" href="#L105">105</a> 
+<a class="jxr_linenumber" name="L106" href="#L106">106</a>         currentStates = SCXMLTestHelper.fireEvent(exec, <span class="jxr_string">"sixty.done"</span>);
+<a class="jxr_linenumber" name="L107" href="#L107">107</a>         Assert.assertEquals(1, currentStates.size());
+<a class="jxr_linenumber" name="L108" href="#L108">108</a>         Assert.assertEquals(<span class="jxr_string">"seventy"</span>, currentStates.iterator().next().getId());
+<a class="jxr_linenumber" name="L109" href="#L109">109</a> 
+<a class="jxr_linenumber" name="L110" href="#L110">110</a>         <em class="jxr_comment">// done</em>
+<a class="jxr_linenumber" name="L111" href="#L111">111</a>         Assert.assertTrue(exec.getCurrentStatus().isFinal());
+<a class="jxr_linenumber" name="L112" href="#L112">112</a>     }
+<a class="jxr_linenumber" name="L113" href="#L113">113</a> }
+<a class="jxr_linenumber" name="L114" href="#L114">114</a> 
 </pre>
 <hr/>
 <div id="footer">Copyright &#169; 2005&#x2013;2014 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</div>



Mime
View raw message