org.apache.maven.surefire.battery.assertion
Class BatteryComparisonFailure

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Error
          extended byorg.apache.maven.surefire.battery.assertion.BatteryAssertionFailedError
              extended byorg.apache.maven.surefire.battery.assertion.BatteryComparisonFailure
All Implemented Interfaces:
java.io.Serializable

public class BatteryComparisonFailure
extends BatteryAssertionFailedError

Thrown when an assertion equals for Strings failed. Inspired by a patch from Alex Chaffee mailto:alex@purpletech.com

See Also:
Serialized Form

Constructor Summary
BatteryComparisonFailure(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
 

Constructor Detail

BatteryComparisonFailure

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

Parameters:
message - the identifying message or null
expected - the expected string value
actual - the actual string value
Method Detail

getMessage

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

See Also:
Throwable.getMessage()


Copyright © 2004-2006 Apache. All Rights Reserved.