You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ti...@apache.org on 2015/09/06 22:58:37 UTC
[06/17] maven-surefire git commit: [SUREFIRE] refactoring
[SUREFIRE] refactoring
Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/8c34806b
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/8c34806b
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/8c34806b
Branch: refs/heads/master
Commit: 8c34806bd7d2a2e384823a6febe1f4131a9c5ee5
Parents: d755ecf
Author: Tibor17 <ti...@lycos.com>
Authored: Wed Aug 5 00:00:28 2015 +0200
Committer: Tibor17 <ti...@lycos.com>
Committed: Sun Sep 6 22:57:57 2015 +0200
----------------------------------------------------------------------
.../common/junit4/JUnit4ProviderUtilTest.java | 2 --
.../common/junit4/JUnit4Reflector40Test.java | 4 +--
.../common/junit4/JUnit4RunListenerTest.java | 5 +--
.../surefire/junit4/JUnit4TestCheckerTest.java | 38 +++++++-------------
4 files changed, 16 insertions(+), 33 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/8c34806b/surefire-providers/common-junit4/src/test/java/org/apache/maven/surefire/common/junit4/JUnit4ProviderUtilTest.java
----------------------------------------------------------------------
diff --git a/surefire-providers/common-junit4/src/test/java/org/apache/maven/surefire/common/junit4/JUnit4ProviderUtilTest.java b/surefire-providers/common-junit4/src/test/java/org/apache/maven/surefire/common/junit4/JUnit4ProviderUtilTest.java
index 6a6e2e7..b05a562 100644
--- a/surefire-providers/common-junit4/src/test/java/org/apache/maven/surefire/common/junit4/JUnit4ProviderUtilTest.java
+++ b/surefire-providers/common-junit4/src/test/java/org/apache/maven/surefire/common/junit4/JUnit4ProviderUtilTest.java
@@ -21,12 +21,10 @@ package org.apache.maven.surefire.common.junit4;
import junit.framework.TestCase;
import org.apache.maven.surefire.testset.TestSetFailedException;
-import org.apache.maven.surefire.util.TestsToRun;
import org.junit.runner.Description;
import org.junit.runner.notification.Failure;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/8c34806b/surefire-providers/common-junit4/src/test/java/org/apache/maven/surefire/common/junit4/JUnit4Reflector40Test.java
----------------------------------------------------------------------
diff --git a/surefire-providers/common-junit4/src/test/java/org/apache/maven/surefire/common/junit4/JUnit4Reflector40Test.java b/surefire-providers/common-junit4/src/test/java/org/apache/maven/surefire/common/junit4/JUnit4Reflector40Test.java
index 979adb8..28b5fed 100644
--- a/surefire-providers/common-junit4/src/test/java/org/apache/maven/surefire/common/junit4/JUnit4Reflector40Test.java
+++ b/surefire-providers/common-junit4/src/test/java/org/apache/maven/surefire/common/junit4/JUnit4Reflector40Test.java
@@ -19,7 +19,6 @@ package org.apache.maven.surefire.common.junit4;
*/
import junit.framework.TestCase;
-import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.Description;
@@ -30,12 +29,11 @@ import org.junit.runner.Description;
public class JUnit4Reflector40Test
extends TestCase
{
- @Test
public void testGetAnnotatedIgnore()
{
Description desc = Description.createTestDescription( IgnoreWithDescription.class, "testSomething2" );
Ignore annotatedIgnore = JUnit4Reflector.getAnnotatedIgnore( desc );
- Assert.assertNull( annotatedIgnore );
+ assertNull( annotatedIgnore );
}
private static final String reason = "Ignorance is bliss";
http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/8c34806b/surefire-providers/common-junit4/src/test/java/org/apache/maven/surefire/common/junit4/JUnit4RunListenerTest.java
----------------------------------------------------------------------
diff --git a/surefire-providers/common-junit4/src/test/java/org/apache/maven/surefire/common/junit4/JUnit4RunListenerTest.java b/surefire-providers/common-junit4/src/test/java/org/apache/maven/surefire/common/junit4/JUnit4RunListenerTest.java
index c4765e9..deda538 100644
--- a/surefire-providers/common-junit4/src/test/java/org/apache/maven/surefire/common/junit4/JUnit4RunListenerTest.java
+++ b/surefire-providers/common-junit4/src/test/java/org/apache/maven/surefire/common/junit4/JUnit4RunListenerTest.java
@@ -20,6 +20,8 @@ package org.apache.maven.surefire.common.junit4;
*/
import java.util.concurrent.CountDownLatch;
+
+import junit.framework.TestCase;
import org.apache.maven.surefire.junit4.MockReporter;
import junit.framework.Assert;
@@ -36,8 +38,8 @@ import org.junit.runner.notification.RunNotifier;
* @author Kristian Rosenvold
*/
public class JUnit4RunListenerTest
+ extends TestCase
{
- @Test
public void testTestStarted()
throws Exception
{
@@ -48,7 +50,6 @@ public class JUnit4RunListenerTest
junitTestRunner.run( runNotifier );
}
- @Test
public void testParallelInvocations()
throws Exception
{
http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/8c34806b/surefire-providers/common-junit4/src/test/java/org/apache/maven/surefire/junit4/JUnit4TestCheckerTest.java
----------------------------------------------------------------------
diff --git a/surefire-providers/common-junit4/src/test/java/org/apache/maven/surefire/junit4/JUnit4TestCheckerTest.java b/surefire-providers/common-junit4/src/test/java/org/apache/maven/surefire/junit4/JUnit4TestCheckerTest.java
index 3f2ed2b..a9f1b80 100644
--- a/surefire-providers/common-junit4/src/test/java/org/apache/maven/surefire/junit4/JUnit4TestCheckerTest.java
+++ b/surefire-providers/common-junit4/src/test/java/org/apache/maven/surefire/junit4/JUnit4TestCheckerTest.java
@@ -33,91 +33,77 @@ import org.junit.runner.Runner;
import org.junit.runner.notification.RunNotifier;
import org.junit.runners.Suite;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
/**
* @author Kristian Rosenvold
*/
public class JUnit4TestCheckerTest
+ extends TestCase
{
private final JUnit4TestChecker jUnit4TestChecker = new JUnit4TestChecker( this.getClass().getClassLoader() );
- @Test
- public void validJunit4Annotated()
+ public void testValidJunit4Annotated()
throws TestSetFailedException
{
assertTrue( jUnit4TestChecker.accept( JUnit4TestCheckerTest.class ) );
}
- @Test
- public void validJunit4itsAJunit3Test()
+ public void testValidJunit4itsAJunit3Test()
throws TestSetFailedException
{
assertTrue( jUnit4TestChecker.accept( AlsoValid.class ) );
}
- @Test
- public void validJunitSubclassWithoutOwnTestmethods()
+ public void testValidJunitSubclassWithoutOwnTestmethods()
throws TestSetFailedException
{
assertTrue( jUnit4TestChecker.accept( SubClassWithoutOwnTestMethods.class ) );
}
- @Test
- public void validSuite()
+ public void testValidSuite()
throws TestSetFailedException
{
assertTrue( jUnit4TestChecker.accept( SuiteValid1.class ) );
}
- @Test
- public void validCustomSuite()
+ public void testValidCustomSuite()
throws TestSetFailedException
{
assertTrue( jUnit4TestChecker.accept( SuiteValid2.class ) );
}
- @Test
- public void validCustomRunner()
+ public void testValidCustomRunner()
throws TestSetFailedException
{
assertTrue( jUnit4TestChecker.accept( SuiteValidCustomRunner.class ) );
}
- @Test
- public void invalidTest()
+ public void testInvalidTest()
throws TestSetFailedException
{
assertFalse( jUnit4TestChecker.accept( NotValidTest.class ) );
}
- @Test
- public void dontAcceptAbstractClasses()
+ public void testDontAcceptAbstractClasses()
{
assertFalse( jUnit4TestChecker.accept( BaseClassWithTest.class ) );
}
- @Test
- public void suiteOnlyTest()
+ public void testSuiteOnlyTest()
{
assertTrue( jUnit4TestChecker.accept( SuiteOnlyTest.class ) );
}
- @Test
- public void customSuiteOnlyTest()
+ public void testCustomSuiteOnlyTest()
{
assertTrue( jUnit4TestChecker.accept( CustomSuiteOnlyTest.class ) );
}
- @Test
- public void innerClassNotAutomaticallyTc()
+ public void testInnerClassNotAutomaticallyTc()
{
assertTrue( jUnit4TestChecker.accept( NestedTC.class ) );
assertFalse( jUnit4TestChecker.accept( NestedTC.Inner.class ) );
}
- @Test
public void testCannotLoadRunWithAnnotation()
throws Exception
{