public class JUnit4StackTraceWriter extends java.lang.Object implements StackTraceWriter
Failure
for
surefire as a stacktrace.Modifier and Type | Field and Description |
---|---|
protected org.junit.runner.notification.Failure |
junitFailure |
Constructor and Description |
---|
JUnit4StackTraceWriter(org.junit.runner.notification.Failure junitFailure)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getTestClassName() |
protected java.lang.String |
getTestMethodName() |
SafeThrowable |
getThrowable()
Returns the exception associated with this failure.
|
private static boolean |
isMultiLineExceptionMessage(java.lang.Throwable t) |
java.lang.String |
smartTrimmedStackTrace()
Get the "smart" trimmed (1-2 lines) stacktrace.
|
java.lang.String |
writeTraceToString()
Write the throwable to a string, without trimming.
|
java.lang.String |
writeTrimmedTraceToString()
At the moment, returns the same as
writeTraceToString() . |
public JUnit4StackTraceWriter(org.junit.runner.notification.Failure junitFailure)
junitFailure
- the Failure
that this will be operating onpublic java.lang.String writeTraceToString()
StackTraceWriter
writeTraceToString
in interface StackTraceWriter
protected java.lang.String getTestClassName()
protected java.lang.String getTestMethodName()
public java.lang.String smartTrimmedStackTrace()
StackTraceWriter
smartTrimmedStackTrace
in interface StackTraceWriter
public java.lang.String writeTrimmedTraceToString()
writeTraceToString()
.writeTrimmedTraceToString
in interface StackTraceWriter
StackTraceWriter.writeTrimmedTraceToString()
public SafeThrowable getThrowable()
getThrowable
in interface StackTraceWriter
StackTraceWriter.getThrowable()
private static boolean isMultiLineExceptionMessage(java.lang.Throwable t)