org.apache.maven.surefire.common.junit4
Class JUnit4StackTraceWriter

java.lang.Object
  extended by org.apache.maven.surefire.common.junit4.JUnit4StackTraceWriter
All Implemented Interfaces:
StackTraceWriter

public class JUnit4StackTraceWriter
extends Object
implements StackTraceWriter

Writes out a specific Failure for surefire as a stacktrace.

Author:
Karl M. Davis

Constructor Summary
JUnit4StackTraceWriter(org.junit.runner.notification.Failure junitFailure)
          Constructor.
 
Method Summary
 Throwable getThrowable()
          Returns the exception associated with this failure.
 String writeTraceToString()
          Write the throwable to a string, without trimming.
 String writeTrimmedTraceToString()
          At the moment, returns the same as writeTraceToString().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JUnit4StackTraceWriter

public JUnit4StackTraceWriter(org.junit.runner.notification.Failure junitFailure)
Constructor.

Parameters:
junitFailure - the Failure that this will be operating on
Method Detail

writeTraceToString

public String writeTraceToString()
Description copied from interface: StackTraceWriter
Write the throwable to a string, without trimming.

Specified by:
writeTraceToString in interface StackTraceWriter
Returns:
the trace

writeTrimmedTraceToString

public String writeTrimmedTraceToString()
At the moment, returns the same as writeTraceToString().

Specified by:
writeTrimmedTraceToString in interface StackTraceWriter
Returns:
the trace
See Also:
StackTraceWriter.writeTrimmedTraceToString()

getThrowable

public Throwable getThrowable()
Returns the exception associated with this failure.

Specified by:
getThrowable in interface StackTraceWriter
Returns:
the throwable
See Also:
StackTraceWriter.getThrowable()


Copyright © 2004-2012 Apache Software Foundation. All Rights Reserved.