|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fest.assertions.api.AbstractAssert<S,A>
org.fest.assertions.api.AbstractComparableAssert<S,A>
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.public abstract class AbstractComparableAssert<S extends AbstractComparableAssert<S,A>,A extends Comparable<? super A>>
Base class for all implementations of .
ComparableAssert
| Field Summary |
|---|
| Fields inherited from class org.fest.assertions.api.AbstractAssert |
|---|
actual, myself |
| Constructor Summary | |
|---|---|
protected |
AbstractComparableAssert(A actual,
Class<?> selfType)
|
| 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. |
S |
usingComparator(Comparator<? super A> customComparator)
Use given custom comparator instead of relying on actual type A equals method for incoming assertion checks. |
S |
usingDefaultComparator()
Revert to standard comparison for incoming assertion checks. |
| Methods inherited from class org.fest.assertions.api.AbstractAssert |
|---|
as, as, describedAs, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, equals, has, hashCode, hasSameClassAs, is, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, overridingErrorMessage |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractComparableAssert(A actual,
Class<?> selfType)
| Method Detail |
|---|
public S isLessThan(A other)
isLessThan in interface ComparableAssert<S extends AbstractComparableAssert<S,A>,A extends Comparable<? super A>>other - the given value to compare the actual value to.
this assertion object.public S isLessThanOrEqualTo(A other)
isLessThanOrEqualTo in interface ComparableAssert<S extends AbstractComparableAssert<S,A>,A extends Comparable<? super A>>other - the given value to compare the actual value to.
this assertion object.public S isGreaterThan(A other)
isGreaterThan in interface ComparableAssert<S extends AbstractComparableAssert<S,A>,A extends Comparable<? super A>>other - the given value to compare the actual value to.
this assertion object.public S isGreaterThanOrEqualTo(A other)
isGreaterThanOrEqualTo in interface ComparableAssert<S extends AbstractComparableAssert<S,A>,A extends Comparable<? super A>>other - the given value to compare the actual value to.
this assertion object.public S usingComparator(Comparator<? super A> customComparator)
AbstractAssertCustom comparator is bound to assertion instance, meaning that if a new assertion is created, it will use default comparison strategy.
Examples :
// frodo and sam are instances of Character with Hobbit race (obviously :). // raceComparator implements Comparator<Character> assertThat(frodo).usingComparator(raceComparator).isEqualTo(sam);
usingComparator in interface Assert<S extends AbstractComparableAssert<S,A>,A extends Comparable<? super A>>usingComparator in class AbstractAssert<S extends AbstractComparableAssert<S,A>,A extends Comparable<? super A>>customComparator - the comparator to use for incoming assertion checks.
this assertion object.public S usingDefaultComparator()
AbstractAssert
This method should be used to disable a custom comparison strategy set by calling Assert.usingComparator(Comparator).
usingDefaultComparator in interface Assert<S extends AbstractComparableAssert<S,A>,A extends Comparable<? super A>>usingDefaultComparator in class AbstractAssert<S extends AbstractComparableAssert<S,A>,A extends Comparable<? super A>>this assertion object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||