Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

junit.framework
Class ComparisonFailure  view ComparisonFailure download ComparisonFailure.java

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Error
          extended byjunit.framework.AssertionFailedError
              extended byjunit.framework.ComparisonFailure
All Implemented Interfaces:
java.io.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


Nested Class Summary
 
Nested classes inherited from class java.lang.Throwable
 
Field Summary
private  java.lang.String fActual
           
private  java.lang.String fExpected
           
 
Fields inherited from class java.lang.Error
 
Fields inherited from class java.lang.Throwable
 
Constructor Summary
ComparisonFailure(java.lang.String message, java.lang.String expected, java.lang.String actual)
          Constructs a comparison failure.
 
Method Summary
 java.lang.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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fExpected

private java.lang.String fExpected

fActual

private java.lang.String fActual
Constructor Detail

ComparisonFailure

public ComparisonFailure(java.lang.String message,
                         java.lang.String expected,
                         java.lang.String actual)
Constructs a comparison failure.

Method Detail

getMessage

public java.lang.String getMessage()
Returns "..." in place of common prefix and "..." in place of common suffix between expected and actual.