Author: rahul
Date: Thu Jan 3 13:56:07 2008
New Revision: 608646
URL: http://svn.apache.org/viewvc?rev=608646&view=rev
Log:
Add the tests suggested by Ross Yakulis <yakulis AT avaya DOT com> as part of
SCXML-64 to the issues suite. Also add Ross to list of contributors.
Added:
commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/Issue64Test.java
(with props)
commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue64-01.xml
(with props)
commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue64-02.xml
(with props)
Modified:
commons/proper/scxml/trunk/pom.xml
commons/proper/scxml/trunk/project.xml
commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/IssuesTestSuite.java
Modified: commons/proper/scxml/trunk/pom.xml
URL:
http://svn.apache.org/viewvc/commons/proper/scxml/trunk/pom.xml?rev=608646&r1=608645&r2=608646&view=diff
==============================================================================
--- commons/proper/scxml/trunk/pom.xml (original)
+++ commons/proper/scxml/trunk/pom.xml Thu Jan 3 13:56:07 2008
@@ -93,6 +93,9 @@
<contributor>
<name>Sebastian Bazley</name>
</contributor>
+ <contributor>
+ <name>Ross Yakulis</name>
+ </contributor>
</contributors>
<dependencies>
Modified: commons/proper/scxml/trunk/project.xml
URL:
http://svn.apache.org/viewvc/commons/proper/scxml/trunk/project.xml?rev=608646&r1=608645&r2=608646&view=diff
==============================================================================
--- commons/proper/scxml/trunk/project.xml (original)
+++ commons/proper/scxml/trunk/project.xml Thu Jan 3 13:56:07 2008
@@ -138,6 +138,9 @@
<contributor>
<name>Sebastian Bazley</name>
</contributor>
+ <contributor>
+ <name>Ross Yakulis</name>
+ </contributor>
</contributors>
<dependencies>
Added:
commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/Issue64Test.java
URL:
http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/Issue64Test.java?rev=608646&view=auto
==============================================================================
---
commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/Issue64Test.java
(added)
+++
commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/Issue64Test.java
Thu Jan 3 13:56:07 2008
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.scxml.issues;
+
+import java.net.URL;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+import org.apache.commons.scxml.SCXMLExecutor;
+import org.apache.commons.scxml.SCXMLTestHelper;
+
+/**
+ * Test cases for issue 64.
+ * WONTFIX
+ */
+public class Issue64Test extends TestCase {
+
+ public Issue64Test(String name) {
+ super(name);
+ }
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite(Issue64Test.class);
+ suite.setName("SCXML Issue 64 Test");
+ return suite;
+ }
+
+ private URL works, fails;
+ private SCXMLExecutor exec;
+
+ /**
+ * Set up instance variables required by this test case.
+ */
+ public void setUp() {
+ works = this.getClass().getClassLoader().
+ getResource("org/apache/commons/scxml/issues/issue64-01.xml");
+ fails = this.getClass().getClassLoader().
+ getResource("org/apache/commons/scxml/issues/issue64-02.xml");
+ }
+
+ /**
+ * Tear down instance variables required by this test case.
+ */
+ public void tearDown() {
+ works = fails = null;
+ exec = null;
+ }
+
+ public void test01() {
+ exec = SCXMLTestHelper.getExecutor(SCXMLTestHelper.parse(works));
+ SCXMLTestHelper.assertPostTriggerState(exec, "show.bug", "end");
+ }
+
+ public void test02() {
+ exec = SCXMLTestHelper.getExecutor(SCXMLTestHelper.parse(fails));
+ SCXMLTestHelper.assertPostTriggerState(exec, "show.bug", "end");
+ }
+
+ public static void main(String args[]) {
+ TestRunner.run(suite());
+ }
+}
+
Propchange:
commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/Issue64Test.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/Issue64Test.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified:
commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/IssuesTestSuite.java
URL:
http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/IssuesTestSuite.java?rev=608646&r1=608645&r2=608646&view=diff
==============================================================================
---
commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/IssuesTestSuite.java
(original)
+++
commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/IssuesTestSuite.java
Thu Jan 3 13:56:07 2008
@@ -47,6 +47,7 @@
public static Test suite() {
TestSuite suite = new TestSuite();
suite.setName("Commons SCXML Issues Tests");
+ suite.addTest(Issue64Test.suite());
return suite;
}
}
Added:
commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue64-01.xml
URL:
http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue64-01.xml?rev=608646&view=auto
==============================================================================
---
commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue64-01.xml
(added)
+++
commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue64-01.xml
Thu Jan 3 13:56:07 2008
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+<!-- Correct SCXML document -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml"
+ version="1.0"
+ initialstate="tranbug">
+
+ <state id="tranbug">
+ <datamodel>
+ <data name="dummy" expr="'somedata'"/>
+ </datamodel>
+ <onentry>
+ <log expr="'Begin transition bug test ...'" />
+ </onentry>
+ <transition event="show.bug" target="end">
+ <log expr="dummy" />
+ <log expr="'*****' + dummy" />
+ </transition>
+ </state>
+ <state id="end" final="true" />
+
+</scxml>
+
Propchange:
commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue64-01.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue64-01.xml
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added:
commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue64-02.xml
URL:
http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue64-02.xml?rev=608646&view=auto
==============================================================================
---
commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue64-02.xml
(added)
+++
commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue64-02.xml
Thu Jan 3 13:56:07 2008
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+<!-- Bad SCXML document -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml"
+ version="1.0"
+ initialstate="tranbug">
+
+ <state id="tranbug">
+ <onentry>
+ <log expr="'Begin transition bug test ...'" />
+ </onentry>
+ <transition event="show.bug" target="end">
+ <!-- FOLLOWING datamodel IS MISPLACED -->
+ <datamodel>
+ <data name="dummy" expr="'somedata'"/>
+ </datamodel>
+ <log expr="dummy" />
+ <log expr="'*****' + dummy" />
+ </transition>
+ </state>
+
+ <state id="end" final="true" />
+
+</scxml>
+
Propchange:
commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue64-02.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/issues/issue64-02.xml
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL