November 2004
Intermediate to advanced
212 pages
5h 2m
English
ComparisonFailure
ComparisonFailure
(see Figure B-3) is a
specialized subclass of AssertionFailedError. It
is thrown only by the versions of assertEquals( )
that compare Strings.
![]() |
public class ComparisonFailure extends AssertionFailedError
ComparisonFailure(String message, String expected, String actual)
The constructor for ComparisonFailure.
String getMessage( )
Returns the failure description message. The redundant parts of the
compared Strings are replaced with
"...” so that
only the parts that differ are reported.
None.
private String fActual
private String fExpected
The private attributes containing copies of the strings being compared.
Read now
Unlock full access