Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 84874 invoked from network); 24 Mar 2007 17:54:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Mar 2007 17:54:20 -0000 Received: (qmail 13072 invoked by uid 500); 24 Mar 2007 17:54:26 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 12990 invoked by uid 500); 24 Mar 2007 17:54:26 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 12979 invoked by uid 500); 24 Mar 2007 17:54:26 -0000 Received: (qmail 12976 invoked by uid 99); 24 Mar 2007 17:54:26 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Mar 2007 10:54:25 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Mar 2007 10:54:16 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id E98281A9838; Sat, 24 Mar 2007 10:53:55 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r522070 - in /jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml: SCXMLTestHelper.java env/jexl/microwave-03.xml env/jexl/microwave-04.xml io/SCXMLParserTest.java transitions-04.xml Date: Sat, 24 Mar 2007 17:53:55 -0000 To: commons-cvs@jakarta.apache.org From: rahul@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070324175355.E98281A9838@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: rahul Date: Sat Mar 24 10:53:54 2007 New Revision: 522070 URL: http://svn.apache.org/viewvc?view=rev&rev=522070 Log: o Add some test cases which fail using the old parser, but will pass with the new parser. - Not hooked in yet, so tests won't execute - The entire test directory structure should be reorganized (perhaps Java and XML files should be separated out, SCXML documents should be filed per WD version etc.). Perhaps one day I might have an urge to clean the tests up a bit. o One line of whitespace added to SCXMLTestHelper (useful to have that between methods) Added: jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/env/jexl/microwave-03.xml (with props) jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/env/jexl/microwave-04.xml (with props) jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/io/SCXMLParserTest.java (with props) jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/transitions-04.xml (with props) Modified: jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/SCXMLTestHelper.java Modified: jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/SCXMLTestHelper.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/SCXMLTestHelper.java?view=diff&rev=522070&r1=522069&r2=522070 ============================================================================== --- jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/SCXMLTestHelper.java (original) +++ jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/SCXMLTestHelper.java Sat Mar 24 10:53:54 2007 @@ -112,6 +112,7 @@ SCXML roundtrip = testModelSerializability(scxml); return roundtrip; } + public static SCXMLExecutor getExecutor(final URL url) { SCXML scxml = digest(url); Evaluator evaluator = new JexlEvaluator(); Added: jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/env/jexl/microwave-03.xml URL: http://svn.apache.org/viewvc/jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/env/jexl/microwave-03.xml?view=auto&rev=522070 ============================================================================== --- jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/env/jexl/microwave-03.xml (added) +++ jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/env/jexl/microwave-03.xml Sat Mar 24 10:53:54 2007 @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Propchange: jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/env/jexl/microwave-03.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/env/jexl/microwave-03.xml ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision HeadURL Added: jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/env/jexl/microwave-04.xml URL: http://svn.apache.org/viewvc/jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/env/jexl/microwave-04.xml?view=auto&rev=522070 ============================================================================== --- jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/env/jexl/microwave-04.xml (added) +++ jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/env/jexl/microwave-04.xml Sat Mar 24 10:53:54 2007 @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Propchange: jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/env/jexl/microwave-04.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/env/jexl/microwave-04.xml ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision HeadURL Added: jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/io/SCXMLParserTest.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/io/SCXMLParserTest.java?view=auto&rev=522070 ============================================================================== --- jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/io/SCXMLParserTest.java (added) +++ jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/io/SCXMLParserTest.java Sat Mar 24 10:53:54 2007 @@ -0,0 +1,97 @@ +/* + * 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.io; + +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.SCXMLTestHelper; +import org.apache.commons.scxml.model.SCXML; +/** + * Unit tests {@link org.apache.commons.scxml.SCXMLParser}. + */ +public class SCXMLParserTest extends TestCase { + /** + * Construct a new instance of SCXMLDigesterTest with + * the specified name + */ + public SCXMLParserTest(String name) { + super(name); + } + + public static Test suite() { + TestSuite suite = new TestSuite(SCXMLParserTest.class); + suite.setName("SCXML Parser Tests"); + return suite; + } + + // Test data + private URL microwave03, microwave04; + private SCXML scxml; + private String scxmlAsString; + + /** + * Set up instance variables required by this test case. + */ + public void setUp() { + microwave03 = this.getClass().getClassLoader(). + getResource("org/apache/commons/scxml/env/jexl/microwave-03.xml"); + microwave04 = this.getClass().getClassLoader(). + getResource("org/apache/commons/scxml/env/jexl/microwave-04.xml"); + } + + /** + * Tear down instance variables required by this test case. + */ + public void tearDown() { + microwave03 = microwave04 = null; + scxml = null; + scxmlAsString = null; + } + + /** + * Test the implementation + */ + public void testSCXMLParserMicrowave03Sample() { + scxml = SCXMLTestHelper.parse(microwave03); + assertNotNull(scxml); + scxmlAsString = serialize(scxml); + assertNotNull(scxmlAsString); + } + + public void testSCXMLParserMicrowave04Sample() { + scxml = SCXMLTestHelper.parse(microwave04); + assertNotNull(scxml); + scxmlAsString = serialize(scxml); + assertNotNull(scxmlAsString); + } + + private String serialize(final SCXML scxml) { + scxmlAsString = SCXMLSerializer.serialize(scxml); + assertNotNull(scxmlAsString); + return scxmlAsString; + } + + public static void main(String args[]) { + TestRunner.run(suite()); + } +} + Propchange: jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/io/SCXMLParserTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/io/SCXMLParserTest.java ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision HeadURL Added: jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/transitions-04.xml URL: http://svn.apache.org/viewvc/jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/transitions-04.xml?view=auto&rev=522070 ============================================================================== --- jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/transitions-04.xml (added) +++ jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/transitions-04.xml Sat Mar 24 10:53:54 2007 @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Propchange: jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/transitions-04.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/transitions-04.xml ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision HeadURL --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org