org.assertj.core.api
Interface UnevenComparableAssert<S extends UnevenComparableAssert<S,T>,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:
AbstractBigDecimalAssert, AbstractUnevenComparableAssert, BigDecimalAssert

public interface UnevenComparableAssert<S extends UnevenComparableAssert<S,T>,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, Mikhail Mazursky

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.assertj.core.api.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 © 2013–2015 AssertJ. All rights reserved.