Top Description Fields Constructors Methods
org.testng.internal.junit

public Class ArrayComparisonFailure

extends AssertionError
Class Inheritance
Imports
java.util.ArrayList, .List

Thrown when two array elements differ

Field Summary

Modifier and TypeField and Description
private final AssertionError
private final List<Integer>
private final String

Constructor Summary

AccessConstructor and Description
public
ArrayComparisonFailure(String
the message
message
,
AssertionError
the exception that caused the array's content to fail the assertion test
cause
,
int
the array position of the objects that are not equal.
index
)

Construct a new ArrayComparisonFailure with an error text and the array's dimension that was not equal

Method Summary

Modifier and TypeMethod and Description
public void
addDimension(int index)

public String
getMessage()

Overrides java.lang.Throwable.getMessage.

Returns the detail message string of this throwable.
public String
toString()

Overrides java.lang.Throwable.toString.

Returns a short description of this throwable.

Field Detail

fCauseback to summary
private final AssertionError fCause
fIndicesback to summary
private final List<Integer> fIndices
fMessageback to summary
private final String fMessage

Constructor Detail

ArrayComparisonFailureback to summary
public ArrayComparisonFailure(String message, AssertionError cause, int index)

Construct a new ArrayComparisonFailure with an error text and the array's dimension that was not equal

Parameters
message:String

the message

cause:AssertionError

the exception that caused the array's content to fail the assertion test

index:int

the array position of the objects that are not equal.

Method Detail

addDimensionback to summary
public void addDimension(int index)
getMessageback to summary
public String getMessage()

Overrides java.lang.Throwable.getMessage.

Doc from java.lang.Throwable.getMessage.

Returns the detail message string of this throwable.

Returns:String

the detail message string of this Throwable instance (which may be null).

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Throwable.toString.

Doc from java.lang.Throwable.toString.

Returns a short description of this throwable. The result is the concatenation of:

  • the name of the class of this object
  • ": " (a colon and a space)
  • the result of invoking this object's getLocalizedMessage method
If getLocalizedMessage returns null, then just the class name is returned.
Returns:String

a string representation of this throwable.

Annotations
@Override