java.lang.Object | ||||
↳ | java.lang.Throwable | |||
↳ | java.lang.Error | |||
↳ | java.lang.AssertionError | |||
↳ | org.junit.ComparisonFailure |
Thrown when an assertEquals(String, String)
fails. Create and throw
a ComparisonFailure
manually if you want to show users the difference between two complex
strings.
Inspired by a patch from Alex Chaffee (alex@purpletech.com)
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a comparison failure.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the actual string value
| |||||||||||
Returns the expected string value
| |||||||||||
Returns "..." in place of common prefix and "..." in
place of common suffix between expected and actual.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Throwable
| |||||||||||
From class
java.lang.Object
|
Constructs a comparison failure.
message | the identifying message or null |
---|---|
expected | the expected string value |
actual | the actual string value |
Returns "..." in place of common prefix and "..." in place of common suffix between expected and actual.