ComparableAssert.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv Comparables |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public SELF | inBinary()
Overrides org. |
| public SELF | inHexadecimal()
Overrides org. |
| public SELF | isBetween(ACTUAL
the start value (inclusive), expected not to be null. startInclusive, ACTUAL the end value (inclusive), expected not to be null. endInclusive)Implements org. |
| public SELF | isEqualByComparingTo(ACTUAL
the given value to compare the actual value to. other)Implements org. .
|
| public SELF | isGreaterThan(ACTUAL
the given value to compare the actual value to. other)Implements org. |
| public SELF | isGreaterThanOrEqualTo(ACTUAL
the given value to compare the actual value to. other)Implements org. |
| public SELF | isLessThan(ACTUAL
the given value to compare the actual value to. other)Implements org. |
| public SELF | isLessThanOrEqualTo(ACTUAL
the given value to compare the actual value to. other)Implements org. |
| public SELF | isNotEqualByComparingTo(ACTUAL
the given value to compare the actual value to. other)Implements org. .
|
| public SELF | isStrictlyBetween(ACTUAL
the start value (exclusive), expected not to be null. startExclusive, ACTUAL the end value (exclusive), expected not to be null. endExclusive)Implements org. |
| public SELF | usingComparator(Comparator<? super ACTUAL>
the comparator to use for the incoming assertion checks. customComparator)Overrides org. Implements org. |
| public SELF | usingComparator(Comparator<? super ACTUAL>
the comparator to use for the incoming assertion checks. customComparator, String comparator description to be used in assertion error messages customComparatorDescription)Overrides org. Implements org. |
| public SELF | usingDefaultComparator()
Overrides org. Implements org. |
| comparables | back to summary |
|---|---|
| pack-priv Comparables comparables
| |
| AbstractComparableAssert | back to summary |
|---|---|
| protected AbstractComparableAssert(ACTUAL actual, Class<?> selfType) | |
| inBinary | back to summary |
|---|---|
| public SELF inBinary() Overrides org. Doc from org. Use binary object representation instead of standard representation in error messages. Example:
| |
| inHexadecimal | back to summary |
|---|---|
| public SELF inHexadecimal() Overrides org. Doc from org. Use hexadecimal object representation instead of standard representation in error messages. It can be useful when comparing UNICODE characters - many unicode chars have duplicate characters assigned, it is thus impossible to find differences from the standard error message: With standard message:
With Hexadecimal message:
| |
| isBetween | back to summary |
|---|---|
| public SELF isBetween(ACTUAL startInclusive, ACTUAL endInclusive) Implements org. Doc from org. Verifies that the actual value is in [start, end] range (start included, end included). Example:
| |
| isEqualByComparingTo | back to summary |
|---|---|
| public SELF isEqualByComparingTo(ACTUAL other) Implements org. Doc from org. Verifies that the actual value is equal to the given one by invoking
Example:
| |
| isGreaterThan | back to summary |
|---|---|
| public SELF isGreaterThan(ACTUAL other) Implements org. Doc from org. Verifies that the actual value is greater than the given one. Example:
| |
| isGreaterThanOrEqualTo | back to summary |
|---|---|
| public SELF isGreaterThanOrEqualTo(ACTUAL other) Implements org. Doc from org. Verifies that the actual value is greater than or equal to the given one. Example:
| |
| isLessThan | back to summary |
|---|---|
| public SELF isLessThan(ACTUAL other) Implements org. Doc from org. Verifies that the actual value is less than the given one. Example:
| |
| isLessThanOrEqualTo | back to summary |
|---|---|
| public SELF isLessThanOrEqualTo(ACTUAL other) Implements org. Doc from org. Verifies that the actual value is less than or equal to the given one. Example:
| |
| isNotEqualByComparingTo | back to summary |
|---|---|
| public SELF isNotEqualByComparingTo(ACTUAL other) Implements org. Doc from org. Verifies that the actual value is not equal to the given one by invoking
Example:
| |
| isStrictlyBetween | back to summary |
|---|---|
| public SELF isStrictlyBetween(ACTUAL startExclusive, ACTUAL endExclusive) Implements org. Doc from org. Verifies that the actual value is in ]start, end[ range (start excluded, end excluded). Example:
| |
| usingComparator | back to summary |
|---|---|
| public SELF usingComparator(Comparator<? super ACTUAL> customComparator) Overrides org. Implements org. Doc from org. Use the given custom comparator instead of relying on actual type A equals method for incoming assertion checks. The custom comparator is bound to assertion instance, meaning that if a new assertion instance is created, the default comparison strategy will be used. Examples :
| |
| usingComparator | back to summary |
|---|---|
| public SELF usingComparator(Comparator<? super ACTUAL> customComparator, String customComparatorDescription) Overrides org. Implements org. Doc from org. Use the given custom comparator instead of relying on actual type A equals method for incoming assertion checks. The custom comparator is bound to assertion instance, meaning that if a new assertion instance is created, the default comparison strategy will be used. Examples :
| |
| usingDefaultComparator | back to summary |
|---|---|
| public SELF usingDefaultComparator() Overrides org. Implements org. Doc from org. Revert to standard comparison for the incoming assertion checks.
This method should be used to disable a custom comparison strategy set by calling
| |