Repository: maven-surefire
Updated Branches:
  refs/heads/master 8ac0fe440 -> 8d22e161d


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/8d22e161
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/8d22e161
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/8d22e161

Branch: refs/heads/master
Commit: 8d22e161d35892ba1894146fe7116fed54dcead7
Parents: 8ac0fe4
Author: Tibor17 <tibo...@lycos.com>
Authored: Tue Aug 23 12:34:21 2016 +0200
Committer: Tibor17 <tibo...@lycos.com>
Committed: Tue Aug 23 12:34:21 2016 +0200

----------------------------------------------------------------------
 .../org/apache/maven/surefire/report/SimpleReportEntry.java   | 7 ++++++-
 .../maven/surefire/common/junit4/JUnit4RunListener.java       | 6 ++++--
 2 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/8d22e161/surefire-api/src/main/java/org/apache/maven/surefire/report/SimpleReportEntry.java
----------------------------------------------------------------------
diff --git 
a/surefire-api/src/main/java/org/apache/maven/surefire/report/SimpleReportEntry.java
 
b/surefire-api/src/main/java/org/apache/maven/surefire/report/SimpleReportEntry.java
index 0bed7ed..4715b24 100644
--- 
a/surefire-api/src/main/java/org/apache/maven/surefire/report/SimpleReportEntry.java
+++ 
b/surefire-api/src/main/java/org/apache/maven/surefire/report/SimpleReportEntry.java
@@ -90,9 +90,14 @@ public class SimpleReportEntry
         this( source, name, stackTraceWriter, elapsed, safeGetMessage( 
stackTraceWriter ) );
     }
 
+    public static SimpleReportEntry assumption( String source, String name, 
String message )
+    {
+        return new SimpleReportEntry( source, name, message );
+    }
+
     public static SimpleReportEntry ignored( String source, String name, 
String message )
     {
-        return new SimpleReportEntry( source, name, null, null, message );
+        return new SimpleReportEntry( source, name, message );
     }
 
     public static SimpleReportEntry withException( String source, String name, 
StackTraceWriter stackTraceWriter )

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/8d22e161/surefire-providers/common-junit4/src/main/java/org/apache/maven/surefire/common/junit4/JUnit4RunListener.java
----------------------------------------------------------------------
diff --git 
a/surefire-providers/common-junit4/src/main/java/org/apache/maven/surefire/common/junit4/JUnit4RunListener.java
 
b/surefire-providers/common-junit4/src/main/java/org/apache/maven/surefire/common/junit4/JUnit4RunListener.java
index 023aa1a..d3aa9a4 100644
--- 
a/surefire-providers/common-junit4/src/main/java/org/apache/maven/surefire/common/junit4/JUnit4RunListener.java
+++ 
b/surefire-providers/common-junit4/src/main/java/org/apache/maven/surefire/common/junit4/JUnit4RunListener.java
@@ -33,6 +33,7 @@ import java.util.regex.Pattern;
 
 import static 
org.apache.maven.surefire.common.junit4.JUnit4ProviderUtil.isFailureInsideJUnitItself;
 import static 
org.apache.maven.surefire.common.junit4.JUnit4Reflector.getAnnotatedIgnoreValue;
+import static org.apache.maven.surefire.report.SimpleReportEntry.assumption;
 import static org.apache.maven.surefire.report.SimpleReportEntry.ignored;
 import static org.apache.maven.surefire.report.SimpleReportEntry.withException;
 
@@ -126,8 +127,9 @@ public class JUnit4RunListener
     @SuppressWarnings( { "UnusedDeclaration" } )
     public void testAssumptionFailure( Failure failure )
     {
-        reporter.testAssumptionFailure( new SimpleReportEntry( getClassName( 
failure.getDescription() ) ,
-              failure.getDescription().getDisplayName() , failure.getMessage() 
) );
+        Description desc = failure.getDescription();
+        String test = getClassName( desc );
+        reporter.testAssumptionFailure( assumption( test, 
desc.getDisplayName(), failure.getMessage() ) );
         failureFlag.set( true );
     }
 

Reply via email to