Author: bdaw
Date: 2007-11-07 15:09:52 -0500 (Wed, 07 Nov 2007)
New Revision: 8842
Modified:
modules/test/trunk/build/ide/intellij/idea60/modules/unit/unit.iml
modules/test/trunk/mc/build.xml
modules/test/trunk/mc/pom.xml
modules/test/trunk/mc/src/test/java/org/jboss/test/unit/mc/MCTestLifeCycleTests.java
modules/test/trunk/remote/build.xml
modules/test/trunk/remote/pom.xml
modules/test/trunk/remote/src/test/java/org/jboss/test/AllTests.java
modules/test/trunk/unit/build.xml
modules/test/trunk/unit/pom.xml
modules/test/trunk/unit/src/test/java/org/jboss/test/unit/AllTests.java
modules/test/trunk/unit/src/test/java/org/jboss/test/unit/TestIdTests.java
modules/test/trunk/unit/src/test/java/org/jboss/test/unit/sample/SampleTests.java
Log:
setup current tests in maven
Modified: modules/test/trunk/build/ide/intellij/idea60/modules/unit/unit.iml
===================================================================
--- modules/test/trunk/build/ide/intellij/idea60/modules/unit/unit.iml 2007-11-07 19:02:05
UTC (rev 8841)
+++ modules/test/trunk/build/ide/intellij/idea60/modules/unit/unit.iml 2007-11-07 20:09:52
UTC (rev 8842)
@@ -14,6 +14,15 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/junit/lib/junit.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
<orderEntryProperties />
</component>
<component name="VcsManagerConfiguration">
Modified: modules/test/trunk/mc/build.xml
===================================================================
--- modules/test/trunk/mc/build.xml 2007-11-07 19:02:05 UTC (rev 8841)
+++ modules/test/trunk/mc/build.xml 2007-11-07 20:09:52 UTC (rev 8842)
@@ -85,6 +85,7 @@
<!-- Configure thirdparty libraries -->
&libraries;
<path id="library.classpath">
+ <path refid="junit.junit.classpath"/>
<path refid="apache.log4j.classpath"/>
<path refid="jboss.microcontainer.classpath"/>
<path refid="jboss/common.core.classpath"/>
@@ -224,6 +225,7 @@
<jvmarg
value="-Xrunjdwp:transport=dt_socket,address=7878,server=y,suspend=y"/>
-->
<classpath>
+ <path refid="junit.junit.classpath"/>
<path location="${build.lib}/jboss-unit-mc-lib.jar"/>
<path location="${build.lib}/jboss-unit-mc-test.jar"/>
Modified: modules/test/trunk/mc/pom.xml
===================================================================
--- modules/test/trunk/mc/pom.xml 2007-11-07 19:02:05 UTC (rev 8841)
+++ modules/test/trunk/mc/pom.xml 2007-11-07 20:09:52 UTC (rev 8842)
@@ -19,25 +19,30 @@
<groupId>org.jboss.microcontainer</groupId>
<artifactId>jboss-kernel</artifactId>
</dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
</dependencies>
- <!--<build>-->
- <!--<plugins>-->
- <!--<plugin>-->
- <!--<groupId>org.apache.maven.plugins</groupId>-->
- <!--<artifactId>maven-surefire-plugin</artifactId>-->
- <!--<configuration>-->
- <!--<skip>false</skip>-->
- <!--<includes>-->
- <!--<include>**/*Tests.java</include>-->
- <!--</includes>-->
- <!--</configuration>-->
- <!--</plugin>-->
- <!--</plugins>-->
- <!--</build>-->
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skip>false</skip>
+ <includes>
+ <include>**/*Tests.java</include>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
<properties>
</properties>
+
</project>
Modified:
modules/test/trunk/mc/src/test/java/org/jboss/test/unit/mc/MCTestLifeCycleTests.java
===================================================================
---
modules/test/trunk/mc/src/test/java/org/jboss/test/unit/mc/MCTestLifeCycleTests.java 2007-11-07
19:02:05 UTC (rev 8841)
+++
modules/test/trunk/mc/src/test/java/org/jboss/test/unit/mc/MCTestLifeCycleTests.java 2007-11-07
20:09:52 UTC (rev 8842)
@@ -22,23 +22,23 @@
******************************************************************************/
package org.jboss.test.unit.mc;
-import org.jboss.unit.driver.impl.pojo.POJOTestSuiteDriver;
+import junit.framework.TestCase;
import org.jboss.unit.TestId;
import org.jboss.unit.driver.command.StartTestCommand;
+import org.jboss.unit.driver.impl.pojo.POJOTestSuiteDriver;
+import java.util.HashMap;
import java.util.Map;
-import java.util.HashMap;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-public class MCTestLifeCycleTests
+public class MCTestLifeCycleTests extends TestCase
{
- public static void main(String[] args) throws Exception
+ public void testAll() throws Exception
{
-
POJOTestSuiteDriver driver = new POJOTestSuiteDriver(SomeTest.class);
Map<String,String> parametrization = new HashMap<String, String>();
@@ -47,4 +47,11 @@
driver.invoke(new TestId("myTest"), new
StartTestCommand(parametrization));
}
+ public static void main(String[] args) throws Exception
+ {
+
+ MCTestLifeCycleTests tests = new MCTestLifeCycleTests();
+ tests.testAll();
+ }
+
}
Modified: modules/test/trunk/remote/build.xml
===================================================================
--- modules/test/trunk/remote/build.xml 2007-11-07 19:02:05 UTC (rev 8841)
+++ modules/test/trunk/remote/build.xml 2007-11-07 20:09:52 UTC (rev 8842)
@@ -85,6 +85,7 @@
<!-- Configure thirdparty libraries -->
&libraries;
<path id="library.classpath">
+ <path refid="junit.junit.classpath"/>
<path refid="jboss.portal/modules/common.classpath"/>
<path refid="apache.log4j.classpath"/>
@@ -227,6 +228,7 @@
<jvmarg
value="-Xrunjdwp:transport=dt_socket,address=7878,server=y,suspend=y"/>
-->
<classpath>
+ <path refid="junit.junit.classpath"/>
<path location="${build.lib}/jboss-unit-lib.jar"/>
<path location="${build.lib}/jboss-unit-test.jar"/>
<path location="${build.resources}/test"/>
Modified: modules/test/trunk/remote/pom.xml
===================================================================
--- modules/test/trunk/remote/pom.xml 2007-11-07 19:02:05 UTC (rev 8841)
+++ modules/test/trunk/remote/pom.xml 2007-11-07 20:09:52 UTC (rev 8842)
@@ -31,8 +31,27 @@
<groupId>org.jboss.microcontainer</groupId>
<artifactId>jboss-kernel</artifactId>
</dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skip>false</skip>
+ <includes>
+ <include>**/*Tests.java</include>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
<properties>
</properties>
Modified: modules/test/trunk/remote/src/test/java/org/jboss/test/AllTests.java
===================================================================
--- modules/test/trunk/remote/src/test/java/org/jboss/test/AllTests.java 2007-11-07
19:02:05 UTC (rev 8841)
+++ modules/test/trunk/remote/src/test/java/org/jboss/test/AllTests.java 2007-11-07
20:09:52 UTC (rev 8842)
@@ -22,16 +22,24 @@
******************************************************************************/
package org.jboss.test;
+import junit.framework.TestCase;
+
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-public class AllTests
+public class AllTests extends TestCase
{
- public static void main(String[] args)
+ public void testAll() throws Exception
{
-
+
}
+ public static void main(String[] args) throws Exception
+ {
+ AllTests tests = new AllTests();
+ tests.testAll();
+ }
+
}
Modified: modules/test/trunk/unit/build.xml
===================================================================
--- modules/test/trunk/unit/build.xml 2007-11-07 19:02:05 UTC (rev 8841)
+++ modules/test/trunk/unit/build.xml 2007-11-07 20:09:52 UTC (rev 8842)
@@ -85,7 +85,7 @@
<!-- Configure thirdparty libraries -->
&libraries;
<path id="library.classpath">
-
+ <path refid="junit.junit.classpath"/>
</path>
<!-- Configure modules -->
@@ -217,6 +217,7 @@
-->
<classpath>
+ <path refid="junit.junit.classpath"/>
<path location="${build.lib}/jboss-unit-lib.jar"/>
<path location="${build.lib}/jboss-unit-test.jar"/>
<path location="${build.resources}/test"/>
Modified: modules/test/trunk/unit/pom.xml
===================================================================
--- modules/test/trunk/unit/pom.xml 2007-11-07 19:02:05 UTC (rev 8841)
+++ modules/test/trunk/unit/pom.xml 2007-11-07 20:09:52 UTC (rev 8842)
@@ -10,8 +10,30 @@
<packaging>jar</packaging>
<name>JBoss Unit</name>
- <dependencies/>
+ <dependencies>
+ <dependency>
+ <artifactId>junit</artifactId>
+ <groupId>junit</groupId>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ <includes>
+ <include>**/TestIdTests.java</include>
+ <include>**/AllTests.java</include>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+
<properties>
</properties>
Modified: modules/test/trunk/unit/src/test/java/org/jboss/test/unit/AllTests.java
===================================================================
--- modules/test/trunk/unit/src/test/java/org/jboss/test/unit/AllTests.java 2007-11-07
19:02:05 UTC (rev 8841)
+++ modules/test/trunk/unit/src/test/java/org/jboss/test/unit/AllTests.java 2007-11-07
20:09:52 UTC (rev 8842)
@@ -22,28 +22,22 @@
******************************************************************************/
package org.jboss.test.unit;
-import org.jboss.test.unit.api.AssertTests;
+import junit.framework.TestCase;
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;
-import org.jboss.test.unit.runner.CompositeTestRunnerTests;
-import org.jboss.test.unit.runner.ParametrizationTests;
-import org.jboss.test.unit.runner.TestDriverRunnerTests;
-import org.jboss.test.unit.runner.GenericTestRunnerTests;
-import org.jboss.test.unit.runner.POJOTestRunnerTests;
-import org.jboss.test.unit.runner.event.TestRunnerEventBroadcasterSupportTests;
-import org.jboss.test.unit.runner.event.TestRunnerLifeCycleFilterTests;
-import org.jboss.test.unit.runner.model.ModelTests;
-import org.jboss.test.unit.info.InfoTests;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-public class AllTests
+public class AllTests extends TestCase
{
+ public void testAll() throws Exception
+ {
+ SampleTests.test1();
+ //SampleTests.test2();
+ }
+
public static void main(String[] args) throws Exception
{
// AssertTests.main(args);
@@ -67,7 +61,8 @@
// InfoTests.main(args);
//
- SampleTests.main(args);
+ AllTests allTests = new AllTests();
+ allTests.testAll();
//
// JUnitReporterTests.main(args);
Modified: modules/test/trunk/unit/src/test/java/org/jboss/test/unit/TestIdTests.java
===================================================================
--- modules/test/trunk/unit/src/test/java/org/jboss/test/unit/TestIdTests.java 2007-11-07
19:02:05 UTC (rev 8841)
+++ modules/test/trunk/unit/src/test/java/org/jboss/test/unit/TestIdTests.java 2007-11-07
20:09:52 UTC (rev 8842)
@@ -22,24 +22,24 @@
******************************************************************************/
package org.jboss.test.unit;
+import junit.framework.TestCase;
import org.jboss.unit.TestId;
+import static org.jboss.unit.api.Assert.assertNotEquals;
+import static org.jboss.unit.util.CollectionTools.list;
-import static org.jboss.unit.api.Assert.*;
-import static org.jboss.unit.util.CollectionTools.*;
-
+import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
-import java.util.ArrayList;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-public class TestIdTests
+public class TestIdTests extends TestCase
{
- public static void main(String[] args)
+ public void testAll() throws Exception
{
testEquals();
testCtor();
@@ -49,6 +49,13 @@
testGetNameThrowsIAE();
}
+
+ public static void main(String[] args) throws Exception
+ {
+ TestIdTests tests = new TestIdTests();
+ tests.testAll();
+ }
+
private static void testGetNameThrowsIAE()
{
try
Modified:
modules/test/trunk/unit/src/test/java/org/jboss/test/unit/sample/SampleTests.java
===================================================================
---
modules/test/trunk/unit/src/test/java/org/jboss/test/unit/sample/SampleTests.java 2007-11-07
19:02:05 UTC (rev 8841)
+++
modules/test/trunk/unit/src/test/java/org/jboss/test/unit/sample/SampleTests.java 2007-11-07
20:09:52 UTC (rev 8842)
@@ -55,7 +55,7 @@
}
- private static void test1()
+ public static void test1()
throws ParserConfigurationException, IOException, SAXException, BuilderException
{
InputStream in = SampleTests.class.getResourceAsStream("f1.xml");
@@ -71,7 +71,7 @@
runner.run(new TestRunnerContextSupport(broadcaster));
}
- private static void test2()
+ public static void test2()
throws ParserConfigurationException, IOException, SAXException, BuilderException
{
SystemOutputManager outputManager = new SystemOutputManager();