|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Error java.lang.AssertionError junit.framework.AssertionFailedError junit.framework.ComparisonFailure
public class ComparisonFailure
Thrown when an assert equals for Strings failed. Inspired by a patch from Alex Chaffee mailto:alex@purpletech.com
Constructor Summary | |
---|---|
ComparisonFailure(String message,
String expected,
String actual)
Constructs a comparison failure. |
Method Summary | |
---|---|
String |
getActual()
Gets the actual string value |
String |
getExpected()
Gets the expected string value |
String |
getMessage()
Returns "..." in place of common prefix and "..." in place of common suffix between expected and actual. |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ComparisonFailure(String message, String expected, String actual)
message
- the identifying message or nullexpected
- the expected string valueactual
- the actual string valueMethod Detail |
---|
public String getMessage()
getMessage
in class Throwable
Throwable.getMessage()
public String getActual()
public String getExpected()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |