You are viewing a plain text version of this content. The canonical link for it is here.
Posted to surefire-commits@maven.apache.org by kr...@apache.org on 2010/05/04 09:56:40 UTC
svn commit: r940762 [1/3] - in /maven/surefire/trunk:
surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/
surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/
surefire-providers/surefire-junit47/src...
Author: krosenvold
Date: Tue May 4 07:56:38 2010
New Revision: 940762
URL: http://svn.apache.org/viewvc?rev=940762&view=rev
Log:
o Reformatted junit4.7 provider according to code standard, added license headers to 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
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ArgLineIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckSingleTestIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestFailIfNoTestsForkModeIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestFailIfNoTestsIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgBeforeMethodFailureIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgBeforeMethodIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgExecuteErrorIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgGroupThreadParallelIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgJdk14IT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgListenerReporterIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgPathWithSpacesIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgReportTestIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgSuiteXmlIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgSuiteXmlSingleIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgVersionsIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ClassPathOrderIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/DefaultConfigurationIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/EnvironmentVariableIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ForkModeIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/HelperAssertions.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/IncludesExcludesIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/IntegrationTestSuiteResults.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/JUnit44HamcrestIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/JUnit4ForkAlwaysStaticInitPollutionIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Junit47concurrencyIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Junit4IgnoreIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Junit4VersionsIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/PlainOldJavaClasspathIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/PlexusConflictIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/PojoSimpleIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SetUpForIntegrationTest.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SiblingAggregatorIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire146ForkPerTestNoSetupIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire162CharsetProviderIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire224WellFormedXmlFailuresIT.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/Surefire377TestNgAndJUnitTogetherIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire42NotExtendingTestCaseIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire44InnerClassTestIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire613TestCountInParallelIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SystemPropertiesTestIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TimeoutForkedTestIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TwoTestCasesIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/UmlautDirIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/UseIsolatedClassLoaderIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/WorkingDirectoryIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/WorkingDirectoryMissingIT.java
maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/DemultiplexingRunListener.java
maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreDirectoryTestSuite.java
maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreParameters.java
maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreStackTraceWriter.java
maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreTestSet.java
maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreTestSetReporter.java
maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/TestsToRun.java
maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/DemultiplexingRunListenerTest.java
maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/JUnitCoreParametersTest.java
maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/TestsToRunTest.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=940762&r1=940761&r2=940762&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 May 4 07:56:38 2010
@@ -1,4 +1,22 @@
package org.apache.maven.surefire.its;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
import org.apache.maven.it.Verifier;
import org.apache.maven.it.util.ResourceExtractor;
@@ -7,15 +25,14 @@ 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
- *
+ * and abstract classes that don't say "Abstract" in their name
+ *
* @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- *
*/
public class AbstractTestCaseIT
extends AbstractSurefireIntegrationTestClass
{
- public void testAbstractTestCase ()
+ public void testAbstractTestCase()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/default-configuration-abstract" );
@@ -24,8 +41,8 @@ public class AbstractTestCaseIT
this.executeGoal( verifier, "test" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
-
- HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
+
+ HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
}
}
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=940762&r1=940761&r2=940762&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 May 4 07:56:38 2010
@@ -1,4 +1,22 @@
package org.apache.maven.surefire.its;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
import org.apache.maven.it.Verifier;
@@ -8,14 +26,13 @@ import java.io.File;
/**
* Test additionalClasspathElements
- *
+ *
* @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- *
*/
public class AdditionalClasspathIT
extends AbstractSurefireIntegrationTestClass
{
- public void testAdditionalClasspath ()
+ public void testAdditionalClasspath()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/additional-classpath" );
@@ -24,7 +41,7 @@ public class AdditionalClasspathIT
this.executeGoal( verifier, "test" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
-
- HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
+
+ HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
}
}
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=940762&r1=940761&r2=940762&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 May 4 07:56:38 2010
@@ -1,5 +1,23 @@
package org.apache.maven.surefire.its;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
import org.apache.maven.it.Verifier;
import org.apache.maven.it.util.ResourceExtractor;
@@ -9,14 +27,13 @@ import java.util.List;
/**
* Test report aggregation
- *
+ *
* @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- *
*/
public class AggregateReportIT
extends AbstractSurefireIntegrationTestClass
{
- public void testAggregateReport ()
+ public void testAggregateReport()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/aggregate-report" );
@@ -28,16 +45,16 @@ public class AggregateReportIT
//DGF even though the build will succeed, the log will contain errors (from the failure)
//verifier.verifyErrorFreeLog();
verifier.resetStreams();
-
- File surefireReportHtml = new File( testDir, "target/site/surefire-report.html");
+
+ File surefireReportHtml = new File( testDir, "target/site/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" );
IntegrationTestSuiteResults suite = HelperAssertions.parseTestResults( testDirs );
- HelperAssertions.assertTestSuiteResults( 2, 0, 1, 0, suite );
+ HelperAssertions.assertTestSuiteResults( 2, 0, 1, 0, suite );
}
}
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ArgLineIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ArgLineIT.java?rev=940762&r1=940761&r2=940762&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ArgLineIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ArgLineIT.java Tue May 4 07:56:38 2010
@@ -1,4 +1,22 @@
package org.apache.maven.surefire.its;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
import org.apache.maven.it.Verifier;
@@ -8,14 +26,13 @@ import java.io.File;
/**
* Test passing an argLine parameter
- *
+ *
* @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- *
*/
public class ArgLineIT
extends AbstractSurefireIntegrationTestClass
{
- public void testArgLine ()
+ public void testArgLine()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/argLine-parameter" );
@@ -24,7 +41,7 @@ public class ArgLineIT
this.executeGoal( verifier, "test" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
-
- HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
+
+ HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
}
}
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckSingleTestIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckSingleTestIT.java?rev=940762&r1=940761&r2=940762&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckSingleTestIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckSingleTestIT.java Tue May 4 07:56:38 2010
@@ -1,23 +1,41 @@
package org.apache.maven.surefire.its;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
-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.List;
+
/**
* Test running a single test with -Dtest=BasicTest
- *
+ *
* @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- *
*/
public class CheckSingleTestIT
extends AbstractSurefireIntegrationTestClass
{
- public void testSingleTest ()
+ public void testSingleTest()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/default-configuration" );
@@ -29,10 +47,10 @@ public class CheckSingleTestIT
verifier.executeGoals( goals );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
-
- HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
+
+ HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
}
-
+
public void testSingleTestDotJava()
throws Exception
{
@@ -73,9 +91,9 @@ public class CheckSingleTestIT
{
verifier.resetStreams();
}
-
+
File reportsDir = new File( testDir, "target/surefire-reports" );
- assertFalse ( "Unexpected reports directory", reportsDir.exists() );
+ assertFalse( "Unexpected reports directory", reportsDir.exists() );
}
public void testSingleTestNonExistentOverride()
@@ -94,6 +112,6 @@ public class CheckSingleTestIT
verifier.resetStreams();
File reportsDir = new File( testDir, "target/surefire-reports" );
- assertFalse ( "Unexpected reports directory", reportsDir.exists() );
+ assertFalse( "Unexpected reports directory", reportsDir.exists() );
}
}
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestFailIfNoTestsForkModeIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestFailIfNoTestsForkModeIT.java?rev=940762&r1=940761&r2=940762&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestFailIfNoTestsForkModeIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestFailIfNoTestsForkModeIT.java Tue May 4 07:56:38 2010
@@ -1,73 +1,98 @@
package org.apache.maven.surefire.its;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.List;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
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.List;
+
/**
* Test failIfNoTests with various forkModes.
- *
+ *
* @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- *
*/
public class CheckTestFailIfNoTestsForkModeIT
extends AbstractSurefireIntegrationTestClass
{
- public void testFailIfNoTestsForkModeAlways () throws Exception
+ public void testFailIfNoTestsForkModeAlways()
+ throws Exception
{
- doTest("always", true);
+ doTest( "always", true );
}
-
- public void testFailIfNoTestsForkModeNever() throws Exception
+
+ public void testFailIfNoTestsForkModeNever()
+ throws Exception
{
doTest( "never", true );
}
-
- public void testFailIfNoTestsForkModeOnce() throws Exception
+
+ public void testFailIfNoTestsForkModeOnce()
+ throws Exception
{
doTest( "once", true );
}
-
- public void testDontFailIfNoTestsForkModeAlways () throws Exception
+
+ public void testDontFailIfNoTestsForkModeAlways()
+ throws Exception
{
- doTest("always", false);
+ doTest( "always", false );
}
-
- public void testDontFailIfNoTestsForkModeNever() throws Exception
+
+ public void testDontFailIfNoTestsForkModeNever()
+ throws Exception
{
doTest( "never", false );
}
-
- public void testDontFailIfNoTestsForkModeOnce() throws Exception
+
+ public void testDontFailIfNoTestsForkModeOnce()
+ throws Exception
{
doTest( "once", false );
}
-
- private void doTest(String forkMode, boolean failIfNoTests)
+
+ private void doTest( String forkMode, boolean failIfNoTests )
throws IOException, VerificationException, MavenReportException
{
- File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/default-configuration-classWithNoTests" );
+ File testDir =
+ ResourceExtractor.simpleExtractResources( getClass(), "/default-configuration-classWithNoTests" );
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
List goals = this.getInitialGoals();
goals.add( "test" );
goals.add( "-DforkMode=" + forkMode );
goals.add( "-DfailIfNoTests=" + failIfNoTests );
- if (failIfNoTests)
+ if ( failIfNoTests )
{
- try
+ try
{
verifier.executeGoals( goals );
verifier.resetStreams();
verifier.verifyErrorFreeLog();
fail( "Build did not fail, but it should have" );
- } catch (VerificationException e )
+ }
+ catch ( VerificationException e )
{
// this is what we expected
}
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestFailIfNoTestsIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestFailIfNoTestsIT.java?rev=940762&r1=940761&r2=940762&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestFailIfNoTestsIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestFailIfNoTestsIT.java Tue May 4 07:56:38 2010
@@ -1,23 +1,40 @@
package org.apache.maven.surefire.its;
-
-import java.io.File;
-import java.util.List;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
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.List;
+
/**
* Test failIfNoTests
- *
+ *
* @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- *
*/
public class CheckTestFailIfNoTestsIT
extends AbstractSurefireIntegrationTestClass
{
- public void testFailIfNoTests ()
+ public void testFailIfNoTests()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/default-configuration-noTests" );
@@ -42,9 +59,9 @@ public class CheckTestFailIfNoTestsIT
{
verifier.resetStreams();
}
-
+
}
-
+
public void testDontFailIfNoTests()
throws Exception
{
@@ -56,7 +73,7 @@ public class CheckTestFailIfNoTestsIT
verifier.resetStreams();
File reportsDir = new File( testDir, "target/surefire-reports" );
- assertFalse ( "Unexpected reports directory", reportsDir.exists() );
+ assertFalse( "Unexpected reports directory", reportsDir.exists() );
}
}
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgBeforeMethodFailureIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgBeforeMethodFailureIT.java?rev=940762&r1=940761&r2=940762&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgBeforeMethodFailureIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgBeforeMethodFailureIT.java Tue May 4 07:56:38 2010
@@ -1,22 +1,39 @@
package org.apache.maven.surefire.its;
-
-import java.io.File;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
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
- *
+ *
* @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- *
*/
public class CheckTestNgBeforeMethodFailureIT
extends AbstractSurefireIntegrationTestClass
{
- public void testTestNgBeforeMethodFailure ()
+ public void testTestNgBeforeMethodFailure()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-beforeMethodFailure" );
@@ -37,7 +54,7 @@ public class CheckTestNgBeforeMethodFail
{
verifier.resetStreams();
}
-
+
HelperAssertions.assertTestSuiteResults( 2, 0, 1, 1, testDir );
}
}
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgBeforeMethodIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgBeforeMethodIT.java?rev=940762&r1=940761&r2=940762&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgBeforeMethodIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgBeforeMethodIT.java Tue May 4 07:56:38 2010
@@ -1,21 +1,38 @@
package org.apache.maven.surefire.its;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
-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
- *
+ *
* @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- *
*/
public class CheckTestNgBeforeMethodIT
extends AbstractSurefireIntegrationTestClass
{
- public void testTestNgBeforeMethod ()
+ public void testTestNgBeforeMethod()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-beforeMethod" );
@@ -24,7 +41,7 @@ public class CheckTestNgBeforeMethodIT
this.executeGoal( verifier, "test" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
-
+
HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
}
}
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgExecuteErrorIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgExecuteErrorIT.java?rev=940762&r1=940761&r2=940762&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgExecuteErrorIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgExecuteErrorIT.java Tue May 4 07:56:38 2010
@@ -1,16 +1,33 @@
package org.apache.maven.surefire.its;
-
-import java.io.File;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
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.
- *
+ *
* @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- *
*/
public class CheckTestNgExecuteErrorIT
extends AbstractSurefireIntegrationTestClass
@@ -28,7 +45,7 @@ public class CheckTestNgExecuteErrorIT
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/CheckTestNgGroupThreadParallelIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgGroupThreadParallelIT.java?rev=940762&r1=940761&r2=940762&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgGroupThreadParallelIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgGroupThreadParallelIT.java Tue May 4 07:56:38 2010
@@ -1,21 +1,38 @@
package org.apache.maven.surefire.its;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
-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
- *
+ *
* @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- *
*/
public class CheckTestNgGroupThreadParallelIT
extends AbstractSurefireIntegrationTestClass
{
- public void testTestNgGroupThreadParallel ()
+ public void testTestNgGroupThreadParallel()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-group-thread-parallel" );
@@ -24,8 +41,8 @@ public class CheckTestNgGroupThreadParal
this.executeGoal( verifier, "test" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
-
+
HelperAssertions.assertTestSuiteResults( 3, 0, 0, 0, testDir );
-
+
}
}
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgJdk14IT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgJdk14IT.java?rev=940762&r1=940761&r2=940762&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgJdk14IT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgJdk14IT.java Tue May 4 07:56:38 2010
@@ -1,21 +1,38 @@
package org.apache.maven.surefire.its;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
-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
- *
+ *
* @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- *
*/
public class CheckTestNgJdk14IT
extends AbstractSurefireIntegrationTestClass
{
- public void testTestNgJdk14 ()
+ public void testTestNgJdk14()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-jdk14" );
@@ -24,8 +41,8 @@ public class CheckTestNgJdk14IT
this.executeGoal( verifier, "test" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
-
+
HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
-
+
}
}
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgListenerReporterIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgListenerReporterIT.java?rev=940762&r1=940761&r2=940762&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgListenerReporterIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgListenerReporterIT.java Tue May 4 07:56:38 2010
@@ -1,21 +1,38 @@
package org.apache.maven.surefire.its;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
-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
- *
+ *
* @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- *
*/
public class CheckTestNgListenerReporterIT
extends AbstractSurefireIntegrationTestClass
{
- public void testTestNgListenerReporter ()
+ public void testTestNgListenerReporter()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-listener-reporter" );
@@ -24,14 +41,14 @@ public class CheckTestNgListenerReporter
this.executeGoal( verifier, "test" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
-
+
HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
File targetDir = new File( testDir, "target" );
- assertFileExists ( new File( targetDir, "resultlistener-output.txt" ) );
- assertFileExists ( new File( targetDir, "suitelistener-output.txt" ) );
- assertFileExists ( new File( targetDir, "reporter-output.txt" ) );
+ assertFileExists( new File( targetDir, "resultlistener-output.txt" ) );
+ assertFileExists( new File( targetDir, "suitelistener-output.txt" ) );
+ assertFileExists( new File( targetDir, "reporter-output.txt" ) );
}
-
+
private void assertFileExists( File file )
{
assertTrue( "File doesn't exist: " + file.getAbsolutePath(), file.exists() );
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgPathWithSpacesIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgPathWithSpacesIT.java?rev=940762&r1=940761&r2=940762&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgPathWithSpacesIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgPathWithSpacesIT.java Tue May 4 07:56:38 2010
@@ -1,21 +1,38 @@
package org.apache.maven.surefire.its;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
-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
- *
+ *
* @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- *
*/
public class CheckTestNgPathWithSpacesIT
extends AbstractSurefireIntegrationTestClass
{
- public void testTestNgTestWithSpaces ()
+ public void testTestNgTestWithSpaces()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-path with spaces" );
@@ -24,7 +41,7 @@ public class CheckTestNgPathWithSpacesIT
this.executeGoal( verifier, "test" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
-
+
HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
}
}
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgReportTestIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgReportTestIT.java?rev=940762&r1=940761&r2=940762&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgReportTestIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgReportTestIT.java Tue May 4 07:56:38 2010
@@ -1,22 +1,38 @@
package org.apache.maven.surefire.its;
-
-import java.io.File;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
import junit.framework.Assert;
-
import org.apache.maven.it.Verifier;
import org.apache.maven.it.util.ResourceExtractor;
+import java.io.File;
+
/**
* Test surefire-report on TestNG test
- *
+ *
* @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- *
*/
public class CheckTestNgReportTestIT
extends AbstractSurefireIntegrationTestClass
{
- public void testTestNgReport ()
+ public void testTestNgReport()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-simple" );
@@ -25,9 +41,9 @@ public class CheckTestNgReportTestIT
this.executeGoal( verifier, "surefire-report:report" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
-
+
HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
- File reportHtml = new File(testDir, "target/site/surefire-report.html");
+ File reportHtml = new File( testDir, "target/site/surefire-report.html" );
Assert.assertTrue( "surefire-report is missing", reportHtml.exists() );
}
}
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgSuiteXmlIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgSuiteXmlIT.java?rev=940762&r1=940761&r2=940762&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgSuiteXmlIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgSuiteXmlIT.java Tue May 4 07:56:38 2010
@@ -1,4 +1,22 @@
package org.apache.maven.surefire.its;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
import org.apache.maven.it.Verifier;
@@ -10,14 +28,13 @@ import java.util.List;
/**
* Test simple TestNG suite XML file
- *
+ *
* @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- *
*/
public class CheckTestNgSuiteXmlIT
extends AbstractSurefireIntegrationTestClass
{
- public void testTestNgSuiteXml ()
+ public void testTestNgSuiteXml()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-suite-xml" );
@@ -28,10 +45,10 @@ public class CheckTestNgSuiteXmlIT
verifier.executeGoals( goals );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
-
+
HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
}
-
+
public void testTestNgSuiteXmlForkModeAlways()
throws Exception
{
@@ -39,7 +56,7 @@ public class CheckTestNgSuiteXmlIT
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
List goals = getInitialGoals();
- goals.addAll( Arrays.asList( new String[] {"test", "-DforkMode=always" } ) );
+ goals.addAll( Arrays.asList( new String[]{ "test", "-DforkMode=always" } ) );
verifier.executeGoals( goals );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgSuiteXmlSingleIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgSuiteXmlSingleIT.java?rev=940762&r1=940761&r2=940762&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgSuiteXmlSingleIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgSuiteXmlSingleIT.java Tue May 4 07:56:38 2010
@@ -1,17 +1,34 @@
package org.apache.maven.surefire.its;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
-import java.io.File;
-import java.util.List;
-
import org.apache.maven.it.Verifier;
import org.apache.maven.it.util.ResourceExtractor;
+import java.io.File;
+import java.util.List;
+
/**
* Use -Dtest to run a single TestNG test, overriding the suite XML parameter.
- *
+ *
* @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- *
*/
public class CheckTestNgSuiteXmlSingleIT
extends AbstractSurefireIntegrationTestClass
@@ -29,7 +46,7 @@ public class CheckTestNgSuiteXmlSingleIT
verifier.verifyErrorFreeLog();
verifier.resetStreams();
- List reports = HelperAssertions.extractReports( ( new File[] { testDir } ) );
+ List reports = HelperAssertions.extractReports( ( new File[]{ testDir } ) );
IntegrationTestSuiteResults results = HelperAssertions.parseReportList( reports );
HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, results );
}
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgVersionsIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgVersionsIT.java?rev=940762&r1=940761&r2=940762&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgVersionsIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgVersionsIT.java Tue May 4 07:56:38 2010
@@ -1,65 +1,91 @@
package org.apache.maven.surefire.its;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
-import java.io.File;
-import java.util.List;
-
import org.apache.maven.it.Verifier;
import org.apache.maven.it.util.ResourceExtractor;
+import java.io.File;
+import java.util.List;
+
/**
* Basic suite test using all known versions of TestNG
- *
+ *
* @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- *
*/
public class CheckTestNgVersionsIT
extends AbstractSurefireIntegrationTestClass
{
-
- public void test47 () throws Exception
+
+ public void test47()
+ throws Exception
{
runTestNgTest( "4.7" );
}
-
+
// DGF SUREFIRE-375 + MAVENUPLOAD-1024
// The 5.0 and 5.0.1 jars on central are malformed
- public void XXXtest50 () throws Exception
+
+ public void XXXtest50()
+ throws Exception
{
runTestNgTest( "5.0" );
}
-
- public void XXXtest501 () throws Exception
+
+ public void XXXtest501()
+ throws Exception
{
runTestNgTest( "5.0.1" );
}
-
- public void test502 () throws Exception
+
+ public void test502()
+ throws Exception
{
runTestNgTest( "5.0.2" );
}
-
- public void test51 () throws Exception
+
+ public void test51()
+ throws Exception
{
runTestNgTest( "5.1" );
}
-
- public void test55 () throws Exception
+
+ public void test55()
+ throws Exception
{
runTestNgTest( "5.5" );
}
-
- public void test56 () throws Exception
+
+ public void test56()
+ throws Exception
{
runTestNgTest( "5.6" );
}
-
- public void test57 () throws Exception
+
+ public void test57()
+ throws Exception
{
runTestNgTest( "5.7" );
}
-
- public void runTestNgTest (String version)
+
+ public void runTestNgTest( String version )
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-simple" );
@@ -73,7 +99,7 @@ public class CheckTestNgVersionsIT
verifier.executeGoals( arguments );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
-
+
IntegrationTestSuiteResults suite = HelperAssertions.parseTestResults( testDir );
HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, suite );
}
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ClassPathOrderIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ClassPathOrderIT.java?rev=940762&r1=940761&r2=940762&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ClassPathOrderIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ClassPathOrderIT.java Tue May 4 07:56:38 2010
@@ -1,21 +1,38 @@
package org.apache.maven.surefire.its;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
-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
- *
+ *
* @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- *
*/
public class ClassPathOrderIT
extends AbstractSurefireIntegrationTestClass
{
- public void testClassPathOrder ()
+ public void testClassPathOrder()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/classpath-order" );
@@ -24,7 +41,7 @@ public class ClassPathOrderIT
this.executeGoal( verifier, "test" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
-
- HelperAssertions.assertTestSuiteResults( 2, 0, 0, 0, testDir );
+
+ HelperAssertions.assertTestSuiteResults( 2, 0, 0, 0, testDir );
}
}
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/DefaultConfigurationIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/DefaultConfigurationIT.java?rev=940762&r1=940761&r2=940762&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/DefaultConfigurationIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/DefaultConfigurationIT.java Tue May 4 07:56:38 2010
@@ -1,21 +1,38 @@
package org.apache.maven.surefire.its;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
-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.
- *
+ *
* @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- *
*/
public class DefaultConfigurationIT
extends AbstractSurefireIntegrationTestClass
{
- public void testDefaultConfiguration ()
+ public void testDefaultConfiguration()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/default-configuration" );
@@ -24,7 +41,7 @@ public class DefaultConfigurationIT
this.executeGoal( verifier, "test" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
-
- HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
+
+ HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
}
}
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/EnvironmentVariableIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/EnvironmentVariableIT.java?rev=940762&r1=940761&r2=940762&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/EnvironmentVariableIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/EnvironmentVariableIT.java Tue May 4 07:56:38 2010
@@ -1,21 +1,38 @@
package org.apache.maven.surefire.its;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
-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.
- *
+ *
* @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- *
*/
public class EnvironmentVariableIT
extends AbstractSurefireIntegrationTestClass
{
- public void testEnvironmentVariable ()
+ public void testEnvironmentVariable()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/junit44-environment" );
@@ -24,7 +41,7 @@ public class EnvironmentVariableIT
this.executeGoal( verifier, "test" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
-
- HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
+
+ HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
}
}
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ForkModeIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ForkModeIT.java?rev=940762&r1=940761&r2=940762&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ForkModeIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ForkModeIT.java Tue May 4 07:56:38 2010
@@ -1,4 +1,27 @@
package org.apache.maven.surefire.its;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+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;
@@ -6,16 +29,10 @@ import java.io.FileReader;
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;
-
/**
* Test forkMode
- *
+ *
* @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- *
*/
public class ForkModeIT
extends AbstractSurefireIntegrationTestClass
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/HelperAssertions.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/HelperAssertions.java?rev=940762&r1=940761&r2=940762&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/HelperAssertions.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/HelperAssertions.java Tue May 4 07:56:38 2010
@@ -1,4 +1,22 @@
package org.apache.maven.surefire.its;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
import junit.framework.Assert;
import org.apache.maven.plugins.surefire.report.ReportTestSuite;
@@ -10,15 +28,18 @@ import java.util.List;
public class HelperAssertions
{
- /** assert that the reports in the specified testDir have the right summary statistics */
- public static void assertTestSuiteResults( int total, int errors, int failures, int skipped,
- File testDir ) throws MavenReportException {
- IntegrationTestSuiteResults suite = parseTestResults( new File[] { testDir } );
+ /**
+ * assert that the reports in the specified testDir have the right summary statistics
+ */
+ public static void assertTestSuiteResults( int total, int errors, int failures, int skipped, File testDir )
+ throws MavenReportException
+ {
+ IntegrationTestSuiteResults suite = parseTestResults( new File[]{ testDir } );
assertTestSuiteResults( total, errors, failures, skipped, suite );
}
-
+
protected static void assertTestSuiteResults( int total, int errors, int failures, int skipped,
- IntegrationTestSuiteResults actualSuite )
+ IntegrationTestSuiteResults actualSuite )
{
Assert.assertEquals( "wrong number of tests", total, actualSuite.getTotal() );
Assert.assertEquals( "wrong number of errors", errors, actualSuite.getErrors() );
@@ -29,7 +50,7 @@ public class HelperAssertions
protected static IntegrationTestSuiteResults parseTestResults( File testDir )
throws MavenReportException
{
- return parseTestResults( new File[] { testDir } );
+ return parseTestResults( new File[]{ testDir } );
}
protected static IntegrationTestSuiteResults parseTestResults( File[] testDirs )
@@ -40,28 +61,33 @@ public class HelperAssertions
return results;
}
- /** Converts a list of ReportTestSuites into an IntegrationTestSuiteResults object, suitable for summary assertions */
+ /**
+ * Converts a list of ReportTestSuites into an IntegrationTestSuiteResults object, suitable for summary assertions
+ */
protected static IntegrationTestSuiteResults parseReportList( List reports )
{
Assert.assertTrue( "No reports!", reports.size() > 0 );
int total = 0, errors = 0, failures = 0, skipped = 0;
- for (int i = 0; i < reports.size(); i++) {
+ for ( int i = 0; i < reports.size(); i++ )
+ {
ReportTestSuite suite = (ReportTestSuite) reports.get( i );
total += suite.getNumberOfTests();
errors += suite.getNumberOfErrors();
failures += suite.getNumberOfFailures();
skipped += suite.getNumberOfSkipped();
}
- IntegrationTestSuiteResults results = new IntegrationTestSuiteResults(total, errors, failures, skipped);
+ IntegrationTestSuiteResults results = new IntegrationTestSuiteResults( total, errors, failures, skipped );
return results;
}
protected static List extractReports( File testDir )
{
- return extractReports( new File[] { testDir } );
+ return extractReports( new File[]{ testDir } );
}
-
- /** Extracts a list of ReportTestSuites from the specified testDirs */
+
+ /**
+ * Extracts a list of ReportTestSuites from the specified testDirs
+ */
protected static List extractReports( File[] testDirs )
{
SurefireReportParser parser = new SurefireReportParser();
@@ -75,10 +101,13 @@ public class HelperAssertions
}
parser.setReportsDirectories( reportsDirs );
List reports;
- try {
+ try
+ {
reports = parser.parseXMLReportFiles();
- } catch (Exception e) {
- throw new RuntimeException("Couldn't parse XML reports", e);
+ }
+ catch ( Exception e )
+ {
+ throw new RuntimeException( "Couldn't parse XML reports", e );
}
return reports;
}
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/IncludesExcludesIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/IncludesExcludesIT.java?rev=940762&r1=940761&r2=940762&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/IncludesExcludesIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/IncludesExcludesIT.java Tue May 4 07:56:38 2010
@@ -1,5 +1,4 @@
package org.apache.maven.surefire.its;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -19,14 +18,14 @@ package org.apache.maven.surefire.its;
* under the License.
*/
-import java.io.File;
-
import org.apache.maven.it.Verifier;
import org.apache.maven.it.util.ResourceExtractor;
+import java.io.File;
+
/**
* Test include/exclude patterns.
- *
+ *
* @author Benjamin Bentmann
* @version $Id$
*/
@@ -49,7 +48,7 @@ public class IncludesExcludesIT
verifier.verifyErrorFreeLog();
verifier.resetStreams();
- HelperAssertions.assertTestSuiteResults( 2, 0, 0, 0, testDir );
+ HelperAssertions.assertTestSuiteResults( 2, 0, 0, 0, testDir );
}
}
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/IntegrationTestSuiteResults.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/IntegrationTestSuiteResults.java?rev=940762&r1=940761&r2=940762&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/IntegrationTestSuiteResults.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/IntegrationTestSuiteResults.java Tue May 4 07:56:38 2010
@@ -1,4 +1,23 @@
package org.apache.maven.surefire.its;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
public class IntegrationTestSuiteResults
{
@@ -51,5 +70,5 @@ public class IntegrationTestSuiteResults
{
this.skipped = skipped;
}
-
+
}
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=940762&r1=940761&r2=940762&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 Tue May 4 07:56:38 2010
@@ -1,21 +1,38 @@
package org.apache.maven.surefire.its;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
-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
- *
+ *
* @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- *
*/
public class JUnit44Dep
extends AbstractSurefireIntegrationTestClass
{
- public void testJUnit44Dep ()
+ public void testJUnit44Dep()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/junit44-dep" );
@@ -24,7 +41,7 @@ public class JUnit44Dep
this.executeGoal( verifier, "test" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
-
+
HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
}
}
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/JUnit44HamcrestIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/JUnit44HamcrestIT.java?rev=940762&r1=940761&r2=940762&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/JUnit44HamcrestIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/JUnit44HamcrestIT.java Tue May 4 07:56:38 2010
@@ -1,21 +1,38 @@
package org.apache.maven.surefire.its;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
-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)
- *
+ *
* @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- *
*/
public class JUnit44HamcrestIT
extends AbstractSurefireIntegrationTestClass
{
- public void testJUnit44Hamcrest ()
+ public void testJUnit44Hamcrest()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/junit44-hamcrest" );
@@ -24,7 +41,7 @@ public class JUnit44HamcrestIT
this.executeGoal( verifier, "test" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
-
+
HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
}
}
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/JUnit4ForkAlwaysStaticInitPollutionIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/JUnit4ForkAlwaysStaticInitPollutionIT.java?rev=940762&r1=940761&r2=940762&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/JUnit4ForkAlwaysStaticInitPollutionIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/JUnit4ForkAlwaysStaticInitPollutionIT.java Tue May 4 07:56:38 2010
@@ -1,21 +1,38 @@
package org.apache.maven.surefire.its;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
-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
- *
+ * Test JUnit 4 tests marked with "Ignore" attribute
+ *
* @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- *
*/
public class JUnit4ForkAlwaysStaticInitPollutionIT
extends AbstractSurefireIntegrationTestClass
{
- public void testJunit4Ignore ()
+ public void testJunit4Ignore()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/junit4-forkAlways-staticInit" );
@@ -24,7 +41,7 @@ public class JUnit4ForkAlwaysStaticInitP
this.executeGoal( verifier, "test" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
-
- HelperAssertions.assertTestSuiteResults( 2, 0, 0, 0, testDir );
+
+ HelperAssertions.assertTestSuiteResults( 2, 0, 0, 0, testDir );
}
}
Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Junit47concurrencyIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Junit47concurrencyIT.java?rev=940762&r1=940761&r2=940762&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Junit47concurrencyIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Junit47concurrencyIT.java Tue May 4 07:56:38 2010
@@ -1,4 +1,22 @@
package org.apache.maven.surefire.its;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
import org.apache.maven.it.Verifier;
@@ -10,21 +28,21 @@ import java.util.List;
/**
* Basic suite test using all known versions of JUnit 4.x
*
- * @author <a href="mailto:kristian.rosenvold@gmail.com">Kristian Rosenvold</a>
- *
+ * @author Kristian Rosenvold
*/
public class Junit47concurrencyIT
extends AbstractSurefireIntegrationTestClass
{
- public void test47 () throws Exception
+ public void test47()
+ throws Exception
{
runJUnitTest();
}
- public void runJUnitTest ()
+ public void runJUnitTest()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/concurrentjunit47" );
@@ -34,13 +52,13 @@ public class Junit47concurrencyIT
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
- arguments.add( "-DjunitVersion=4.7");
+ arguments.add( "-DjunitVersion=4.7" );
verifier.executeGoals( arguments );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
- IntegrationTestSuiteResults suite = HelperAssertions.parseTestResults( new File[] { testDir } );
+ IntegrationTestSuiteResults suite = HelperAssertions.parseTestResults( new File[]{ testDir } );
HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, suite );
}
}
\ No newline at end of file