Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Tibor17 committed Aug 23, 2016
1 parent 8ac0fe4 commit 8d22e16
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Expand Up @@ -90,9 +90,14 @@ public SimpleReportEntry( String source, String name, StackTraceWriter stackTrac
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 )
Expand Down
Expand Up @@ -33,6 +33,7 @@

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;

Expand Down Expand Up @@ -126,8 +127,9 @@ public void testFailure( Failure failure )
@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 );
}

Expand Down

0 comments on commit 8d22e16

Please sign in to comment.