|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.faktorips.runtime.test.IpsTestFailure
public class IpsTestFailure
| Constructor Summary | |
|---|---|
IpsTestFailure(IpsTestCaseBase test)
Creates a new test failure that was caused because an assertion has failed. |
|
IpsTestFailure(IpsTestCaseBase test,
Object expectedValue,
Object actualValue)
Creates a new test failure that was caused because the given actual value is not equal to the expected value. |
|
IpsTestFailure(IpsTestCaseBase test,
Object expectedValue,
Object actualValue,
String testObject,
String testedAttribute,
String message)
Creates a new test failure that was caused because the given actual value is not equal to the expected value. |
|
IpsTestFailure(IpsTestCaseBase test,
Throwable t)
Creates a new test error. |
|
| Method Summary | |
|---|---|
Object |
getActualValue()
Returns the actual value found after executing the business logic. |
Object |
getExpectedValue()
Returns the value that is expected to be the result of the business logic execution. |
String |
getMessage()
Returns the message of the test failure. |
IpsTestCaseBase |
getTestCase()
Returns the test case that has failed. |
String |
getTestedAttribute()
Returns the name of the attribute in the test object where the actual value is not the one expected. |
String |
getTestObject()
If this is a failed assertion failure then the method returns the path to the test object of the expected result that contains the expected value that is not equal to the actual value. |
Throwable |
getThrowable()
Returns the throwable object (any kind of exception or error which occurs during the test run). |
boolean |
isError()
Returns true if the test was aborted because a throwable was thrown. |
boolean |
isFailedAssertion()
Returns true if the test failed because an assertion failed. |
String |
toString()
Returns a string representation of the IPS test failure. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public IpsTestFailure(IpsTestCaseBase test,
Throwable t)
public IpsTestFailure(IpsTestCaseBase test,
Object expectedValue,
Object actualValue)
public IpsTestFailure(IpsTestCaseBase test,
Object expectedValue,
Object actualValue,
String testObject,
String testedAttribute,
String message)
public IpsTestFailure(IpsTestCaseBase test)
| Method Detail |
|---|
public IpsTestCaseBase getTestCase()
public String getTestObject()
Path format: TestParamName/TestParamName .. Example: Policy/Coverage
If this is an error the method returns null.
public String getTestedAttribute()
null.
public String getMessage()
null if the failure has no
message.
public boolean isError()
true if the test was aborted because a throwable was thrown.
public boolean isFailedAssertion()
true if the test failed because an assertion failed.
public Object getExpectedValue()
public Object getActualValue()
public Throwable getThrowable()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||