maven-surefire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dant...@apache.org
Subject svn commit: r686460 [1/2] - in /maven/surefire/trunk/surefire-integration-tests/src/test: java/org/apache/maven/surefire/its/ resources/additional-classpath/ resources/aggregate-report/ resources/argLine-parameter/ resources/classpath-order/ resources/...
Date Sat, 16 Aug 2008 08:00:18 GMT
Author: dantran
Date: Sat Aug 16 01:00:16 2008
New Revision: 686460

URL: http://svn.apache.org/viewvc?rev=686460&view=rev
Log:
SUREFIRE-513: Run IT maven projects with current built surefire. 

Modified:
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AbstractSurefireIT.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AbstractTestCaseTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AdditionalClasspathTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AggregateReportTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ArgLineTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ClassPathOrderTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/DefaultConfigurationTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/EnvironmentVariableTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ForkModeTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/JUnit44Dep.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Junit4VersionsTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/PlexusConflictTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SiblingAggregatorTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire146ForkPerTestNoSetupTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire162CharsetProviderTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire224WellFormedXmlFailuresTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire376TestNgAfterSuiteFailure.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire377TestNgAndJUnitTogetherTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire42NotExtendingTestCase.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire44InnerClassTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestFailIfNoTests.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestFailIfNoTestsForkMode.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestJUnit44Hamcrest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestJunit4Ignore.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgBeforeMethod.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgBeforeMethodFailure.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgExecuteErrorTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgGroupThreadParallel.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgJdk14Test.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgListenerReporter.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgPathWithSpaces.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgReportTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgSuiteXmlSingleTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgSuiteXmlTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgVersionsTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestPlainOldJavaClasspath.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestSingleTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestUseIsolatedClassLoader.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TimeoutForkedTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TwoTestCasesTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/UmlautDirTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/WorkingDirectoryTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/additional-classpath/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/aggregate-report/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/argLine-parameter/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/classpath-order/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/default-configuration-abstract/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/default-configuration-classWithNoTests/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/default-configuration-noTests/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/default-configuration/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/fork-mode/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/isolated-classloader/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/junit-innerClass/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/junit-notExtendingTestCase/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/junit-pathWithUmlaut/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/junit-twoTestCaseSuite/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/junit-twoTestCases/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/junit4-twoTestCaseSuite/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/junit4/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/junit44-dep/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/junit44-environment/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/junit44-hamcrest/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/junit44-ignore/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/large-test-results/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/plain-old-java-classpath/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/plexus-conflict/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/sibling-aggregator/aggregator/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-146-forkPerTestNoSetup/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-162-charsetProvider/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-224-wellFormedXmlFailures/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-afterSuiteFailure/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-beforeMethod/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-beforeMethodFailure/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-execute-error/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-group-thread-parallel/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-jdk14/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-junit-together/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-listener-reporter/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-path with spaces/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-simple/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-twoTestCaseSuite/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/timeout-forked/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/webapp/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/working-directory/pom.xml

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AbstractSurefireIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AbstractSurefireIT.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AbstractSurefireIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AbstractSurefireIT.java Sat Aug 16 01:00:16 2008
@@ -4,6 +4,9 @@
 
 import junit.framework.TestCase;
 
+import org.apache.maven.it.VerificationException;
+import org.apache.maven.it.Verifier;
+
 
 /**
  * Base class of all integration test cases. Mainly used to pickup surefire version
@@ -22,5 +25,13 @@
         goals.add( "-Dsurefire.version=" + surefireVersion );
         return goals;
     }
+    
+    protected void executeGoal( Verifier verifier, String goal )
+        throws VerificationException
+    {
+        ArrayList goals = this.getInitialGoals();
+        goals.add(  goal );
+        verifier.executeGoals( goals );
+    }
 
 }

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AbstractTestCaseTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AbstractTestCaseTest.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AbstractTestCaseTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AbstractTestCaseTest.java Sat Aug 16 01:00:16 2008
@@ -1,6 +1,5 @@
 package org.apache.maven.surefire.its;
 
-import junit.framework.TestCase;
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
 
@@ -14,7 +13,7 @@
  * 
  */
 public class AbstractTestCaseTest
