junit.framework
Class ComparisonFailure
java.lang.Object
java.lang.Throwable
java.lang.Error
junit.framework.AssertionFailedError
junit.framework.ComparisonFailure
- All Implemented Interfaces:
- Serializable
- public class ComparisonFailure
- extends AssertionFailedError
Thrown when an assert equals for Strings failed.
Inspired by a patch from Alex Chaffee mailto:alex@purpletech.com
- See Also:
- Serialized Form
Method Summary |
String |
getMessage()
Returns "..." in place of common prefix and "..." in
place of common suffix between expected and actual. |
ComparisonFailure
public ComparisonFailure(String message,
String expected,
String actual)
- Constructs a comparison failure.
- Parameters:
message
- the identifying message or nullexpected
- the expected string valueactual
- the actual string value
getMessage
public String getMessage()
- Returns "..." in place of common prefix and "..." in
place of common suffix between expected and actual.
- See Also:
Throwable.getMessage()