|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmomeunit.framework.TestFailure
public class TestFailure
Describes a test failure or error. There are two kinds of test failures:
AssertionFailedError
thrown as result of test failure, or
Throwable
thrown while executing this test). Contains methods for
checking the kind of failure and printing the stack-trace of thrown
exception.
TestResult
Field Summary | |
---|---|
protected Throwable |
problem
Throwable thrown while executing test. |
protected Test |
test
Test instance that failed. |
Constructor Summary | |
---|---|
TestFailure(Test failedTest,
Throwable thrownException)
Instantiates a TestFailure with the given Test and
Throwable . |
Method Summary | |
---|---|
Test |
failedTest()
Returns the failed test. |
boolean |
isFailure()
Checks is this TestFailure a result of failed assertion or thrown error. |
void |
printTrace()
Prints stack-trace of thrown exception to the standard error output. |
Throwable |
thrownException()
Returns the thrown exception. |
String |
toString()
Returns a short description of this TestFailure. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Test test
protected Throwable problem
Constructor Detail |
---|
public TestFailure(Test failedTest, Throwable thrownException)
Test
and
Throwable
.
failedTest
- test that failed.thrownException
- Throwable thrown while executing test.Method Detail |
---|
public Test failedTest()
public Throwable thrownException()
public boolean isFailure()
public String toString()
toString
in class Object
Object.toString()
public void printTrace()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |