maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krosenv...@apache.org
Subject svn commit: r1226938 - in /maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its: AbstractTestCaseIT.java AdditionalClasspathIT.java AggregateReportIT.java
Date Tue, 03 Jan 2012 20:27:13 GMT
Author: krosenvold
Date: Tue Jan  3 20:27:12 2012
New Revision: 1226938

URL: http://svn.apache.org/viewvc?rev=1226938&view=rev
Log:
o Updated more IT's

Modified:
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AbstractTestCaseIT.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AdditionalClasspathIT.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AggregateReportIT.java

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AbstractTestCaseIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AbstractTestCaseIT.java?rev=1226938&r1=1226937&r2=1226938&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AbstractTestCaseIT.java
(original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AbstractTestCaseIT.java
Tue Jan  3 20:27:12 2012
@@ -19,12 +19,6 @@ package org.apache.maven.surefire.its;
  * under the License.
  */
 
-import org.apache.maven.it.Verifier;
-import org.apache.maven.it.util.ResourceExtractor;
-import org.apache.maven.surefire.its.misc.HelperAssertions;
-
-import java.io.File;
-
 /**
  * Test files with "Abstract" in their name that aren't really abstract,
  * and abstract classes that don't say "Abstract" in their name
@@ -32,19 +26,20 @@ import java.io.File;
  * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
  */
 public class AbstractTestCaseIT
-    extends AbstractSurefireIntegrationTestClass
+    extends SurefireVerifierTestClass
 {
+
+    public AbstractTestCaseIT()
+    {
+        super( "/default-configuration-abstract" );
+    }
+
     public void testAbstractTestCase()
         throws Exception
     {
-        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/default-configuration-abstract"
);
-
-        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        this.executeGoal( verifier, "test" );
-        verifier.verifyErrorFreeLog();
-        verifier.resetStreams();
-
-        HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
+        executeTest();
+        verifyErrorFreeLog();
+        assertTestSuiteResults( 1, 0, 0, 0 );
     }
 
 }

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AdditionalClasspathIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AdditionalClasspathIT.java?rev=1226938&r1=1226937&r2=1226938&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AdditionalClasspathIT.java
(original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AdditionalClasspathIT.java
Tue Jan  3 20:27:12 2012
@@ -19,30 +19,25 @@ package org.apache.maven.surefire.its;
  * under the License.
  */
 
-import org.apache.maven.it.Verifier;
-import org.apache.maven.it.util.ResourceExtractor;
-import org.apache.maven.surefire.its.misc.HelperAssertions;
-
-import java.io.File;
-
 /**
  * Test additionalClasspathElements
  *
  * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
  */
 public class AdditionalClasspathIT
-    extends AbstractSurefireIntegrationTestClass
+    extends SurefireVerifierTestClass
 {
+
+    public AdditionalClasspathIT()
+    {
+        super( "/additional-classpath" );
+    }
+
     public void testAdditionalClasspath()
         throws Exception
     {
-        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/additional-classpath"
);
-
-        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        this.executeGoal( verifier, "test" );
-        verifier.verifyErrorFreeLog();
-        verifier.resetStreams();
-
-        HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
+        executeTest();
+        verifyErrorFreeLog();
+        assertTestSuiteResults( 1, 0, 0, 0 );
     }
 }

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AggregateReportIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AggregateReportIT.java?rev=1226938&r1=1226937&r2=1226938&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AggregateReportIT.java
(original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AggregateReportIT.java
Tue Jan  3 20:27:12 2012
@@ -19,12 +19,8 @@ package org.apache.maven.surefire.its;
  * under the License.
  */
 
-import org.apache.maven.it.Verifier;
-import org.apache.maven.it.util.ResourceExtractor;
-import org.apache.maven.surefire.its.misc.HelperAssertions;
-
 import java.io.File;
-import java.util.List;
+import org.apache.maven.surefire.its.misc.HelperAssertions;
 
 /**
  * Test report aggregation
@@ -32,29 +28,27 @@ import java.util.List;
  * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
  */
 public class AggregateReportIT
-    extends AbstractSurefireIntegrationTestClass
+    extends SurefireVerifierTestClass
 {
+
+    public AggregateReportIT()
+    {
+        super( "/aggregate-report" );
+    }
+
     public void testAggregateReport()
         throws Exception
     {
-        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/aggregate-report"
);
-
-        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        List<String> goals = this.getInitialGoals();
-        goals.add( "org.apache.maven.plugins:maven-surefire-report-plugin:" + getSurefireVersion()
+ ":report" );
-        executeGoals( verifier, goals );
-        //DGF even though the build will succeed, the log will contain errors (from the failure)
-        //verifier.verifyErrorFreeLog();
-        verifier.resetStreams();
+        execute( "org.apache.maven.plugins:maven-surefire-report-plugin:" + getSurefireVersion()
+ ":report" );
 
-        File surefireReportHtml = new File( testDir, "target/site/surefire-report.html" );
+        File surefireReportHtml = getSiteFile( "surefire-report.html" );
         assertTrue( "surefire report missing: " + surefireReportHtml.getAbsolutePath(), surefireReportHtml.exists()
);
 
         // TODO HtmlUnit tests on the surefire report
 
         File[] testDirs = new File[2];
-        testDirs[0] = new File( testDir, "child1" );
-        testDirs[1] = new File( testDir, "child2" );
+        testDirs[0] = new File( getTestDir(), "child1" );
+        testDirs[1] = new File( getTestDir(), "child2" );
         IntegrationTestSuiteResults suite = HelperAssertions.parseTestResults( testDirs );
         HelperAssertions.assertTestSuiteResults( 2, 0, 1, 0, suite );
     }



Mime
View raw message