Author: julien(a)jboss.com
Date: 2007-10-17 09:54:39 -0400 (Wed, 17 Oct 2007)
New Revision: 8680
Added:
modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/
modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/SampleTests.java
modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/sample/
Removed:
modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/BlahTestTwo.java
modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/BlahTests.java
modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/blah/
Modified:
modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java
modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/TestedClass1.java
modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/TestedClass2.java
modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/sample/f1.xml
Log:
renamed the "blah" to "sample"
Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java
===================================================================
--- modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java 2007-10-17 13:38:34
UTC (rev 8679)
+++ modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java 2007-10-17 13:54:39
UTC (rev 8680)
@@ -23,8 +23,7 @@
package org.jboss.test.unit;
import org.jboss.test.unit.api.AssertTests;
-import org.jboss.test.unit.blah.BlahTestTwo;
-import org.jboss.test.unit.blah.BlahTests;
+import org.jboss.test.unit.sample.SampleTests;
import org.jboss.test.unit.pojo.AbstractPOJOTests;
import org.jboss.test.unit.pojo.junit.JUnitPOJOTests;
import org.jboss.test.unit.report.junit.JUnitReporterTests;
@@ -68,12 +67,9 @@
InfoTests.main(args);
//
- BlahTests.main(args);
+ SampleTests.main(args);
//
- BlahTestTwo.main(args);
-
- //
JUnitReporterTests.main(args);
}
}
Copied: modules/test/trunk/unit/src/main/org/jboss/test/unit/sample (from rev 8670,
modules/test/trunk/unit/src/main/org/jboss/test/unit/blah)
Deleted: modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/BlahTestTwo.java
===================================================================
--- modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTestTwo.java 2007-10-16
15:05:25 UTC (rev 8670)
+++
modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/BlahTestTwo.java 2007-10-17
13:54:39 UTC (rev 8680)
@@ -1,65 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.test.unit.blah;
-
-import java.io.InputStream;
-
-import org.jboss.unit.report.impl.junit.JUnitReporter;
-import org.jboss.unit.report.impl.writer.PrintListener;
-import org.jboss.unit.runner.TestRunner;
-import org.jboss.unit.runner.TestRunnerEventListener;
-import org.jboss.unit.runner.impl.TestRunnerEventBroadcaster;
-import org.jboss.unit.runner.impl.TestRunnerContextSupport;
-import org.jboss.unit.runner.model.ModelBuilder;
-import org.jboss.unit.runner.model.TestSuiteDef;
-import org.xml.sax.InputSource;
-
-/**
- * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
- * @version $Revision$
- */
-public class BlahTestTwo
-{
-
- public static void main(String[] args) throws Exception
- {
-
- InputStream in = BlahTests.class.getResourceAsStream("f1.xml");
- InputSource source = new InputSource(in);
- ModelBuilder builder = new ModelBuilder(source);
- TestSuiteDef suite = builder.build();
-
- TestRunner runner = suite.createRunner();
-
- TestRunnerEventListener junitReporter = new JUnitReporter("output",
BlahTestTwo.class.getName());
- // add listeners
-
- TestRunnerEventBroadcaster broadcaster = new TestRunnerEventBroadcaster();
- broadcaster.addListener(junitReporter);
- broadcaster.addListener(new PrintListener());
-
- // run the test
- runner.run(new TestRunnerContextSupport(broadcaster));
-
- }
-}
Deleted: modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/BlahTests.java
===================================================================
--- modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTests.java 2007-10-16
15:05:25 UTC (rev 8670)
+++ modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/BlahTests.java 2007-10-17
13:54:39 UTC (rev 8680)
@@ -1,59 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.test.unit.blah;
-
-import org.jboss.unit.report.impl.writer.PrintListener;
-import org.jboss.unit.runner.TestRunner;
-import org.jboss.unit.runner.impl.TestRunnerEventBroadcaster;
-import org.jboss.unit.runner.impl.TestRunnerContextSupport;
-import org.jboss.unit.runner.model.ModelBuilder;
-import org.jboss.unit.runner.model.TestSuiteDef;
-import org.xml.sax.InputSource;
-
-import java.io.InputStream;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class BlahTests
-{
-
- public static void main(String[] args) throws Exception
- {
-
- InputStream in = BlahTests.class.getResourceAsStream("f1.xml");
- InputSource source = new InputSource(in);
- ModelBuilder builder = new ModelBuilder(source);
- TestSuiteDef suite = builder.build();
-
- TestRunner runner = suite.createRunner();
-
- TestRunnerEventBroadcaster broadcaster = new TestRunnerEventBroadcaster();
- broadcaster.addListener(new PrintListener());
-
- runner.run(new TestRunnerContextSupport(broadcaster));
-
- }
-
-}
Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/SampleTests.java
===================================================================
--- modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/SampleTests.java
(rev 0)
+++
modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/SampleTests.java 2007-10-17
13:54:39 UTC (rev 8680)
@@ -0,0 +1,92 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.test.unit.sample;
+
+import org.jboss.unit.report.impl.writer.PrintListener;
+import org.jboss.unit.report.impl.junit.JUnitReporter;
+import org.jboss.unit.runner.TestRunner;
+import org.jboss.unit.runner.TestRunnerEventListener;
+import org.jboss.unit.runner.impl.TestRunnerEventBroadcaster;
+import org.jboss.unit.runner.impl.TestRunnerContextSupport;
+import org.jboss.unit.runner.model.ModelBuilder;
+import org.jboss.unit.runner.model.TestSuiteDef;
+import org.jboss.unit.runner.model.BuilderException;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+import javax.xml.parsers.ParserConfigurationException;
+import java.io.InputStream;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class SampleTests
+{
+
+ public static void main(String[] args) throws Exception
+ {
+
+ test1();
+ test2();
+
+ }
+
+ private static void test1()
+ throws ParserConfigurationException, IOException, SAXException, BuilderException
+ {
+ InputStream in = SampleTests.class.getResourceAsStream("f1.xml");
+ InputSource source = new InputSource(in);
+ ModelBuilder builder = new ModelBuilder(source);
+ TestSuiteDef suite = builder.build();
+
+ TestRunner runner = suite.createRunner();
+
+ TestRunnerEventBroadcaster broadcaster = new TestRunnerEventBroadcaster();
+ broadcaster.addListener(new PrintListener());
+
+ runner.run(new TestRunnerContextSupport(broadcaster));
+ }
+
+ private static void test2()
+ throws ParserConfigurationException, IOException, SAXException, BuilderException
+ {
+ InputStream in = SampleTests.class.getResourceAsStream("f1.xml");
+ InputSource source = new InputSource(in);
+ ModelBuilder builder = new ModelBuilder(source);
+ TestSuiteDef suite = builder.build();
+
+ TestRunner runner = suite.createRunner();
+
+ TestRunnerEventListener junitReporter = new JUnitReporter("output",
SampleTests.class.getName());
+ // add listeners
+
+ TestRunnerEventBroadcaster broadcaster = new TestRunnerEventBroadcaster();
+ broadcaster.addListener(junitReporter);
+ broadcaster.addListener(new PrintListener());
+
+ // run the test
+ runner.run(new TestRunnerContextSupport(broadcaster));
+ }
+}
Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/TestedClass1.java
===================================================================
--- modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/TestedClass1.java 2007-10-16
15:05:25 UTC (rev 8670)
+++
modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/TestedClass1.java 2007-10-17
13:54:39 UTC (rev 8680)
@@ -20,7 +20,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
******************************************************************************/
-package org.jboss.test.unit.blah;
+package org.jboss.test.unit.sample;
import org.jboss.unit.api.pojo.annotations.Test;
Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/TestedClass2.java
===================================================================
--- modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/TestedClass2.java 2007-10-16
15:05:25 UTC (rev 8670)
+++
modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/TestedClass2.java 2007-10-17
13:54:39 UTC (rev 8680)
@@ -20,7 +20,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
******************************************************************************/
-package org.jboss.test.unit.blah;
+package org.jboss.test.unit.sample;
import static org.jboss.unit.api.Assert.assertEquals;
import org.jboss.unit.api.pojo.annotations.Parameter;
Copied: modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/sample (from rev
8670, modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/blah)
Modified: modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/sample/f1.xml
===================================================================
--- modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/blah/f1.xml 2007-10-16
15:05:25 UTC (rev 8670)
+++
modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/sample/f1.xml 2007-10-17
13:54:39 UTC (rev 8680)
@@ -5,15 +5,15 @@
xsi:schemaLocation="urn:jboss:jboss-unit:1.0 jboss-unit_1_0.xsd">
<pojo>
<test>
- <class name="org.jboss.test.unit.blah.TestedClass1"/>
+ <class name="org.jboss.test.unit.sample.TestedClass1"/>
</test>
<test>
- <class name="org.jboss.test.unit.blah.TestedClass1">
+ <class name="org.jboss.test.unit.sample.TestedClass1">
<case name="testFoo"/>
</class>
</test>
<test>
- <class name="org.jboss.test.unit.blah.TestedClass2">
+ <class name="org.jboss.test.unit.sample.TestedClass2">
</class>
<parameter name="foo">
<value>foo</value>