org.junit.internal
Class ArrayComparisonFailure
java.lang.Object
java.lang.Throwable
java.lang.Error
java.lang.AssertionError
org.junit.internal.ArrayComparisonFailure
- All Implemented Interfaces:
- java.io.Serializable
public class ArrayComparisonFailure
- extends java.lang.AssertionError
Thrown when two array elements differ
- See Also:
Assert.assertArrayEquals(String, Object[], Object[])
,
Serialized Form
Constructor Summary |
ArrayComparisonFailure(java.lang.String message,
java.lang.AssertionError cause,
int index)
Construct a new ArrayComparisonFailure with an error text and the array's
dimension that was not equal |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ArrayComparisonFailure
public ArrayComparisonFailure(java.lang.String message,
java.lang.AssertionError cause,
int index)
- Construct a new
ArrayComparisonFailure
with an error text and the array's
dimension that was not equal
- Parameters:
cause
- the exception that caused the array's content to fail the assertion testindex
- the array position of the objects that are not equal.- See Also:
Assert.assertArrayEquals(String, Object[], Object[])
addDimension
public void addDimension(int index)
getMessage
public java.lang.String getMessage()
- Overrides:
getMessage
in class java.lang.Throwable
toString
public java.lang.String toString()
-
- Overrides:
toString
in class java.lang.Throwable