org.fest.assertions.core
Interface ComparableAssert<S,A extends Comparable<A>>

Type Parameters:
S - the "self" type of this assertion class. Please read "Emulating 'self types' using Java Generics to simplify fluent API implementation" for more details.
A - the type of the "actual" value.
All Known Subinterfaces:
UnevenComparableAssert<S,T>
All Known Implementing Classes:
AbstractComparableAssert, AbstractUnevenComparableAssert, BigDecimalAssert, ByteAssert, CharacterAssert, DoubleAssert, FloatAssert, IntegerAssert, LongAssert, ShortAssert

public interface ComparableAssert<S,A extends Comparable<A>>

Assertion methods applicable to Comparables.

Author:
Alex Ruiz, Ted M. Young

Method Summary
 S isGreaterThan(A other)
          Verifies that the actual value is greater than the given one.
 S isGreaterThanOrEqualTo(A other)
          Verifies that the actual value is greater than or equal to the given one.
 S isLessThan(A other)
          Verifies that the actual value is less than the given one.
 S isLessThanOrEqualTo(A other)
          Verifies that the actual value is less than or equal to the given one.
 

Method Detail

isLessThan

S isLessThan(A other)
Verifies that the actual value is less than the given one.

Parameters:
other - the given value to compare the actual value to.
Returns:
this assertion object.
Throws:
AssertionError - if the actual value is null.
AssertionError - if the actual value is equal to or greater than the given one.

isLessThanOrEqualTo

S isLessThanOrEqualTo(A other)
Verifies that the actual value is less than or equal to the given one.

Parameters:
other - the given value to compare the actual value to.
Returns:
this assertion object.
Throws:
AssertionError - if the actual value is null.
AssertionError - if the actual value is greater than the given one.

isGreaterThan

S isGreaterThan(A other)
Verifies that the actual value is greater than the given one.

Parameters:
other - the given value to compare the actual value to.
Returns:
this assertion object.
Throws:
AssertionError - if the actual value is null.
AssertionError - if the actual value is equal to or less than the given one.

isGreaterThanOrEqualTo

S isGreaterThanOrEqualTo(A other)
Verifies that the actual value is greater than or equal to the given one.

Parameters:
other - the given value to compare the actual value to.
Returns:
this assertion object.
Throws:
AssertionError - if the actual value is null.
AssertionError - if the actual value is less than the given one.


Copyright © 2007-2012 FEST (Fixtures for Easy Software Testing). All Rights Reserved.