org.fest.assertions.core
Interface UnevenComparableAssert<S,T extends Comparable<? super T>>

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.
T - the type of the "actual" value.
All Superinterfaces:
ComparableAssert<S,T>
All Known Implementing Classes:
AbstractUnevenComparableAssert, BigDecimalAssert

public interface UnevenComparableAssert<S,T extends Comparable<? super T>>
extends ComparableAssert<S,T>

Assertion methods applicable to Comparables whose implementation of compareTo is not consistent with their implementation of equals (e.g. BigDecimal.)

Author:
Alex Ruiz

Method Summary
 S isEqualByComparingTo(T expected)
          Verifies that the actual value is equal to the given one by invoking Comparable.compareTo(Object).
 S isNotEqualByComparingTo(T other)
          Verifies that the actual value is not equal to the given one by invoking Comparable.compareTo(Object).
 
Methods inherited from interface org.fest.assertions.core.ComparableAssert
isGreaterThan, isGreaterThanOrEqualTo, isLessThan, isLessThanOrEqualTo
 

Method Detail

isEqualByComparingTo

S isEqualByComparingTo(T expected)
Verifies that the actual value is equal to the given one by invoking Comparable.compareTo(Object).

Parameters:
expected - 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 not equal to the given one.

isNotEqualByComparingTo

S isNotEqualByComparingTo(T other)
Verifies that the actual value is not equal to the given one by invoking Comparable.compareTo(Object).

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 the given one.


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