public
class
ComparisonFailure
extends AssertionFailedError
java.lang.Object | |||||
↳ | java.lang.Throwable | ||||
↳ | java.lang.Error | ||||
↳ | java.lang.AssertionError | ||||
↳ | junit.framework.AssertionFailedError | ||||
↳ | junit.framework.ComparisonFailure |
Thrown when an assert equals for Strings failed. Inspired by a patch from Alex Chaffee mailto:alex@purpletech.com
Public constructors | |
---|---|
ComparisonFailure(String message, String expected, String actual)
Constructs a comparison failure. |
Public methods | |
---|---|
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. |
Inherited methods | |
---|---|
From
class
java.lang.Throwable
| |
From
class
java.lang.Object
|
ComparisonFailure (String message, String expected, String actual)
Constructs a comparison failure.
Parameters | |
---|---|
message |
String :
the identifying message or null |
expected |
String :
the expected string value |
actual |
String :
the actual string value
|
String getActual ()
Gets the actual string value
Returns | |
---|---|
String |
the actual string value |
String getExpected ()
Gets the expected string value
Returns | |
---|---|
String |
the expected string value |
String getMessage ()
Returns "..." in place of common prefix and "..." in place of common suffix between expected and actual.
Returns | |
---|---|
String |
the detail message string of this Throwable instance
(which may be null ).
|
See also: