Save This Page
Home » GWT-2009.11.30 » junit » framework » [javadoc | source]
junit.framework
public class: ComparisonFailure [javadoc | source]
java.lang.Object
   java.lang.Throwable
      java.lang.Error
         junit.framework.AssertionFailedError
            junit.framework.ComparisonFailure

All Implemented Interfaces:
    Serializable

Thrown when an assert equals for Strings failed. Inspired by a patch from Alex Chaffee mailto:alex@purpletech.com
Fields inherited from java.lang.Error:
serialVersionUID
Constructor:
 public ComparisonFailure(String message,
    String expected,
    String actual) 
    Constructs a comparison failure.
    Parameters:
    message - the identifying message or null
    expected - the expected string value
    actual - the actual string value
Method from junit.framework.ComparisonFailure Summary:
getActual,   getExpected,   getMessage
Methods from java.lang.Throwable:
fillInStackTrace,   getCause,   getLocalizedMessage,   getMessage,   getStackTrace,   initCause,   printStackTrace,   printStackTrace,   printStackTrace,   setStackTrace,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from junit.framework.ComparisonFailure Detail:
 public String getActual() 
    Gets the actual string value
 public String getExpected() 
    Gets the expected string value
 public String getMessage() 
    Returns "..." in place of common prefix and "..." in place of common suffix between expected and actual.