org.infinitest.toolkit
Class ComparabilityTestSupport<T extends Comparable<T>>

java.lang.Object
  extended by org.infinitest.toolkit.ComparabilityTestSupport<T>
Type Parameters:
T - the type of the comparable objects

public abstract class ComparabilityTestSupport<T extends Comparable<T>>
extends Object

Support structure for testing a class's compliance with the Comparable interface.

less(), equal(), and greater() should return objects that are of the same class.

Author:
Paul Holser

Constructor Summary
ComparabilityTestSupport()
           
 
Method Summary
 void comparisonShouldGiveCorrectRelativeValue()
           
 void initializeHarness()
           
 void reverseOfComparisonShouldGiveResultOfOppositeSign()
           
 void twoObjectsWhichCompareLikeToAnotherObjectShouldGiveResultOfSameSign()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComparabilityTestSupport

public ComparabilityTestSupport()
Method Detail

initializeHarness

public final void initializeHarness()
                             throws Exception
Throws:
Exception

reverseOfComparisonShouldGiveResultOfOppositeSign

public final void reverseOfComparisonShouldGiveResultOfOppositeSign()

twoObjectsWhichCompareLikeToAnotherObjectShouldGiveResultOfSameSign

public final void twoObjectsWhichCompareLikeToAnotherObjectShouldGiveResultOfSameSign()

comparisonShouldGiveCorrectRelativeValue

public final void comparisonShouldGiveCorrectRelativeValue()


© Copyright 2009 Paul R. Holser, Jr. All rights reserved. pholser@alumni.rice.edu