Package 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
Comparable
s whose implementation of compareTo
is not consistent
with their implementation of equals
(e.g. BigDecimal
.)- Author:
- Alex Ruiz
-
Method Summary
Modifier and TypeMethodDescriptionisEqualByComparingTo
(T expected) Verifies that the actual value is equal to the given one by invoking
.Comparable.compareTo(Object)
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 Details
-
isEqualByComparingTo
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 isnull
.AssertionError
- if the actual value is not equal to the given one.
-
isNotEqualByComparingTo
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 isnull
.AssertionError
- if the actual value is equal to the given one.
-