Class JUnit4StackTraceWriter
java.lang.Object
org.apache.maven.surefire.common.junit4.JUnit4StackTraceWriter
- All Implemented Interfaces:
StackTraceWriter
Writes out a specific
Failure
for
surefire as a stacktrace.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.junit.runner.notification.Failure
-
Constructor Summary
ConstructorsConstructorDescriptionJUnit4StackTraceWriter
(org.junit.runner.notification.Failure junitFailure) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns the exception associated with this failure.private static boolean
Get the "smart" trimmed (1-2 lines) stacktrace.Write the throwable to a string, without trimming.At the moment, returns the same aswriteTraceToString()
.
-
Field Details
-
junitFailure
private final org.junit.runner.notification.Failure junitFailure
-
-
Constructor Details
-
JUnit4StackTraceWriter
public JUnit4StackTraceWriter(org.junit.runner.notification.Failure junitFailure) Constructor.- Parameters:
junitFailure
- theFailure
that this will be operating on
-
-
Method Details
-
writeTraceToString
Description copied from interface:StackTraceWriter
Write the throwable to a string, without trimming.- Specified by:
writeTraceToString
in interfaceStackTraceWriter
- Returns:
- the trace
-
smartTrimmedStackTrace
Description copied from interface:StackTraceWriter
Get the "smart" trimmed (1-2 lines) stacktrace.- Specified by:
smartTrimmedStackTrace
in interfaceStackTraceWriter
- Returns:
- the trace
-
writeTrimmedTraceToString
At the moment, returns the same aswriteTraceToString()
.- Specified by:
writeTrimmedTraceToString
in interfaceStackTraceWriter
- Returns:
- the trace
- See Also:
-
getThrowable
Returns the exception associated with this failure.- Specified by:
getThrowable
in interfaceStackTraceWriter
- Returns:
- the throwable
- See Also:
-
isMultiLineExceptionMessage
-