org.junit.internal
Class ComparisonCriteria

java.lang.Object
  extended by org.junit.internal.ComparisonCriteria
Direct Known Subclasses:
ExactComparisonCriteria, InexactComparisonCriteria

public abstract class ComparisonCriteria
extends Object

Defines criteria for finding two items "equal enough". Concrete subclasses may demand exact equality, or, for example, equality within a given delta.


Constructor Summary
ComparisonCriteria()
           
 
Method Summary
 void arrayEquals(String message, Object expecteds, Object actuals)
          Asserts that two arrays are equal, according to the criteria defined by the concrete subclass.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComparisonCriteria

public ComparisonCriteria()
Method Detail

arrayEquals

public void arrayEquals(String message,
                        Object expecteds,
                        Object actuals)
                 throws ArrayComparisonFailure
Asserts that two arrays are equal, according to the criteria defined by the concrete subclass. If they are not, an AssertionError is thrown with the given message. If expecteds and actuals are null, they are considered equal.

Parameters:
message - the identifying message for the AssertionError ( null okay)
expecteds - Object array or array of arrays (multi-dimensional array) with expected values.
actuals - Object array or array of arrays (multi-dimensional array) with actual values
Throws:
ArrayComparisonFailure