-    extends TestCase
+    extends AbstractSurefireIT
 {
     public void testAbstractTestCase ()
         throws Exception
@@ -22,7 +21,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/default-configuration-abstract" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.executeGoal( "test" );
+        this.executeGoal( verifier, "test" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
         

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AdditionalClasspathTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AdditionalClasspathTest.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AdditionalClasspathTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AdditionalClasspathTest.java Sat Aug 16 01:00:16 2008
@@ -1,7 +1,6 @@
 package org.apache.maven.surefire.its;
 
 
-import junit.framework.TestCase;
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
 
@@ -14,7 +13,7 @@
  * 
  */
 public class AdditionalClasspathTest
-    extends TestCase
+    extends AbstractSurefireIT
 {
     public void testAdditionalClasspath ()
         throws Exception
@@ -22,7 +21,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/additional-classpath" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.executeGoal( "test" );
+        this.executeGoal( verifier, "test" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
         

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AggregateReportTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AggregateReportTest.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AggregateReportTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AggregateReportTest.java Sat Aug 16 01:00:16 2008
@@ -1,12 +1,10 @@
 package org.apache.maven.surefire.its;
 
 
-import junit.framework.TestCase;
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
 
 import java.io.File;
-import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -16,7 +14,7 @@
  * 
  */
 public class AggregateReportTest
-    extends TestCase
+    extends AbstractSurefireIT
 {
     public void testAggregateReport ()
         throws Exception
@@ -24,7 +22,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/aggregate-report" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        List goals = new ArrayList();
+        List goals = this.getInitialGoals();
         goals.add( "jxr:test-jxr" );
         goals.add( "surefire-report:report" );
         verifier.executeGoals( goals );

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ArgLineTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ArgLineTest.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ArgLineTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ArgLineTest.java Sat Aug 16 01:00:16 2008
@@ -1,7 +1,6 @@
 package org.apache.maven.surefire.its;
 
 
-import junit.framework.TestCase;
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
 
@@ -14,7 +13,7 @@
  * 
  */
 public class ArgLineTest
-    extends TestCase
+    extends AbstractSurefireIT
 {
     public void testArgLine ()
         throws Exception
@@ -22,7 +21,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/argLine-parameter" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.executeGoal( "test" );
+        this.executeGoal( verifier, "test" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
         

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ClassPathOrderTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ClassPathOrderTest.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ClassPathOrderTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ClassPathOrderTest.java Sat Aug 16 01:00:16 2008
@@ -1,12 +1,11 @@
 package org.apache.maven.surefire.its;
 
 
-import junit.framework.TestCase;
+import java.io.File;
+
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
 
-import java.io.File;
-
 /**
  * Test for checking the order of class path elements
  * 
@@ -14,7 +13,7 @@
  * 
  */
 public class ClassPathOrderTest
-    extends TestCase
+    extends AbstractSurefireIT
 {
     public void testClassPathOrder ()
         throws Exception
@@ -22,7 +21,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/classpath-order" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.executeGoal( "test" );
+        this.executeGoal( verifier, "test" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
         

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/DefaultConfigurationTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/DefaultConfigurationTest.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/DefaultConfigurationTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/DefaultConfigurationTest.java Sat Aug 16 01:00:16 2008
@@ -1,12 +1,11 @@
 package org.apache.maven.surefire.its;
 
 
-import junit.framework.TestCase;
+import java.io.File;
+
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
 
-import java.io.File;
-
 /**
  * Test basic default configuration, runs the JUnit 3 test in the src/test directory.
  * 
@@ -14,7 +13,7 @@
  * 
  */
 public class DefaultConfigurationTest
-    extends TestCase
+    extends AbstractSurefireIT
 {
     public void testDefaultConfiguration ()
         throws Exception
@@ -22,7 +21,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/default-configuration" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.executeGoal( "test" );
+        this.executeGoal( verifier, "test" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
         

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/EnvironmentVariableTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/EnvironmentVariableTest.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/EnvironmentVariableTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/EnvironmentVariableTest.java Sat Aug 16 01:00:16 2008
@@ -1,12 +1,11 @@
 package org.apache.maven.surefire.its;
 
 
-import junit.framework.TestCase;
+import java.io.File;
+
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
 
-import java.io.File;
-
 /**
  * Test basic default configuration, runs the JUnit 3 test in the src/test directory.
  * 
@@ -14,7 +13,7 @@
  * 
  */
 public class EnvironmentVariableTest
-    extends TestCase
+    extends AbstractSurefireIT
 {
     public void testEnvironmentVariable ()
         throws Exception
@@ -22,7 +21,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/junit44-environment" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.executeGoal( "test" );
+        this.executeGoal( verifier, "test" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
         

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ForkModeTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ForkModeTest.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ForkModeTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ForkModeTest.java Sat Aug 16 01:00:16 2008
@@ -1,19 +1,16 @@
 package org.apache.maven.surefire.its;
 
-
-import junit.framework.TestCase;
-import org.apache.maven.it.VerificationException;
-import org.apache.maven.it.Verifier;
-import org.apache.maven.it.util.ResourceExtractor;
-import org.apache.maven.reporting.MavenReportException;
-
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileReader;
 import java.io.IOException;
-import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.maven.it.VerificationException;
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
+import org.apache.maven.reporting.MavenReportException;
+
 /**
  * Test forkMode
  * 
@@ -21,37 +18,42 @@
  * 
  */
 public class ForkModeTest
-    extends TestCase
+    extends AbstractSurefireIT
 {
-    public void testForkModeAlways () throws Exception
+    public void testForkModeAlways()
+        throws Exception
     {
-        String[] pids = doTest("always");
-        
+        String[] pids = doTest( "always" );
+
         assertDifferentPids( pids );
     }
-    
-    public void testForkModePerTest() throws Exception
+
+    public void testForkModePerTest()
+        throws Exception
     {
         String[] pids = doTest( "pertest" );
 
         assertDifferentPids( pids );
     }
-    
-    public void testForkModeNever() throws Exception 
+
+    public void testForkModeNever()
+        throws Exception
     {
         String[] pids = doTest( "never" );
 
         assertSamePids( pids );
     }
-    
-    public void testForkModeNone() throws Exception 
+
+    public void testForkModeNone()
+        throws Exception
     {
         String[] pids = doTest( "none" );
 
         assertSamePids( pids );
     }
-    
-    public void testForkModeOnce() throws Exception 
+
+    public void testForkModeOnce()
+        throws Exception
     {
         String[] pids = doTest( "once" );
         // DGF It would be nice to assert that "once" was different
@@ -61,55 +63,63 @@
         assertSamePids( pids );
     }
 
-    private void assertSamePids ( String[] pids ) {
-        assertEquals ("pid 1 didn't match pid 2", pids[0], pids[1]);
-        assertEquals ("pid 1 didn't match pid 3", pids[0], pids[2]);
+    private void assertSamePids( String[] pids )
+    {
+        assertEquals( "pid 1 didn't match pid 2", pids[0], pids[1] );
+        assertEquals( "pid 1 didn't match pid 3", pids[0], pids[2] );
     }
-    
+
     private void assertDifferentPids( String[] pids )
     {
-        if (pids[0].equals( pids[1] )) {
-            fail ("pid 1 matched pid 2: " + pids[0]);
+        if ( pids[0].equals( pids[1] ) )
+        {
+            fail( "pid 1 matched pid 2: " + pids[0] );
         }
-        
-        if (pids[0].equals( pids[2] )) {
-            fail ("pid 1 matched pid 3: " + pids[0]);
+
+        if ( pids[0].equals( pids[2] ) )
+        {
+            fail( "pid 1 matched pid 3: " + pids[0] );
         }
-        
-        if (pids[1].equals( pids[2] )) {
-            fail ("pid 2 matched pid 3: " + pids[0]);
+
+        if ( pids[1].equals( pids[2] ) )
+        {
+            fail( "pid 2 matched pid 3: " + pids[0] );
         }
     }
 
-    private String[] doTest(String forkMode)
+    private String[] doTest( String forkMode )
         throws IOException, VerificationException, MavenReportException
     {
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/fork-mode" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        List goals = new ArrayList();
+        List goals = this.getInitialGoals();
         goals.add( "test" );
         goals.add( "-DforkMode=" + forkMode );
         verifier.executeGoals( goals );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
-        
+
         HelperAssertions.assertTestSuiteResults( 3, 0, 0, 0, testDir );
-        
-        File targetDir = new File(testDir, "target" );
+
+        File targetDir = new File( testDir, "target" );
         String[] pids = new String[3];
-        for (int i = 1; i <= pids.length; i++) {
-            File pidFile = new File(targetDir, "test" + i + "-pid");
+        for ( int i = 1; i <= pids.length; i++ )
+        {
+            File pidFile = new File( targetDir, "test" + i + "-pid" );
             String pid = slurpFile( pidFile );
-            pids[i-1] = pid;
+            pids[i - 1] = pid;
         }
         return pids;
     }
-    
-    private String slurpFile(File textFile) throws IOException {
+
+    private String slurpFile( File textFile )
+        throws IOException
+    {
         StringBuffer sb = new StringBuffer();
-        BufferedReader reader = new BufferedReader(new FileReader(textFile));
-        for (String line = reader.readLine(); line != null; line = reader.readLine()) {
+        BufferedReader reader = new BufferedReader( new FileReader( textFile ) );
+        for ( String line = reader.readLine(); line != null; line = reader.readLine() )
+        {
             sb.append( line );
         }
         reader.close();

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/JUnit44Dep.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/JUnit44Dep.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/JUnit44Dep.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/JUnit44Dep.java Sat Aug 16 01:00:16 2008
@@ -1,12 +1,11 @@
 package org.apache.maven.surefire.its;
 
 
-import junit.framework.TestCase;
+import java.io.File;
+
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
 
-import java.io.File;
-
 /**
  * Test project using JUnit4.4 -dep.  junit-dep includes only junit.* classes, and depends explicitly on hamcrest-core
  * 
@@ -14,7 +13,7 @@
  * 
  */
 public class JUnit44Dep
-    extends TestCase
+    extends AbstractSurefireIT
 {
     public void testJUnit44Dep ()
         throws Exception
@@ -22,7 +21,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/junit44-dep" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.executeGoal( "test" );
+        this.executeGoal( verifier, "test" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
         

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Junit4VersionsTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Junit4VersionsTest.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Junit4VersionsTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Junit4VersionsTest.java Sat Aug 16 01:00:16 2008
@@ -1,14 +1,12 @@
 package org.apache.maven.surefire.its;
 
 
-import junit.framework.TestCase;
-import org.apache.maven.it.Verifier;
-import org.apache.maven.it.util.ResourceExtractor;
-
 import java.io.File;
-import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
+
 /**
  * Basic suite test using all known versions of JUnit 4.x
  * 
@@ -16,7 +14,7 @@
  * 
  */
 public class Junit4VersionsTest
-    extends TestCase
+    extends AbstractSurefireIT
 {
     
     public void test40 () throws Exception
@@ -55,7 +53,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/junit4" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        List arguments = new ArrayList();
+        List arguments = this.getInitialGoals();
         arguments.add( "test" );
         // DGF we have to pass in the version as a command line argument
         // and NOT as a system property; otherwise our setting will be ignored

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/PlexusConflictTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/PlexusConflictTest.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/PlexusConflictTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/PlexusConflictTest.java Sat Aug 16 01:00:16 2008
@@ -1,13 +1,12 @@
 package org.apache.maven.surefire.its;
 
 
-import junit.framework.TestCase;
-import org.apache.maven.it.Verifier;
-import org.apache.maven.it.util.ResourceExtractor;
-
 import java.io.File;
 import java.util.ArrayList;
 
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
+
 /**
  * Test library using a conflicting version of plexus-utils
  *
@@ -15,7 +14,7 @@
  *
  */
 public class PlexusConflictTest
-    extends TestCase
+    extends AbstractSurefireIT
 {
     public void testPlexusConflict ()
         throws Exception
@@ -23,7 +22,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/plexus-conflict" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.executeGoal( "test" );
+        this.executeGoal( verifier, "test" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
 
@@ -36,7 +35,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/plexus-conflict" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        ArrayList goals = new ArrayList();
+        ArrayList goals = this.getInitialGoals();
         goals.add( "test" );
         goals.add( "-Dsurefire.useSystemClassLoader=false" );
         verifier.executeGoals( goals );

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SiblingAggregatorTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SiblingAggregatorTest.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SiblingAggregatorTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SiblingAggregatorTest.java Sat Aug 16 01:00:16 2008
@@ -1,12 +1,11 @@
 package org.apache.maven.surefire.its;
 
 
-import junit.framework.TestCase;
+import java.io.File;
+
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
 
-import java.io.File;
-
 /**
  * Test aggregator as a sibling to child modules; invokes modules as "../child"
  * 
@@ -14,7 +13,7 @@
  * 
  */
 public class SiblingAggregatorTest
-    extends TestCase
+    extends AbstractSurefireIT
 {
     public void testSiblingAggregator ()
         throws Exception
@@ -24,7 +23,7 @@
         File aggregatorDir = new File( testDir, "aggregator" );
         
         Verifier verifier = new Verifier( aggregatorDir.getAbsolutePath() );
-        verifier.executeGoal( "test" );
+        this.executeGoal( verifier, "test" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
         

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire146ForkPerTestNoSetupTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire146ForkPerTestNoSetupTest.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire146ForkPerTestNoSetupTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire146ForkPerTestNoSetupTest.java Sat Aug 16 01:00:16 2008
@@ -1,12 +1,11 @@
 package org.apache.maven.surefire.its;
 
 
-import junit.framework.TestCase;
+import java.io.File;
+
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
 
-import java.io.File;
-
 /**
  * Test Surefire-146 (forkMode=pertest fails to call setUp)
  * 
@@ -14,7 +13,7 @@
  * 
  */
 public class Surefire146ForkPerTestNoSetupTest
-    extends TestCase
+    extends AbstractSurefireIT
 {
     public void testForkPerTestNoSetup ()
         throws Exception
@@ -22,7 +21,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/surefire-146-forkPerTestNoSetup" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.executeGoal( "test" );
+        this.executeGoal( verifier, "test" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
         

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire162CharsetProviderTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire162CharsetProviderTest.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire162CharsetProviderTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire162CharsetProviderTest.java Sat Aug 16 01:00:16 2008
@@ -1,13 +1,12 @@
 package org.apache.maven.surefire.its;
 
 
-import junit.framework.TestCase;
+import java.io.File;
+
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
 import org.codehaus.plexus.util.FileUtils;
 
-import java.io.File;
-
 /**
  * Test charset provider (SUREFIRE-162)
  * 
@@ -15,7 +14,7 @@
  * 
  */
 public class Surefire162CharsetProviderTest
-    extends TestCase
+    extends AbstractSurefireIT
 {
     public void testCharsetProvider ()
         throws Exception
@@ -27,7 +26,7 @@
         jarFile.getParentFile().mkdirs();
         FileUtils.copyFile( new File( testDir, "repo/jcharset/jcharset/1.2.1/jcharset-1.2.1.jar" ), jarFile );
         FileUtils.copyFile( new File( testDir, "repo/jcharset/jcharset/1.2.1/jcharset-1.2.1.pom" ), new File( verifier.getArtifactPath( "jcharset", "jcharset", "1.2.1", "pom" ) ) );
-        verifier.executeGoal( "test" );
+        this.executeGoal( verifier, "test" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
         

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire224WellFormedXmlFailuresTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire224WellFormedXmlFailuresTest.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire224WellFormedXmlFailuresTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire224WellFormedXmlFailuresTest.java Sat Aug 16 01:00:16 2008
@@ -1,15 +1,14 @@
 package org.apache.maven.surefire.its;
 
 
-import junit.framework.TestCase;
+import java.io.File;
+import java.util.List;
+
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
 import org.apache.maven.plugins.surefire.report.ReportTestCase;
 import org.apache.maven.plugins.surefire.report.ReportTestSuite;
 
-import java.io.File;
-import java.util.List;
-
 /**
  * Test Surefire-224 (XML test reports are not well-formed when failure message contains quotes)
  * 
@@ -17,7 +16,7 @@
  * 
  */
 public class Surefire224WellFormedXmlFailuresTest
-    extends TestCase
+    extends AbstractSurefireIT
 {
     public void testWellFormedXmlFailures ()
         throws Exception
@@ -25,7 +24,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/surefire-224-wellFormedXmlFailures" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.executeGoal( "test" );
+        this.executeGoal( verifier, "test" );
         // DGF Don't verify error free log; we expect failures
         // verifier.verifyErrorFreeLog();
         verifier.resetStreams();

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire376TestNgAfterSuiteFailure.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire376TestNgAfterSuiteFailure.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire376TestNgAfterSuiteFailure.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire376TestNgAfterSuiteFailure.java Sat Aug 16 01:00:16 2008
@@ -1,12 +1,11 @@
 package org.apache.maven.surefire.its;
 
 
-import junit.framework.TestCase;
+import java.io.File;
+
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
 
-import java.io.File;
-
 /**
  * Test Surefire-376 (TestNG @AfterSuite failures are ignored)
  * 
@@ -14,7 +13,7 @@
  * 
  */
 public class Surefire376TestNgAfterSuiteFailure
-    extends TestCase
+    extends AbstractSurefireIT
 {
     public void testAfterSuiteFailure ()
         throws Exception
@@ -22,7 +21,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-afterSuiteFailure" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.executeGoal( "test" );
+        this.executeGoal( verifier, "test" );
         // DGF Don't verify error free log; we expect failures
         // verifier.verifyErrorFreeLog();
         verifier.resetStreams();

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire377TestNgAndJUnitTogetherTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire377TestNgAndJUnitTogetherTest.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire377TestNgAndJUnitTogetherTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire377TestNgAndJUnitTogetherTest.java Sat Aug 16 01:00:16 2008
@@ -1,12 +1,11 @@
 package org.apache.maven.surefire.its;
 
 
-import junit.framework.TestCase;
+import java.io.File;
+
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
 
-import java.io.File;
-
 /**
  * SUREFIRE-377 (When JUnit and TestNG tests are in same project, only one set gets run).
  * 
@@ -14,7 +13,7 @@
  * 
  */
 public class Surefire377TestNgAndJUnitTogetherTest
-    extends TestCase
+    extends AbstractSurefireIT
 {
     public void testTestNgAndJUnitTogether ()
         throws Exception
@@ -22,7 +21,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-junit-together" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.executeGoal( "test" );
+        this.executeGoal( verifier, "test" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
         

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire42NotExtendingTestCase.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire42NotExtendingTestCase.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire42NotExtendingTestCase.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire42NotExtendingTestCase.java Sat Aug 16 01:00:16 2008
@@ -1,12 +1,11 @@
 package org.apache.maven.surefire.its;
 
 
-import junit.framework.TestCase;
+import java.io.File;
+
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
 
-import java.io.File;
-
 /**
  * Test JUnit test that contains inner classes
  * 
@@ -14,7 +13,7 @@
  * 
  */
 public class Surefire42NotExtendingTestCase
-    extends TestCase
+    extends AbstractSurefireIT
 {
     public void testInnerClass ()
         throws Exception
@@ -22,7 +21,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/junit-notExtendingTestCase" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.executeGoal( "test" );
+        this.executeGoal( verifier, "test" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
         

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire44InnerClassTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire44InnerClassTest.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire44InnerClassTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire44InnerClassTest.java Sat Aug 16 01:00:16 2008
@@ -1,12 +1,11 @@
 package org.apache.maven.surefire.its;
 
 
-import junit.framework.TestCase;
+import java.io.File;
+
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
 
-import java.io.File;
-
 /**
  * Test JUnit test that contains inner classes
  * 
@@ -14,7 +13,7 @@
  * 
  */
 public class Surefire44InnerClassTest
-    extends TestCase
+    extends AbstractSurefireIT
 {
     public void testInnerClass ()
         throws Exception
@@ -22,7 +21,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/junit-innerClass" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.executeGoal( "test" );
+        this.executeGoal( verifier, "test" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
         

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestFailIfNoTests.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestFailIfNoTests.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestFailIfNoTests.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestFailIfNoTests.java Sat Aug 16 01:00:16 2008
@@ -1,15 +1,13 @@
 package org.apache.maven.surefire.its;
 
 
-import junit.framework.TestCase;
+import java.io.File;
+import java.util.List;
+
 import org.apache.maven.it.VerificationException;
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
 
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
 /**
  * Test failIfNoTests
  * 
@@ -17,7 +15,7 @@
  * 
  */
 public class TestFailIfNoTests
-    extends TestCase
+    extends AbstractSurefireIT
 {
     public void testFailIfNoTests ()
         throws Exception
@@ -25,7 +23,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/default-configuration-noTests" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        List goals = new ArrayList();
+        List goals = this.getInitialGoals();
         goals.add( "test" );
         goals.add( "-DfailIfNoTests" );
 
@@ -53,7 +51,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/default-configuration-noTests" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.executeGoal( "test" );
+        this.executeGoal( verifier, "test" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
 

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestFailIfNoTestsForkMode.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestFailIfNoTestsForkMode.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestFailIfNoTestsForkMode.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestFailIfNoTestsForkMode.java Sat Aug 16 01:00:16 2008
@@ -1,17 +1,15 @@
 package org.apache.maven.surefire.its;
 
 
-import junit.framework.TestCase;
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+
 import org.apache.maven.it.VerificationException;
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
 import org.apache.maven.reporting.MavenReportException;
 
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
 /**
  * Test failIfNoTests with various forkModes.
  * 
@@ -19,7 +17,7 @@
  * 
  */
 public class TestFailIfNoTestsForkMode
-    extends TestCase
+    extends AbstractSurefireIT
 {
     public void testFailIfNoTestsForkModeAlways () throws Exception
     {
@@ -57,7 +55,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/default-configuration-classWithNoTests" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        List goals = new ArrayList();
+        List goals = this.getInitialGoals();
         goals.add( "test" );
         goals.add( "-DforkMode=" + forkMode );
         goals.add( "-DfailIfNoTests=" + failIfNoTests );

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestJUnit44Hamcrest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestJUnit44Hamcrest.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestJUnit44Hamcrest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestJUnit44Hamcrest.java Sat Aug 16 01:00:16 2008
@@ -1,12 +1,11 @@
 package org.apache.maven.surefire.its;
 
 
-import junit.framework.TestCase;
+import java.io.File;
+
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
 
-import java.io.File;
-
 /**
  * Test project using JUnit4.4 (including Hamcrest extensions)
  * 
@@ -14,7 +13,7 @@
  * 
  */
 public class TestJUnit44Hamcrest
-    extends TestCase
+    extends AbstractSurefireIT
 {
     public void testJUnit44Hamcrest ()
         throws Exception
@@ -22,7 +21,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/junit44-hamcrest" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.executeGoal( "test" );
+        this.executeGoal( verifier, "test" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
         

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestJunit4Ignore.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestJunit4Ignore.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestJunit4Ignore.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestJunit4Ignore.java Sat Aug 16 01:00:16 2008
@@ -1,12 +1,11 @@
 package org.apache.maven.surefire.its;
 
 
-import junit.framework.TestCase;
+import java.io.File;
+
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
 
-import java.io.File;
-
 /**
  * Test JUnit 4 tests marked with "Ignore" attribute 
  * 
@@ -14,7 +13,7 @@
  * 
  */
 public class TestJunit4Ignore
-    extends TestCase
+    extends AbstractSurefireIT
 {
     public void testJunit4Ignore ()
         throws Exception
@@ -22,7 +21,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/junit44-ignore" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.executeGoal( "test" );
+        this.executeGoal( verifier, "test" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
         

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgBeforeMethod.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgBeforeMethod.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgBeforeMethod.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgBeforeMethod.java Sat Aug 16 01:00:16 2008
@@ -1,12 +1,11 @@
 package org.apache.maven.surefire.its;
 
 
-import junit.framework.TestCase;
+import java.io.File;
+
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
 
-import java.io.File;
-
 /**
  * Test @BeforeMethod annotation on TestNg suite
  * 
@@ -14,7 +13,7 @@
  * 
  */
 public class TestNgBeforeMethod
-    extends TestCase
+    extends AbstractSurefireIT
 {
     public void testTestNgBeforeMethod ()
         throws Exception
@@ -22,7 +21,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-beforeMethod" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.executeGoal( "test" );
+        this.executeGoal( verifier, "test" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
         

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgBeforeMethodFailure.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgBeforeMethodFailure.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgBeforeMethodFailure.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgBeforeMethodFailure.java Sat Aug 16 01:00:16 2008
@@ -1,13 +1,12 @@
 package org.apache.maven.surefire.its;
 
 
-import junit.framework.TestCase;
+import java.io.File;
+
 import org.apache.maven.it.VerificationException;
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
 
-import java.io.File;
-
 /**
  * Test failures in @BeforeMethod annotation on TestNg suite
  * 
@@ -15,7 +14,7 @@
  * 
  */
 public class TestNgBeforeMethodFailure
-    extends TestCase
+    extends AbstractSurefireIT
 {
     public void testTestNgBeforeMethodFailure ()
         throws Exception
@@ -25,7 +24,7 @@
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
         try
         {
-            verifier.executeGoal( "test" );
+            this.executeGoal( verifier, "test" );
             verifier.resetStreams();
             verifier.verifyErrorFreeLog();
             fail( "Build didn't fail, but it should" );

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgExecuteErrorTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgExecuteErrorTest.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgExecuteErrorTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgExecuteErrorTest.java Sat Aug 16 01:00:16 2008
@@ -1,14 +1,11 @@
 package org.apache.maven.surefire.its;
 
-
-import junit.framework.TestCase;
+import java.io.File;
 
 import org.apache.maven.it.VerificationException;
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
 
-import java.io.File;
-
 /**
  * Test for checking that the output from a forked suite is properly captured even if the suite encounters a severe error.
  * 
@@ -16,7 +13,7 @@
  * 
  */
 public class TestNgExecuteErrorTest
-    extends TestCase
+    extends AbstractSurefireIT
 {
     public void testExecuteError()
         throws Exception
@@ -24,9 +21,14 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-execute-error" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        try {
-            verifier.executeGoal( "test" );
-        } catch (VerificationException e) {} // expected 
+        try
+        {
+            this.executeGoal( verifier, "test" );
+        }
+        catch ( VerificationException e )
+        {
+        } // expected 
+        
         verifier.resetStreams();
         assertTrue( new File( testDir, "target/surefire-reports/TestSuite-output.txt" ).length() > 0 );
     }

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgGroupThreadParallel.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgGroupThreadParallel.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgGroupThreadParallel.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgGroupThreadParallel.java Sat Aug 16 01:00:16 2008
@@ -1,12 +1,11 @@
 package org.apache.maven.surefire.its;
 
 
-import junit.framework.TestCase;
+import java.io.File;
+
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
 
-import java.io.File;
-
 /**
  * Test TestNG groups, together with TestNG parallelism
  * 
@@ -14,7 +13,7 @@
  * 
  */
 public class TestNgGroupThreadParallel
-    extends TestCase
+    extends AbstractSurefireIT
 {
     public void testTestNgGroupThreadParallel ()
         throws Exception
@@ -22,7 +21,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-group-thread-parallel" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.executeGoal( "test" );
+        this.executeGoal( verifier, "test" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
         

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgJdk14Test.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgJdk14Test.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgJdk14Test.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgJdk14Test.java Sat Aug 16 01:00:16 2008
@@ -1,12 +1,11 @@
 package org.apache.maven.surefire.its;
 
 
-import junit.framework.TestCase;
+import java.io.File;
+
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
 
-import java.io.File;
-
 /**
  * Test TestNG running in the JDK 1.4 JavaDoc style
  * 
@@ -14,7 +13,7 @@
  * 
  */
 public class TestNgJdk14Test
-    extends TestCase
+    extends AbstractSurefireIT
 {
     public void testTestNgJdk14 ()
         throws Exception
@@ -22,7 +21,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-jdk14" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.executeGoal( "test" );
+        this.executeGoal( verifier, "test" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
         

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgListenerReporter.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgListenerReporter.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgListenerReporter.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgListenerReporter.java Sat Aug 16 01:00:16 2008
@@ -1,12 +1,11 @@
 package org.apache.maven.surefire.its;
 
 
-import junit.framework.TestCase;
+import java.io.File;
+
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
 
-import java.io.File;
-
 /**
  * Test simple TestNG listener and reporter
  * 
@@ -14,7 +13,7 @@
  * 
  */
 public class TestNgListenerReporter
-    extends TestCase
+    extends AbstractSurefireIT
 {
     public void testTestNgListenerReporter ()
         throws Exception
@@ -22,7 +21,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-listener-reporter" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.executeGoal( "test" );
+        this.executeGoal( verifier, "test" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
         

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgPathWithSpaces.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgPathWithSpaces.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgPathWithSpaces.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgPathWithSpaces.java Sat Aug 16 01:00:16 2008
@@ -1,12 +1,11 @@
 package org.apache.maven.surefire.its;
 
 
-import junit.framework.TestCase;
+import java.io.File;
+
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
 
-import java.io.File;
-
 /**
  * Test TestNG test in a directory with spaces
  * 
@@ -14,7 +13,7 @@
  * 
  */
 public class TestNgPathWithSpaces
-    extends TestCase
+    extends AbstractSurefireIT
 {
     public void testTestNgTestWithSpaces ()
         throws Exception
@@ -22,7 +21,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-path with spaces" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.executeGoal( "test" );
+        this.executeGoal( verifier, "test" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
         

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgReportTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgReportTest.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgReportTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgReportTest.java Sat Aug 16 01:00:16 2008
@@ -1,12 +1,12 @@
 package org.apache.maven.surefire.its;
 
+import java.io.File;
+
 import junit.framework.Assert;
-import junit.framework.TestCase;
+
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
 
-import java.io.File;
-
 /**
  * Test surefire-report on TestNG test
  * 
@@ -14,7 +14,7 @@
  * 
  */
 public class TestNgReportTest
-    extends TestCase
+    extends AbstractSurefireIT
 {
     public void testTestNgReport ()
         throws Exception
@@ -22,7 +22,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-simple" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.executeGoal( "surefire-report:report" );
+        this.executeGoal( verifier, "surefire-report:report" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
         

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgSuiteXmlSingleTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgSuiteXmlSingleTest.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgSuiteXmlSingleTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgSuiteXmlSingleTest.java Sat Aug 16 01:00:16 2008
@@ -1,15 +1,11 @@
 package org.apache.maven.surefire.its;
 
 
-import junit.framework.TestCase;
-import org.apache.maven.it.Verifier;
-import org.apache.maven.it.util.ResourceExtractor;
-
 import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.List;
-import java.util.Set;
+
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
 
 /**
  * Use -Dtest to run a single TestNG test, overriding the suite XML parameter.
@@ -18,7 +14,7 @@
  * 
  */
 public class TestNgSuiteXmlSingleTest
-    extends TestCase
+    extends AbstractSurefireIT
 {
     public void testTestNGSuite()
         throws Exception
@@ -26,7 +22,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-twoTestCaseSuite" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        List goals = new ArrayList();
+        List goals = this.getInitialGoals();
         goals.add( "test" );
         goals.add( "-Dtest=TestNGTestTwo" );
         verifier.executeGoals( goals );
@@ -35,7 +31,7 @@
 
         List reports = HelperAssertions.extractReports( ( new File[] { testDir } ) );
         ITSuiteResults results = HelperAssertions.parseReportList( reports );
-        HelperAssertions.assertTestSuiteResults( 2, 0, 0, 0, results );
+        HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, results );
     }
 
 }

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgSuiteXmlTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgSuiteXmlTest.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgSuiteXmlTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgSuiteXmlTest.java Sat Aug 16 01:00:16 2008
@@ -1,7 +1,6 @@
 package org.apache.maven.surefire.its;
 
 
-import junit.framework.TestCase;
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
 

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgVersionsTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgVersionsTest.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgVersionsTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgVersionsTest.java Sat Aug 16 01:00:16 2008
@@ -1,14 +1,12 @@
 package org.apache.maven.surefire.its;
 
 
-import junit.framework.TestCase;
-import org.apache.maven.it.Verifier;
-import org.apache.maven.it.util.ResourceExtractor;
-
 import java.io.File;
-import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
+
 /**
  * Basic suite test using all known versions of TestNG
  * 
@@ -16,7 +14,7 @@
  * 
  */
 public class TestNgVersionsTest
-    extends TestCase
+    extends AbstractSurefireIT
 {
     
     public void test47 () throws Exception
@@ -67,7 +65,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-simple" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        List arguments = new ArrayList();
+        List arguments = this.getInitialGoals();
         arguments.add( "test" );
         // DGF we have to pass in the version as a command line argument
         // and NOT as a system property; otherwise our setting will be ignored

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestPlainOldJavaClasspath.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestPlainOldJavaClasspath.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestPlainOldJavaClasspath.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestPlainOldJavaClasspath.java Sat Aug 16 01:00:16 2008
@@ -1,12 +1,11 @@
 package org.apache.maven.surefire.its;
 
 
-import junit.framework.TestCase;
+import java.io.File;
+
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
 
-import java.io.File;
-
 /**
  * Test useManifestOnlyJar option
  * 
@@ -14,7 +13,7 @@
  * 
  */
 public class TestPlainOldJavaClasspath
-    extends TestCase
+    extends AbstractSurefireIT
 {
     public void testPlainOldJavaClasspath ()
         throws Exception
@@ -22,7 +21,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/plain-old-java-classpath" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.executeGoal( "test" );
+        this.executeGoal( verifier, "test" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
         

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestSingleTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestSingleTest.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestSingleTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestSingleTest.java Sat Aug 16 01:00:16 2008
@@ -1,15 +1,14 @@
 package org.apache.maven.surefire.its;
 
 
-import junit.framework.TestCase;
-import org.apache.maven.it.VerificationException;
-import org.apache.maven.it.Verifier;
-import org.apache.maven.it.util.ResourceExtractor;
-
 import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.maven.it.VerificationException;
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
+
 /**
  * Test running a single test with -Dtest=BasicTest
  * 
@@ -17,7 +16,7 @@
  * 
  */
 public class TestSingleTest
-    extends TestCase
+    extends AbstractSurefireIT
 {
     public void testSingleTest ()
         throws Exception
@@ -25,7 +24,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/default-configuration" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        List goals = new ArrayList();
+        List goals = this.getInitialGoals();
         goals.add( "test" );
         goals.add( "-Dtest=BasicTest" );
         verifier.executeGoals( goals );
@@ -41,7 +40,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/default-configuration" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        List goals = new ArrayList();
+        List goals = this.getInitialGoals();
         goals.add( "test" );
         goals.add( "-Dtest=BasicTest.java" );
         verifier.executeGoals( goals );
@@ -57,7 +56,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/default-configuration" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        List goals = new ArrayList();
+        List goals = this.getInitialGoals();
         goals.add( "test" );
         goals.add( "-Dtest=DoesNotExist" );
 
@@ -86,7 +85,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/default-configuration" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        List goals = new ArrayList();
+        List goals = this.getInitialGoals();
         goals.add( "test" );
         goals.add( "-Dtest=DoesNotExist" );
         goals.add( "-DfailIfNoTests=false" );

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestUseIsolatedClassLoader.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestUseIsolatedClassLoader.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestUseIsolatedClassLoader.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestUseIsolatedClassLoader.java Sat Aug 16 01:00:16 2008
@@ -1,12 +1,11 @@
 package org.apache.maven.surefire.its;
 
 
-import junit.framework.TestCase;
+import java.io.File;
+
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
 
-import java.io.File;
-
 /**
  * Test useSystemClassLoader option
  * 
@@ -14,7 +13,7 @@
  * 
  */
 public class TestUseIsolatedClassLoader
-    extends TestCase
+    extends AbstractSurefireIT
 {
     public void testUseSystemClassLoader ()
         throws Exception
@@ -22,7 +21,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/isolated-classloader" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.executeGoal( "test" );
+        this.executeGoal( verifier, "test" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
         

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TimeoutForkedTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TimeoutForkedTest.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TimeoutForkedTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TimeoutForkedTest.java Sat Aug 16 01:00:16 2008
@@ -1,13 +1,11 @@
 package org.apache.maven.surefire.its;
 
+import java.io.File;
 
-import junit.framework.TestCase;
 import org.apache.maven.it.VerificationException;
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
 
-import java.io.File;
-
 /**
  * Test 
  * 
@@ -15,20 +13,22 @@
  * 
  */
 public class TimeoutForkedTest
-    extends TestCase
+    extends AbstractSurefireIT
 {
-    public void testTimeoutForked ()
+    public void testTimeoutForked()
         throws Exception
     {
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/timeout-forked" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
 
-        try {
-            verifier.executeGoal( "test" );
+        try
+        {
+            this.executeGoal( verifier, "test" );
             verifier.verifyErrorFreeLog();
             fail( "Build didn't fail, but it should have" );
-        } catch (VerificationException e) 
+        }
+        catch ( VerificationException e )
         {
             // as expected
         }
@@ -36,6 +36,6 @@
         {
             verifier.resetStreams();
         }
-        
+
     }
 }

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TwoTestCasesTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TwoTestCasesTest.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TwoTestCasesTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TwoTestCasesTest.java Sat Aug 16 01:00:16 2008
@@ -5,8 +5,6 @@
 import java.util.List;
 import java.util.Set;
 
-import junit.framework.TestCase;
-
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
 import org.apache.maven.plugins.surefire.report.ReportTestSuite;
@@ -17,7 +15,7 @@
  * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
  */
 public class TwoTestCasesTest
-    extends TestCase
+    extends AbstractSurefireIT
 {
     public void testTwoTestCases()
         throws Exception
@@ -25,7 +23,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/junit-twoTestCases" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.executeGoal( "test" );
+        this.executeGoal( verifier, "test" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
 
@@ -39,7 +37,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/junit-twoTestCaseSuite" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.executeGoal( "test" );
+        this.executeGoal( verifier, "test" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
         List reports = HelperAssertions.extractReports( (new File[] { testDir }) );
@@ -75,7 +73,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/junit4-twoTestCaseSuite" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.executeGoal( "test" );
+        this.executeGoal( verifier, "test" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
 
@@ -94,7 +92,7 @@
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-twoTestCaseSuite" );
 
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.executeGoal( "test" );
+        this.executeGoal( verifier, "test" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
 

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/UmlautDirTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/UmlautDirTest.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/UmlautDirTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/UmlautDirTest.java Sat Aug 16 01:00:16 2008
@@ -1,15 +1,13 @@
 package org.apache.maven.surefire.its;
 
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
 
-import junit.framework.TestCase;
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.FileUtils;
 import org.apache.maven.it.util.ResourceExtractor;
 
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-
 /**
  * Test a directory with an umlaut
  * 
@@ -17,26 +15,26 @@
  * 
  */
 public class UmlautDirTest
-    extends TestCase
+    extends AbstractSurefireIT
 {
     File testDir;
 
-    public void testUmlaut ()
+    public void testUmlaut()
         throws Exception
     {
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.executeGoal( "test" );
+        this.executeGoal( verifier, "test" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
-        
+
         HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
     }
 
-    public void testUmlautIsolatedClassLoader ()
+    public void testUmlautIsolatedClassLoader()
         throws Exception
     {
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        ArrayList goals = new ArrayList();
+        ArrayList goals = this.getInitialGoals();
         goals.add( "test" );
         goals.add( "-DuseSystemClassLoader=false" );
         verifier.executeGoals( goals );
@@ -50,13 +48,14 @@
         throws IOException
     {
         String tempDirPath = System.getProperty( "maven.test.tmpdir", System.getProperty( "java.io.tmpdir" ) );
-        File tempDir = new File(tempDirPath);
-        File targetDir = new File("target").getAbsoluteFile();
-        if (targetDir.exists() && targetDir.isDirectory()) {
+        File tempDir = new File( tempDirPath );
+        File targetDir = new File( "target" ).getAbsoluteFile();
+        if ( targetDir.exists() && targetDir.isDirectory() )
+        {
             tempDir = targetDir;
         }
         testDir = new File( tempDir, "/junit-pathWith\u00DCmlaut" );
         FileUtils.deleteDirectory( testDir );
-        testDir = ResourceExtractor.extractResourcePath(getClass(), "/junit-pathWithUmlaut", testDir, true);
+        testDir = ResourceExtractor.extractResourcePath( getClass(), "/junit-pathWithUmlaut", testDir, true );
     }
 }

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/WorkingDirectoryTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/WorkingDirectoryTest.java?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/WorkingDirectoryTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/WorkingDirectoryTest.java Sat Aug 16 01:00:16 2008
@@ -1,14 +1,11 @@
 package org.apache.maven.surefire.its;
 
-
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Properties;
 
-import junit.framework.TestCase;
-
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
 
@@ -19,34 +16,39 @@
  * 
  */
 public class WorkingDirectoryTest
-    extends TestCase
+    extends AbstractSurefireIT
 {
-    
+
     private File testDir;
+
     private File childTestDir;
+
     private File targetDir;
+
     private File outFile;
 
-    public void setUp() throws IOException {
+    public void setUp()
+        throws IOException
+    {
         testDir = ResourceExtractor.simpleExtractResources( getClass(), "/working-directory" );
         childTestDir = new File( testDir, "child" );
         targetDir = new File( childTestDir, "target" );
         outFile = new File( targetDir, "out.txt" );
         outFile.delete();
     }
-    
-    public void testWorkingDirectory ()
+
+    public void testWorkingDirectory()
         throws Exception
     {
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.executeGoal( "test" );
+        this.executeGoal( verifier, "test" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
-        
+
         HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, childTestDir );
         verifyOutputDirectory( childTestDir );
     }
-    
+
     public void verifyOutputDirectory( File childTestDir )
         throws IOException
     {
@@ -60,13 +62,13 @@
         File userDir = new File( userDirPath );
         assertEquals( "wrong user.dir", childTestDir.getAbsolutePath(), userDir.getAbsolutePath() );
     }
-    
+
     public void testWorkingDirectoryNoFork()
         throws Exception
     {
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        ArrayList goals = new ArrayList();
-        goals.add( "test");
+        ArrayList goals = this.getInitialGoals();
+        goals.add( "test" );
         goals.add( "-DforkMode=never" );
         verifier.executeGoals( goals );
         verifier.verifyErrorFreeLog();
@@ -75,12 +77,12 @@
         HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, childTestDir );
         verifyOutputDirectory( childTestDir );
     }
-    
+
     public void testWorkingDirectoryChildOnly()
         throws Exception
-    {   
+    {
         Verifier verifier = new Verifier( childTestDir.getAbsolutePath() );
-        verifier.executeGoal( "test" );
+        this.executeGoal( verifier, "test" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
 
@@ -88,15 +90,13 @@
         verifyOutputDirectory( childTestDir );
     }
 
-    
-    
     public void testWorkingDirectoryChildOnlyNoFork()
         throws Exception
     {
-        
+
         Verifier verifier = new Verifier( childTestDir.getAbsolutePath() );
-        ArrayList goals = new ArrayList();
-        goals.add( "test");
+        ArrayList goals = this.getInitialGoals();
+        goals.add( "test" );
         goals.add( "-DforkMode=never" );
         verifier.executeGoals( goals );
         verifier.verifyErrorFreeLog();

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/resources/additional-classpath/pom.xml
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/additional-classpath/pom.xml?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/resources/additional-classpath/pom.xml (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/resources/additional-classpath/pom.xml Sat Aug 16 01:00:16 2008
@@ -32,6 +32,7 @@
     <plugins>
       <plugin>
         <artifactId>maven-surefire-plugin</artifactId>
+        <version>${surefire.version}</version>
         <configuration>
           <additionalClasspathElements>
             <additionalClasspathElement>${basedir}/extraResource</additionalClasspathElement>

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/resources/aggregate-report/pom.xml
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/aggregate-report/pom.xml?rev=686460&r1=686459&r2=686460&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/resources/aggregate-report/pom.xml (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/resources/aggregate-report/pom.xml Sat Aug 16 01:00:16 2008
@@ -37,6 +37,7 @@
     <plugins>
       <plugin>
         <artifactId>maven-surefire-plugin</artifactId>
+        <version>${surefire.version}</version>
         <configuration>
           <testFailureIgnore>true</testFailureIgnore>
         </configuration>



Mime
View raw message