maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tibordig...@apache.org
Subject [09/19] maven-surefire git commit: Clean up test for multiple method patterns
Date Thu, 26 Mar 2015 00:15:51 GMT
Clean up test for multiple method patterns


Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/870d229b
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/870d229b
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/870d229b

Branch: refs/heads/master
Commit: 870d229b5a1756e050aad66203b1c7dfa1bec49c
Parents: dcaf38b
Author: Jörn Horstmann <git@jhorstmann.net>
Authored: Fri Dec 26 13:13:15 2014 +0100
Committer: Jörn Horstmann <git@jhorstmann.net>
Committed: Fri Dec 26 13:13:15 2014 +0100

----------------------------------------------------------------------
 .../junit48-multiple-method-patterns/pom.xml    |  2 +-
 .../src/test/java/junit4/BasicTest.java         | 49 +++-----------------
 .../src/test/java/junit4/TestFive.java          | 38 +--------------
 .../src/test/java/junit4/TestFour.java          | 38 +--------------
 .../src/test/java/junit4/TestThree.java         | 40 +---------------
 .../src/test/java/junit4/TestTwo.java           | 41 ++--------------
 6 files changed, 13 insertions(+), 195 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/870d229b/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
index 540de2a..023857d 100644
--- 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
@@ -57,7 +57,7 @@
         <artifactId>maven-surefire-plugin</artifactId>
         <version>${surefire.version}</version>
         <configuration>
-          <test>junit4.BasicTest#testSuccessOne+testFailOne,junit4.TestThree#testSuccess*,junit4.TestFour#testSuccess???,junit4.*Five#test*One</test>
+          <test>junit4.BasicTest#testSuccessOne+testSuccessTwo,junit4.TestThree#testSuccess*,junit4.TestFour#testSuccess???,junit4.*Five#test*One</test>
         </configuration>
         <dependencies>
           <dependency>

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/870d229b/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/junit4/BasicTest.java
----------------------------------------------------------------------
diff --git a/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/junit4/BasicTest.java
b/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/junit4/BasicTest.java
index de387d3..d7921e0 100644
--- a/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/junit4/BasicTest.java
+++ b/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/junit4/BasicTest.java
@@ -19,65 +19,28 @@ package junit4;
  * 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()
-    {
-        
+        Assert.fail( );
     }
 
 }

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/870d229b/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/junit4/TestFive.java
----------------------------------------------------------------------
diff --git a/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/junit4/TestFive.java
b/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/junit4/TestFive.java
index 0e69bd0..642a5ad 100644
--- a/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/junit4/TestFive.java
+++ b/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/junit4/TestFive.java
@@ -19,61 +19,25 @@ package junit4;
  * under the License.
  */
 
-import org.junit.*;
+import org.junit.Test;
 
 
 public class TestFive
 {
 
-    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 testSuccessThree()
     {
-        Assert.assertTrue( true );
-    }
-
-    @AfterClass
-    public static void oneTimeTearDown()
-    {
-
     }
 
 }

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/870d229b/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/junit4/TestFour.java
----------------------------------------------------------------------
diff --git a/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/junit4/TestFour.java
b/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/junit4/TestFour.java
index f9cc25a..f8acce9 100644
--- a/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/junit4/TestFour.java
+++ b/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/junit4/TestFour.java
@@ -19,61 +19,25 @@ package junit4;
  * under the License.
  */
 
-import org.junit.*;
+import org.junit.Test;
 
 
 public class TestFour
 {
 
-    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 testSuccessThree()
     {
-        Assert.assertTrue( true );
-    }
-
-    @AfterClass
-    public static void oneTimeTearDown()
-    {
-
     }
 
 }

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/870d229b/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/junit4/TestThree.java
----------------------------------------------------------------------
diff --git a/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/junit4/TestThree.java
b/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/junit4/TestThree.java
index ab728c3..7d31dfb 100644
--- a/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/junit4/TestThree.java
+++ b/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/junit4/TestThree.java
@@ -19,65 +19,27 @@ package junit4;
  * 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 );
     }
 
     @Test
     public void testFailOne()
     {
-        Assert.assertFalse( false );
-    }
-
-    @AfterClass
-    public static void oneTimeTearDown()
-    {
-
+        Assert.fail();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/870d229b/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/junit4/TestTwo.java
----------------------------------------------------------------------
diff --git a/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/junit4/TestTwo.java
b/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/junit4/TestTwo.java
index 137bf8b..e8648d2 100644
--- a/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/junit4/TestTwo.java
+++ b/surefire-integration-tests/src/test/resources/junit48-multiple-method-patterns/src/test/java/junit4/TestTwo.java
@@ -18,59 +18,24 @@ package junit4;
  * 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()
-    {
-        
     }
 
 }


Mime
View raw message