http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit47-redirect-output/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit47-redirect-output/pom.xml b/surefire-integration-tests/src/test/resources/junit47-redirect-output/pom.xml deleted file mode 100644 index 38ec727..0000000 --- a/surefire-integration-tests/src/test/resources/junit47-redirect-output/pom.xml +++ /dev/null @@ -1,58 +0,0 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <groupId>org.apache.maven.plugins.surefire</groupId> - <artifactId>fork-consoleOutput</artifactId> - <packaging>jar</packaging> - <version>1.0-SNAPSHOT</version> - <name>fork-consoleOutput</name> - <url>http://maven.apache.org</url> - - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>${junit.version}</version> - </dependency> - </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <version>${surefire.version}</version> - <dependencies> - <dependency> - <groupId>org.apache.maven.surefire</groupId> - <artifactId>surefire-junit47</artifactId> - <version>${surefire.version}</version> - </dependency> - </dependencies> - <configuration> - <forkMode>${forkMode}</forkMode> - <printSummary>${printSummary}</printSummary> - <useFile>true</useFile> - <redirectTestOutputToFile>${redirect.to.file}</redirectTestOutputToFile> - <threadCount>2</threadCount> - <parallel>${parallel}</parallel> - <runOrder>alphabetical</runOrder> - <includes> - <include>**/Test*.java</include> - </includes> - </configuration> - </plugin> - </plugins> - - </build> - - <properties> - <junit.version>4.8.1</junit.version> - <redirect.to.file>true</redirect.to.file> - <forkMode>once</forkMode> - <printSummary>true</printSummary> - <parallel>none</parallel> - <maven.compiler.source>1.7</maven.compiler.source> - <maven.compiler.target>1.7</maven.compiler.target> - </properties> - -</project>
http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit47-redirect-output/src/test/java/junit47ConsoleOutput/Test0.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit47-redirect-output/src/test/java/junit47ConsoleOutput/Test0.java b/surefire-integration-tests/src/test/resources/junit47-redirect-output/src/test/java/junit47ConsoleOutput/Test0.java deleted file mode 100644 index 102faaa..0000000 --- a/surefire-integration-tests/src/test/resources/junit47-redirect-output/src/test/java/junit47ConsoleOutput/Test0.java +++ /dev/null @@ -1,63 +0,0 @@ -package junit47ConsoleOutput; - -/* - * 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.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -public class Test0 { - - public Test0(){ - System.out.println("Constructor"); - } - - @Test - public void testT0() throws Exception { - System.out.println("testT0"); - } - - @Test - public void testT1() throws Exception { - System.out.println("testT1"); - } - - @BeforeClass - public static void setUpBeforeClass() throws Exception { - System.out.println("setUpBeforeClass"); - } - - @AfterClass - public static void tearDownAfterClass() throws Exception { - System.out.println("tearDownAfterClass"); - } - - @Before - public void setUp() throws Exception { - System.out.println("setUp"); - } - - @After - public void tearDown() throws Exception { - System.out.println("tearDown"); - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit47-redirect-output/src/test/java/junit47ConsoleOutput/Test1.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit47-redirect-output/src/test/java/junit47ConsoleOutput/Test1.java b/surefire-integration-tests/src/test/resources/junit47-redirect-output/src/test/java/junit47ConsoleOutput/Test1.java deleted file mode 100644 index 40e084e..0000000 --- a/surefire-integration-tests/src/test/resources/junit47-redirect-output/src/test/java/junit47ConsoleOutput/Test1.java +++ /dev/null @@ -1,43 +0,0 @@ -package junit47ConsoleOutput; - -/* - * 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.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -public class Test1 -{ - @Test - public void test6281() { - System.out.println( "Test1 on" + Thread.currentThread().getName()); - } - - @BeforeClass - public static void testWithFailingAssumption2() { - System.out.println( "BeforeTest1 on" + Thread.currentThread().getName()); - } - - @AfterClass - public static void testWithFailingAssumption3() { - System.out.println( "AfterTest1 on" + Thread.currentThread().getName()); - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit47-redirect-output/src/test/java/junit47ConsoleOutput/Test2.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit47-redirect-output/src/test/java/junit47ConsoleOutput/Test2.java b/surefire-integration-tests/src/test/resources/junit47-redirect-output/src/test/java/junit47ConsoleOutput/Test2.java deleted file mode 100644 index 1a14fc7..0000000 --- a/surefire-integration-tests/src/test/resources/junit47-redirect-output/src/test/java/junit47ConsoleOutput/Test2.java +++ /dev/null @@ -1,43 +0,0 @@ -package junit47ConsoleOutput; - -/* - * 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.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -public class Test2 -{ - @Test - public void test6281() { - System.out.println( "Test2 on" + Thread.currentThread().getName()); - } - - @BeforeClass - public static void testWithFailingAssumption2() { - System.out.println( "BeforeTest2 on" + Thread.currentThread().getName()); - } - - @AfterClass - public static void testWithFailingAssumption3() { - System.out.println( "AfterTest2 on" + Thread.currentThread().getName()); - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit47-redirect-output/src/test/java/junit47ConsoleOutput/Test3.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit47-redirect-output/src/test/java/junit47ConsoleOutput/Test3.java b/surefire-integration-tests/src/test/resources/junit47-redirect-output/src/test/java/junit47ConsoleOutput/Test3.java deleted file mode 100644 index 35b0032..0000000 --- a/surefire-integration-tests/src/test/resources/junit47-redirect-output/src/test/java/junit47ConsoleOutput/Test3.java +++ /dev/null @@ -1,30 +0,0 @@ -package junit47ConsoleOutput; - -/* - * 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.junit.Test; - -public class Test3 -{ - @Test - public void test3() { - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit47-rerun-failing-tests-with-cucumber/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit47-rerun-failing-tests-with-cucumber/pom.xml b/surefire-integration-tests/src/test/resources/junit47-rerun-failing-tests-with-cucumber/pom.xml deleted file mode 100644 index 24ee294..0000000 --- a/surefire-integration-tests/src/test/resources/junit47-rerun-failing-tests-with-cucumber/pom.xml +++ /dev/null @@ -1,77 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ 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. - --> - -<project xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.maven.surefire</groupId> - <artifactId>it-parent</artifactId> - <version>1.0</version> - </parent> - - <artifactId>junit47-rerun-failing-tests-with-cucumber</artifactId> - <name>Test for rerun failing cucumber tests in JUnit 47</name> - - <properties> - <cucumber.version>2.0.0</cucumber.version> - </properties> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <version>${surefire.version}</version> - <dependencies> - <dependency> - <groupId>org.apache.maven.surefire</groupId> - <artifactId>surefire-junit47</artifactId> - <version>${surefire.version}</version> - </dependency> - </dependencies> - </plugin> - </plugins> - </build> - - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>${junit.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>io.cucumber</groupId> - <artifactId>cucumber-java</artifactId> - <version>${cucumber.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>io.cucumber</groupId> - <artifactId>cucumber-junit</artifactId> - <version>${cucumber.version}</version> - <scope>test</scope> - </dependency> - </dependencies> - -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit47-rerun-failing-tests-with-cucumber/src/test/java/org/sample/cucumber/FlakeCucumberTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit47-rerun-failing-tests-with-cucumber/src/test/java/org/sample/cucumber/FlakeCucumberTest.java b/surefire-integration-tests/src/test/resources/junit47-rerun-failing-tests-with-cucumber/src/test/java/org/sample/cucumber/FlakeCucumberTest.java deleted file mode 100644 index ecda87b..0000000 --- a/surefire-integration-tests/src/test/resources/junit47-rerun-failing-tests-with-cucumber/src/test/java/org/sample/cucumber/FlakeCucumberTest.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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. - */ - -package org.sample.cucumber; - -import cucumber.api.junit.Cucumber; -import org.junit.runner.RunWith; - -@RunWith( Cucumber.class ) -public class FlakeCucumberTest -{ - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit47-rerun-failing-tests-with-cucumber/src/test/java/org/sample/cucumber/StepDefs.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit47-rerun-failing-tests-with-cucumber/src/test/java/org/sample/cucumber/StepDefs.java b/surefire-integration-tests/src/test/resources/junit47-rerun-failing-tests-with-cucumber/src/test/java/org/sample/cucumber/StepDefs.java deleted file mode 100644 index d253222..0000000 --- a/surefire-integration-tests/src/test/resources/junit47-rerun-failing-tests-with-cucumber/src/test/java/org/sample/cucumber/StepDefs.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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. - */ - -package org.sample.cucumber; - -import cucumber.api.java.en.Given; -import cucumber.api.java.en.Then; -import cucumber.api.java.en.When; - -import static org.junit.Assert.fail; - -public class StepDefs -{ - private static int testFailures = 0; - - @Given( "^I have some code$" ) - public void I_have_some_code() - throws Throwable - { - // do nothing - } - - @When( "^I run test$" ) - public void I_run_test() - throws Throwable - { - // do nothing - } - - @Then( "^I get a flake$" ) - public void I_get_a_flake() - throws Throwable - { - // This test will error out with only one retry, but will pass with two - if( testFailures < 2 ) { - testFailures++; - fail( "failing the test on purpose." ); - } - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit47-rerun-failing-tests-with-cucumber/src/test/resources/org/sample/cucumber/Sample.feature ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit47-rerun-failing-tests-with-cucumber/src/test/resources/org/sample/cucumber/Sample.feature b/surefire-integration-tests/src/test/resources/junit47-rerun-failing-tests-with-cucumber/src/test/resources/org/sample/cucumber/Sample.feature deleted file mode 100644 index d5b5dac..0000000 --- a/surefire-integration-tests/src/test/resources/junit47-rerun-failing-tests-with-cucumber/src/test/resources/org/sample/cucumber/Sample.feature +++ /dev/null @@ -1,10 +0,0 @@ -Feature: Sample - - In order to use Maven - As a user - I want to do tests. - - Scenario: Do a flake test - Given I have some code - When I run test - Then I get a flake http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit47-static-inner-class-tests/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit47-static-inner-class-tests/pom.xml b/surefire-integration-tests/src/test/resources/junit47-static-inner-class-tests/pom.xml deleted file mode 100644 index 81f26c2..0000000 --- a/surefire-integration-tests/src/test/resources/junit47-static-inner-class-tests/pom.xml +++ /dev/null @@ -1,40 +0,0 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <groupId>org.apache.maven.plugins.surefire</groupId> - <artifactId>junit4-test</artifactId> - <packaging>jar</packaging> - <version>1.0-SNAPSHOT</version> - <name>junit47-static-inner-class-tests</name> - <url>http://maven.apache.org</url> - <properties> - <maven.compiler.source>1.7</maven.compiler.source> - <maven.compiler.target>1.7</maven.compiler.target> - </properties> - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.8.1</version> - </dependency> - </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <version>${surefire.version}</version> - <configuration> - <forkMode>never</forkMode> - </configuration> - <dependencies> - <dependency> - <groupId>org.apache.maven.surefire</groupId> - <artifactId>surefire-junit47</artifactId> - <version>${surefire.version}</version> - </dependency> - </dependencies> - </plugin> - </plugins> - </build> -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit47-static-inner-class-tests/src/test/java/junit4/BasicTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit47-static-inner-class-tests/src/test/java/junit4/BasicTest.java b/surefire-integration-tests/src/test/resources/junit47-static-inner-class-tests/src/test/java/junit4/BasicTest.java deleted file mode 100644 index f11de6d..0000000 --- a/surefire-integration-tests/src/test/resources/junit47-static-inner-class-tests/src/test/java/junit4/BasicTest.java +++ /dev/null @@ -1,33 +0,0 @@ -package junit4; - -/* - * 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.junit.Test; -import org.junit.experimental.runners.Enclosed; -import org.junit.runner.RunWith; - -@RunWith(Enclosed.class) -public class BasicTest { - public static class InnerTest { - @Test - public void testSomething() { - } - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit47-static-inner-class-tests/src/test/java/junit4/TopLevelAbstractClassTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit47-static-inner-class-tests/src/test/java/junit4/TopLevelAbstractClassTest.java b/surefire-integration-tests/src/test/resources/junit47-static-inner-class-tests/src/test/java/junit4/TopLevelAbstractClassTest.java deleted file mode 100644 index b47e755..0000000 --- a/surefire-integration-tests/src/test/resources/junit47-static-inner-class-tests/src/test/java/junit4/TopLevelAbstractClassTest.java +++ /dev/null @@ -1,33 +0,0 @@ -package junit4; - -/* - * 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.junit.Test; -import org.junit.experimental.runners.Enclosed; -import org.junit.runner.RunWith; - -@RunWith(Enclosed.class) -public abstract class TopLevelAbstractClassTest { - public static class InnerTest { - @Test - public void testSomething() { - } - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit47-static-inner-class-tests/src/test/java/junit4/TopLevelInterfaceTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit47-static-inner-class-tests/src/test/java/junit4/TopLevelInterfaceTest.java b/surefire-integration-tests/src/test/resources/junit47-static-inner-class-tests/src/test/java/junit4/TopLevelInterfaceTest.java deleted file mode 100644 index eaa6756..0000000 --- a/surefire-integration-tests/src/test/resources/junit47-static-inner-class-tests/src/test/java/junit4/TopLevelInterfaceTest.java +++ /dev/null @@ -1,33 +0,0 @@ -package junit4; - -/* - * 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.junit.Test; -import org.junit.experimental.runners.Enclosed; -import org.junit.runner.RunWith; - -@RunWith(Enclosed.class) -public interface TopLevelInterfaceTest { - public static class InnerTest { - @Test - public void testSomething() { - } - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit48-categories/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit48-categories/pom.xml b/surefire-integration-tests/src/test/resources/junit48-categories/pom.xml deleted file mode 100644 index a83b687..0000000 --- a/surefire-integration-tests/src/test/resources/junit48-categories/pom.xml +++ /dev/null @@ -1,70 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ 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. - --> - -<project xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <groupId>org.apache.maven.plugins.surefire</groupId> - <artifactId>junit4</artifactId> - <version>1.0-SNAPSHOT</version> - <name>Test for JUnit 4.8.1</name> - - - <properties> - <junit.version>4.8.1</junit.version> - <groups>junit4.CategoryA,junit4.CategoryB</groups> - <excludedGroups></excludedGroups> - <maven.compiler.source>1.7</maven.compiler.source> - <maven.compiler.target>1.7</maven.compiler.target> - </properties> - - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>${junit.version}</version> - <scope>test</scope> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <version>${surefire.version}</version> - <configuration> - <groups>${groups}</groups> - <excludedGroups>${excludedGroups}</excludedGroups> - </configuration> - <dependencies> - <dependency> - <groupId>org.apache.maven.surefire</groupId> - <artifactId>surefire-junit47</artifactId> - <version>${surefire.version}</version> - </dependency> - </dependencies> - </plugin> - </plugins> - </build> - -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit48-categories/src/test/java/junit4/BasicTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit48-categories/src/test/java/junit4/BasicTest.java b/surefire-integration-tests/src/test/resources/junit48-categories/src/test/java/junit4/BasicTest.java deleted file mode 100644 index 3108e1a..0000000 --- a/surefire-integration-tests/src/test/resources/junit48-categories/src/test/java/junit4/BasicTest.java +++ /dev/null @@ -1,72 +0,0 @@ -package junit4; -/* - * 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.junit.AfterClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; - - -public class BasicTest -{ - static int catACount = 0; - static int catBCount = 0; - static int catCCount = 0; - static int catNoneCount = 0; - - @Test - @Category(CategoryA.class) - public void testInCategoryA() - { - System.out.println( "Ran testInCategoryA" ); - catACount++; - } - - @Test - @Category(CategoryB.class) - public void testInCategoryB() - { - System.out.println( "Ran testInCategoryB" ); - catBCount++; - } - - @Test - @Category(CategoryC.class) - public void testInCategoryC() - { - System.out.println( "Ran testInCategoryC" ); - catCCount++; - } - - @Test - public void testInNoCategory() - { - System.out.println( "Ran testInNoCategory" ); - catNoneCount++; - } - - @AfterClass - public static void oneTimeTearDown() - { - System.out.println("catA: " + catACount + "\n" + - "catB: " + catBCount + "\n" + - "catC: " + catCCount + "\n" + - "catNone: " + catNoneCount); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit48-categories/src/test/java/junit4/CategoryA.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit48-categories/src/test/java/junit4/CategoryA.java b/surefire-integration-tests/src/test/resources/junit48-categories/src/test/java/junit4/CategoryA.java deleted file mode 100644 index 9b8b855..0000000 --- a/surefire-integration-tests/src/test/resources/junit48-categories/src/test/java/junit4/CategoryA.java +++ /dev/null @@ -1,21 +0,0 @@ -package junit4; -/* - * 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. - */ - -interface CategoryA {} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit48-categories/src/test/java/junit4/CategoryB.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit48-categories/src/test/java/junit4/CategoryB.java b/surefire-integration-tests/src/test/resources/junit48-categories/src/test/java/junit4/CategoryB.java deleted file mode 100644 index f10f3b1..0000000 --- a/surefire-integration-tests/src/test/resources/junit48-categories/src/test/java/junit4/CategoryB.java +++ /dev/null @@ -1,21 +0,0 @@ -package junit4; -/* - * 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. - */ - -interface CategoryB {} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit48-categories/src/test/java/junit4/CategoryC.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit48-categories/src/test/java/junit4/CategoryC.java b/surefire-integration-tests/src/test/resources/junit48-categories/src/test/java/junit4/CategoryC.java deleted file mode 100644 index 3e9e854..0000000 --- a/surefire-integration-tests/src/test/resources/junit48-categories/src/test/java/junit4/CategoryC.java +++ /dev/null @@ -1,21 +0,0 @@ -package junit4; -/* - * 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. - */ - -interface CategoryC {} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit48-categories/src/test/java/junit4/CategoryCTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit48-categories/src/test/java/junit4/CategoryCTest.java b/surefire-integration-tests/src/test/resources/junit48-categories/src/test/java/junit4/CategoryCTest.java deleted file mode 100644 index af88bc8..0000000 --- a/surefire-integration-tests/src/test/resources/junit48-categories/src/test/java/junit4/CategoryCTest.java +++ /dev/null @@ -1,68 +0,0 @@ -package junit4; -/* - * 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.junit.AfterClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; - - -@Category(CategoryC.class) -public class CategoryCTest -{ - static int catACount = 0; - static int catBCount = 0; - static int catCCount = 0; - static int catNoneCount = 0; - - @Test - public void testInCategoryA() - { - catACount++; - } - - @Test - @Category(CategoryB.class) - public void testInCategoryB() - { - catBCount++; - } - - @Test - @Category(CategoryC.class) - public void testInCategoryC() - { - catCCount++; - } - - @Test - public void testInNoCategory() - { - catNoneCount++; - } - - @AfterClass - public static void oneTimeTearDown() - { - System.out.println("mA: " + catACount + "\n" + - "mB: " + catBCount + "\n" + - "mC: " + catCCount + "\n" + - "CatNone: " + catNoneCount); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit48-categories/src/test/java/junit4/NoCategoryTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit48-categories/src/test/java/junit4/NoCategoryTest.java b/surefire-integration-tests/src/test/resources/junit48-categories/src/test/java/junit4/NoCategoryTest.java deleted file mode 100644 index f08f40f..0000000 --- a/surefire-integration-tests/src/test/resources/junit48-categories/src/test/java/junit4/NoCategoryTest.java +++ /dev/null @@ -1,38 +0,0 @@ -package junit4; -/* - * 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.junit.AfterClass; -import org.junit.Test; - -public class NoCategoryTest { - static int catNoneCount = 0; - - @Test - public void testInNoCategory() - { - catNoneCount++; - } - - @AfterClass - public static void oneTimeTearDown() - { - System.out.println("NoCategoryTest.CatNone: " + catNoneCount); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit48-method-pattern/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit48-method-pattern/pom.xml b/surefire-integration-tests/src/test/resources/junit48-method-pattern/pom.xml deleted file mode 100644 index 8689549..0000000 --- a/surefire-integration-tests/src/test/resources/junit48-method-pattern/pom.xml +++ /dev/null @@ -1,103 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ 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. - --> - -<project xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.maven.surefire</groupId> - <artifactId>it-parent</artifactId> - <version>1.0</version> - <relativePath>../pom.xml</relativePath> - </parent> - - <groupId>org.apache.maven.plugins.surefire</groupId> - <artifactId>junit4</artifactId> - <version>1.0-SNAPSHOT</version> - <name>Test for JUnit 4.8.1</name> - - <properties> - <junitVersion>4.8.1</junitVersion> - </properties> - - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>${junitVersion}</version> - <scope>test</scope> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <test>BasicTest#testSuccess*</test> - <forkMode>once</forkMode> - </configuration> - </plugin> - </plugins> - </build> - - <profiles> - <profile> - <id>surefire-junit47</id> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <dependencies> - <dependency> - <groupId>org.apache.maven.surefire</groupId> - <artifactId>surefire-junit47</artifactId> - <version>${surefire.version}</version> - </dependency> - </dependencies> - </plugin> - </plugins> - </build> - </profile> - <profile> - <id>surefire-junit4</id> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <dependencies> - <dependency> - <groupId>org.apache.maven.surefire</groupId> - <artifactId>surefire-junit4</artifactId> - <version>${surefire.version}</version> - </dependency> - </dependencies> - </plugin> - </plugins> - </build> - </profile> - </profiles> - -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit48-method-pattern/src/test/java/junit4/BasicTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit48-method-pattern/src/test/java/junit4/BasicTest.java b/surefire-integration-tests/src/test/resources/junit48-method-pattern/src/test/java/junit4/BasicTest.java deleted file mode 100644 index 218488c..0000000 --- a/surefire-integration-tests/src/test/resources/junit48-method-pattern/src/test/java/junit4/BasicTest.java +++ /dev/null @@ -1,79 +0,0 @@ -package junit4; - -/* - * 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.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.experimental.categories.Category; - - -public class BasicTest -{ - - private boolean setUpCalled = false; - - private static boolean tearDownCalled = false; - - @Before - public void setUp() - { - setUpCalled = true; - tearDownCalled = false; - System.out.println( "Called setUp" ); - } - - @After - public void tearDown() - { - setUpCalled = false; - tearDownCalled = true; - System.out.println( "Called tearDown" ); - } - - @Test - public void testSetUp() - { - Assert.assertTrue( "setUp was not called", setUpCalled ); - } - - - @Test - public void testSuccessOne() - { - Assert.assertTrue( true ); - } - - @Test - @Category(SampleCategory.class) - public void testSuccessTwo() - { - Assert.assertTrue( true ); - } - - @AfterClass - public static void oneTimeTearDown() - { - - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit48-method-pattern/src/test/java/junit4/SampleCategory.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit48-method-pattern/src/test/java/junit4/SampleCategory.java b/surefire-integration-tests/src/test/resources/junit48-method-pattern/src/test/java/junit4/SampleCategory.java deleted file mode 100644 index db057af..0000000 --- a/surefire-integration-tests/src/test/resources/junit48-method-pattern/src/test/java/junit4/SampleCategory.java +++ /dev/null @@ -1,25 +0,0 @@ -package junit4; - -/* - * 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 interface SampleCategory -{ - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/pom.xml b/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/pom.xml deleted file mode 100644 index f307687..0000000 --- a/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/pom.xml +++ /dev/null @@ -1,195 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ 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. - --> - -<project xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.maven.surefire</groupId> - <artifactId>it-parent</artifactId> - <version>1.0</version> - <relativePath>../pom.xml</relativePath> - </parent> - <groupId>org.apache.maven.plugins.surefire</groupId> - <artifactId>jiras-surefire-745-junit</artifactId> - <version>1.0</version> - - <properties> - <included/> - <excluded/> - </properties> - - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.8.1</version> - <scope>test</scope> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - </plugin> - </plugins> - </build> - - <profiles> - <profile> - <id>junit4-test</id> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <dependencies> - <dependency> - <groupId>org.apache.maven.surefire</groupId> - <artifactId>surefire-junit4</artifactId> - <version>${surefire.version}</version> - </dependency> - </dependencies> - </plugin> - </plugins> - </build> - </profile> - <profile> - <id>junit47-test</id> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <dependencies> - <dependency> - <groupId>org.apache.maven.surefire</groupId> - <artifactId>surefire-junit47</artifactId> - <version>${surefire.version}</version> - </dependency> - </dependencies> - </plugin> - </plugins> - </build> - </profile> - <profile> - <id>junit4-includes</id> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <includes> - <include>${included}</include> - </includes> - </configuration> - <dependencies> - <dependency> - <groupId>org.apache.maven.surefire</groupId> - <artifactId>surefire-junit4</artifactId> - <version>${surefire.version}</version> - </dependency> - </dependencies> - </plugin> - </plugins> - </build> - </profile> - <profile> - <id>junit47-includes</id> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <includes> - <include>${included}</include> - </includes> - </configuration> - <dependencies> - <dependency> - <groupId>org.apache.maven.surefire</groupId> - <artifactId>surefire-junit47</artifactId> - <version>${surefire.version}</version> - </dependency> - </dependencies> - </plugin> - </plugins> - </build> - </profile> - <profile> - <id>junit4-includes-excludes</id> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <includes> - <include>${included}</include> - </includes> - <excludes> - <exclude>${excluded}</exclude> - </excludes> - </configuration> - <dependencies> - <dependency> - <groupId>org.apache.maven.surefire</groupId> - <artifactId>surefire-junit4</artifactId> - <version>${surefire.version}</version> - </dependency> - </dependencies> - </plugin> - </plugins> - </build> - </profile> - <profile> - <id>junit47-includes-excludes</id> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <includes> - <include>${included}</include> - </includes> - <excludes> - <exclude>${excluded}</exclude> - </excludes> - </configuration> - <dependencies> - <dependency> - <groupId>org.apache.maven.surefire</groupId> - <artifactId>surefire-junit47</artifactId> - <version>${surefire.version}</version> - </dependency> - </dependencies> - </plugin> - </plugins> - </build> - </profile> - </profiles> - -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/jiras/surefire745/BasicTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/jiras/surefire745/BasicTest.java b/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/jiras/surefire745/BasicTest.java deleted file mode 100644 index 44d5978..0000000 --- a/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/jiras/surefire745/BasicTest.java +++ /dev/null @@ -1,53 +0,0 @@ -package jiras.surefire745; - - -/* - * 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.junit.Rule; -import org.junit.Test; -import org.junit.rules.TestName; - -import static org.junit.Assert.*; - - -public class BasicTest -{ - @Rule - public final TestName testName = new TestName(); - - @Test - public void testSuccessOne() - { - System.out.println( getClass() + "#" + testName.getMethodName() ); - } - - @Test - public void testSuccessTwo() - { - System.out.println( getClass() + "#" + testName.getMethodName() ); - } - - @Test - public void testFailure() - { - System.out.println( getClass() + "#" + testName.getMethodName() ); - fail( ); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/jiras/surefire745/TestFive.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/jiras/surefire745/TestFive.java b/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/jiras/surefire745/TestFive.java deleted file mode 100644 index 7d88f70..0000000 --- a/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/jiras/surefire745/TestFive.java +++ /dev/null @@ -1,49 +0,0 @@ -package jiras.surefire745; - -/* - * 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.junit.Rule; -import org.junit.Test; -import org.junit.rules.TestName; - - -public class TestFive -{ - @Rule - public final TestName testName = new TestName(); - - @Test - public void testSuccessOne() - { - System.out.println( getClass() + "#" + testName.getMethodName() ); - } - - @Test - public void testSuccessTwo() - { - System.out.println( getClass() + "#" + testName.getMethodName() ); - } - - @Test - public void testSuccessThree() - { - System.out.println( getClass() + "#" + testName.getMethodName() ); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/jiras/surefire745/TestFour.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/jiras/surefire745/TestFour.java b/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/jiras/surefire745/TestFour.java deleted file mode 100644 index 824b0d5..0000000 --- a/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/jiras/surefire745/TestFour.java +++ /dev/null @@ -1,49 +0,0 @@ -package jiras.surefire745; - -/* - * 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.junit.Rule; -import org.junit.Test; -import org.junit.rules.TestName; - - -public class TestFour -{ - @Rule - public final TestName testName = new TestName(); - - @Test - public void testSuccessOne() - { - System.out.println( getClass() + "#" + testName.getMethodName() ); - } - - @Test - public void testSuccessTwo() - { - System.out.println( getClass() + "#" + testName.getMethodName() ); - } - - @Test - public void testSuccessThree() - { - System.out.println( getClass() + "#" + testName.getMethodName() ); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/jiras/surefire745/TestThree.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/jiras/surefire745/TestThree.java b/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/jiras/surefire745/TestThree.java deleted file mode 100644 index a868e7c..0000000 --- a/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/jiras/surefire745/TestThree.java +++ /dev/null @@ -1,51 +0,0 @@ -package jiras.surefire745; - -/* - * 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.junit.Rule; -import org.junit.Test; -import org.junit.rules.TestName; - -import static org.junit.Assert.*; - -public class TestThree -{ - @Rule - public final TestName testName = new TestName(); - - @Test - public void testSuccessOne() - { - System.out.println( getClass() + "#" + testName.getMethodName() ); - } - - @Test - public void testSuccessTwo() - { - System.out.println( getClass() + "#" + testName.getMethodName() ); - } - - @Test - public void testFailOne() - { - System.out.println( getClass() + "#" + testName.getMethodName() ); - fail(); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/jiras/surefire745/TestTwo.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/jiras/surefire745/TestTwo.java b/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/jiras/surefire745/TestTwo.java deleted file mode 100644 index 5f1182d..0000000 --- a/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/jiras/surefire745/TestTwo.java +++ /dev/null @@ -1,42 +0,0 @@ -package jiras.surefire745; - -/* - * 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.junit.Rule; -import org.junit.Test; -import org.junit.rules.TestName; - -public class TestTwo -{ - @Rule - public final TestName testName = new TestName(); - - @Test - public void testSuccessOne() - { - System.out.println( getClass() + "#" + testName.getMethodName() ); - } - - @Test - public void testSuccessTwo() - { - System.out.println( getClass() + "#" + testName.getMethodName() ); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit48-multiple-methods/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit48-multiple-methods/pom.xml b/surefire-integration-tests/src/test/resources/junit48-multiple-methods/pom.xml deleted file mode 100644 index 09ef51e..0000000 --- a/surefire-integration-tests/src/test/resources/junit48-multiple-methods/pom.xml +++ /dev/null @@ -1,103 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ 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. - --> - -<project xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.maven.surefire</groupId> - <artifactId>it-parent</artifactId> - <version>1.0</version> - <relativePath>../pom.xml</relativePath> - </parent> - - <groupId>org.apache.maven.plugins.surefire</groupId> - <artifactId>junit4</artifactId> - <version>1.0-SNAPSHOT</version> - <name>Test for JUnit 4.8.1</name> - - <properties> - <junitVersion>4.8.1</junitVersion> - </properties> - - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>${junitVersion}</version> - <scope>test</scope> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <test>junit4/BasicTest#testSuccessOne+testFailOne,junit4/TestThree#testSuccessTwo</test> - <forkMode>once</forkMode> - </configuration> - </plugin> - </plugins> - </build> - - <profiles> - <profile> - <id>surefire-junit47</id> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <dependencies> - <dependency> - <groupId>org.apache.maven.surefire</groupId> - <artifactId>surefire-junit47</artifactId> - <version>${surefire.version}</version> - </dependency> - </dependencies> - </plugin> - </plugins> - </build> - </profile> - <profile> - <id>surefire-junit4</id> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <dependencies> - <dependency> - <groupId>org.apache.maven.surefire</groupId> - <artifactId>surefire-junit4</artifactId> - <version>${surefire.version}</version> - </dependency> - </dependencies> - </plugin> - </plugins> - </build> - </profile> - </profiles> - -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit48-multiple-methods/src/test/java/junit4/BasicTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit48-multiple-methods/src/test/java/junit4/BasicTest.java b/surefire-integration-tests/src/test/resources/junit48-multiple-methods/src/test/java/junit4/BasicTest.java deleted file mode 100644 index de387d3..0000000 --- a/surefire-integration-tests/src/test/resources/junit48-multiple-methods/src/test/java/junit4/BasicTest.java +++ /dev/null @@ -1,83 +0,0 @@ -package junit4; - - -/* - * 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.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; - - -public class BasicTest -{ - - private boolean setUpCalled = false; - - private static boolean tearDownCalled = false; - - @Before - public void setUp() - { - setUpCalled = true; - tearDownCalled = false; - System.out.println( "Called setUp" ); - } - - @After - public void tearDown() - { - setUpCalled = false; - tearDownCalled = true; - System.out.println( "Called tearDown" ); - } - - @Test - public void testSetUp() - { - Assert.assertTrue( "setUp was not called", setUpCalled ); - } - - - @Test - public void testSuccessOne() - { - Assert.assertTrue( true ); - } - - @Test - public void testSuccessTwo() - { - Assert.assertTrue( true ); - } - - @Test - public void testFailOne() - { - Assert.assertFalse( false ); - } - - @AfterClass - public static void oneTimeTearDown() - { - - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit48-multiple-methods/src/test/java/junit4/TestThree.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit48-multiple-methods/src/test/java/junit4/TestThree.java b/surefire-integration-tests/src/test/resources/junit48-multiple-methods/src/test/java/junit4/TestThree.java deleted file mode 100644 index 16bc283..0000000 --- a/surefire-integration-tests/src/test/resources/junit48-multiple-methods/src/test/java/junit4/TestThree.java +++ /dev/null @@ -1,77 +0,0 @@ -package junit4; - -/* - * 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.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; - - -public class TestThree -{ - - private boolean setUpCalled = false; - - private static boolean tearDownCalled = false; - - @Before - public void setUp() - { - setUpCalled = true; - tearDownCalled = false; - System.out.println( "Called setUp" ); - } - - @After - public void tearDown() - { - setUpCalled = false; - tearDownCalled = true; - System.out.println( "Called tearDown" ); - } - - @Test - public void testSetUp() - { - Assert.assertTrue( "setUp was not called", setUpCalled ); - } - - - @Test - public void testSuccessOne() - { - Assert.assertTrue( true ); - } - - @Test - public void testSuccessTwo() - { - Assert.assertTrue( true ); - } - - @AfterClass - public static void oneTimeTearDown() - { - - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit48-multiple-methods/src/test/java/junit4/TestTwo.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit48-multiple-methods/src/test/java/junit4/TestTwo.java b/surefire-integration-tests/src/test/resources/junit48-multiple-methods/src/test/java/junit4/TestTwo.java deleted file mode 100644 index 137bf8b..0000000 --- a/surefire-integration-tests/src/test/resources/junit48-multiple-methods/src/test/java/junit4/TestTwo.java +++ /dev/null @@ -1,76 +0,0 @@ -package junit4; - -/* - * 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.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; - - -public class TestTwo -{ - - private boolean setUpCalled = false; - - private static boolean tearDownCalled = false; - - @Before - public void setUp() - { - setUpCalled = true; - tearDownCalled = false; - System.out.println( "Called setUp" ); - } - - @After - public void tearDown() - { - setUpCalled = false; - tearDownCalled = true; - System.out.println( "Called tearDown" ); - } - - @Test - public void testSetUp() - { - Assert.assertTrue( "setUp was not called", setUpCalled ); - } - - - @Test - public void testSuccessOne() - { - Assert.assertTrue( true ); - } - - @Test - public void testSuccessTwo() - { - Assert.assertTrue( true ); - } - - @AfterClass - public static void oneTimeTearDown() - { - - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit48-single-method/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit48-single-method/pom.xml b/surefire-integration-tests/src/test/resources/junit48-single-method/pom.xml deleted file mode 100644 index 96061ce..0000000 --- a/surefire-integration-tests/src/test/resources/junit48-single-method/pom.xml +++ /dev/null @@ -1,103 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ 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. - --> - -<project xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.maven.surefire</groupId> - <artifactId>it-parent</artifactId> - <version>1.0</version> - <relativePath>../pom.xml</relativePath> - </parent> - - <groupId>org.apache.maven.plugins.surefire</groupId> - <artifactId>junit4</artifactId> - <version>1.0-SNAPSHOT</version> - <name>Test for JUnit 4.8.1</name> - - <properties> - <junitVersion>4.8.1</junitVersion> - </properties> - - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>${junitVersion}</version> - <scope>test</scope> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <test>BasicTest#testSuccessOne</test> - <forkMode>once</forkMode> - </configuration> - </plugin> - </plugins> - </build> - - <profiles> - <profile> - <id>surefire-junit47</id> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <dependencies> - <dependency> - <groupId>org.apache.maven.surefire</groupId> - <artifactId>surefire-junit47</artifactId> - <version>${surefire.version}</version> - </dependency> - </dependencies> - </plugin> - </plugins> - </build> - </profile> - <profile> - <id>surefire-junit4</id> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <dependencies> - <dependency> - <groupId>org.apache.maven.surefire</groupId> - <artifactId>surefire-junit4</artifactId> - <version>${surefire.version}</version> - </dependency> - </dependencies> - </plugin> - </plugins> - </build> - </profile> - </profiles> - -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit48-single-method/src/test/java/junit4/BasicTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit48-single-method/src/test/java/junit4/BasicTest.java b/surefire-integration-tests/src/test/resources/junit48-single-method/src/test/java/junit4/BasicTest.java deleted file mode 100644 index d983259..0000000 --- a/surefire-integration-tests/src/test/resources/junit48-single-method/src/test/java/junit4/BasicTest.java +++ /dev/null @@ -1,71 +0,0 @@ -package junit4; - - -/* - * 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.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; - - -public class BasicTest -{ - - private boolean setUpCalled = false; - - private static boolean tearDownCalled = false; - - @Before - public void setUp() - { - setUpCalled = true; - tearDownCalled = false; - System.out.println( "Called setUp" ); - } - - @After - public void tearDown() - { - setUpCalled = false; - tearDownCalled = true; - System.out.println( "Called tearDown" ); - } - - @Test - public void testSetUp() - { - Assert.assertTrue( "setUp was not called", setUpCalled ); - } - - - @Test - public void testSuccessOne() - { - Assert.assertTrue( true ); - } - - @AfterClass - public static void oneTimeTearDown() - { - - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/junit48-smartStackTrace/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/junit48-smartStackTrace/pom.xml b/surefire-integration-tests/src/test/resources/junit48-smartStackTrace/pom.xml deleted file mode 100644 index fe104a4..0000000 --- a/surefire-integration-tests/src/test/resources/junit48-smartStackTrace/pom.xml +++ /dev/null @@ -1,57 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ 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. - --> - -<project xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <groupId>org.apache.maven.plugins.surefire</groupId> - <artifactId>junit4-smartstacktrace</artifactId> - <version>1.0-SNAPSHOT</version> - <name>Test for smart stack trace parser</name> - - - <properties> - <junitVersion>4.8.1</junitVersion> - <maven.compiler.source>1.7</maven.compiler.source> - <maven.compiler.target>1.7</maven.compiler.target> - </properties> - - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>${junitVersion}</version> - <scope>test</scope> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <version>${surefire.version}</version> - </plugin> - </plugins> - </build> - -</project>