S
- used to simulate "self types." For more information please read "Emulating 'self types' using Java Generics to simplify fluent API implementation."T
- the type of the "actual" value.public abstract class ComparableAssert<S,T extends Comparable<T>> extends GenericAssert<S,T>
Comparable
s.actual, myself
Modifier | Constructor and Description |
---|---|
protected |
ComparableAssert(Class<S> selfType,
T actual)
Creates a new
ComparableAssert . |
Modifier and Type | Method and Description |
---|---|
S |
isEqualByComparingTo(T expected)
Verifies that the actual
is equal to the given one. |
S |
isGreaterThan(T other)
Verifies that the actual
is greater than the given one. |
S |
isGreaterThanOrEqualTo(T other)
Verifies that the actual
is greater than or equal to the given one. |
S |
isLessThan(T other)
Verifies that the actual
is less than the given one. |
S |
isLessThanOrEqualTo(T other)
Verifies that the actual
is less than or equal to the given one. |
S |
isNotEqualByComparingTo(T expected)
Verifies that the actual
is not equal to the given one. |
as, as, describedAs, describedAs, doesNotSatisfy, is, isEqualTo, isIn, isIn, isNot, isNotEqualTo, isNotIn, isNotIn, isNotNull, isNotSameAs, isNull, isSameAs, overridingErrorMessage, satisfies
customErrorMessage, description, description, description, equals, fail, fail, failIfCustomMessageIsSet, failIfCustomMessageIsSet, failure, formattedErrorMessage, hashCode, rawDescription, replaceDefaultErrorMessagesWith
protected ComparableAssert(Class<S> selfType, T actual)
ComparableAssert
.selfType
- the "self type."actual
- the target to verify.public final S isEqualByComparingTo(T expected)
Comparable
is equal to the given one.expected
- the given Comparable
to compare the actual Comparable
to.AssertionError
- if the actual Comparable
is null
.AssertionError
- if the actual Comparable
is not equal to the given one.public final S isNotEqualByComparingTo(T expected)
Comparable
is not equal to the given one.expected
- the given Comparable
to use to compare to the actual Comparable
.AssertionError
- if the actual Comparable
is null
.AssertionError
- if the actual Comparable
is equal to the given one.public final S isLessThan(T other)
Comparable
is less than the given one.other
- the given value.AssertionError
- if the actual Comparable
is null
.AssertionError
- if the actual Comparable
is not less than the given one.public final S isGreaterThan(T other)
Comparable
is greater than the given one.other
- the given value.AssertionError
- if the actual Comparable
is null
.AssertionError
- if the actual Comparable
is not greater than the given one.public final S isLessThanOrEqualTo(T other)
Comparable
is less than or equal to the given one.other
- the given value.AssertionError
- if the actual Comparable
is null
.AssertionError
- if the actual Comparable
is not less than or equal to the given one.public final S isGreaterThanOrEqualTo(T other)
Comparable
is greater than or equal to the given one.other
- the given value.AssertionError
- if the actual Comparable
is null
.AssertionError
- if the actual Comparable
is not greater than or equal to the given one.Copyright © 2007-2012 FEST (Fixtures for Easy Software Testing). All Rights Reserved.