S - the "self" type of this assertion class. Please read "Emulating 'self types' using Java Generics to simplify fluent API implementation"
for more details.public abstract class AbstractBigDecimalAssert<S extends AbstractBigDecimalAssert<S>> extends AbstractUnevenComparableAssert<S,BigDecimal> implements NumberAssert<S,BigDecimal>
BigDecimals.actual, info, myself| Modifier | Constructor and Description |
|---|---|
protected |
AbstractBigDecimalAssert(BigDecimal actual,
Class<?> selfType) |
| Modifier and Type | Method and Description |
|---|---|
S |
isBetween(BigDecimal start,
BigDecimal end)
Verifies that the actual value is in [start, end] range (start included, end included).
|
S |
isEqualByComparingTo(String expected)
Same as
isEqualByComparingTo(BigDecimal) but takes
care of converting given String to BigDecimal for you. |
S |
isEqualTo(String expected)
Same as
isEqualTo(BigDecimal) but takes care of converting given String to
BigDecimal for you. |
S |
isNegative()
Verifies that the actual value is negative.
|
S |
isNotNegative()
Verifies that the actual value is non negative (positive or equal zero).
|
S |
isNotPositive()
Verifies that the actual value is non positive (negative or equal zero).
|
S |
isNotZero()
Verifies that the actual value is not equal to zero.
|
S |
isPositive()
Verifies that the actual value is positive.
|
S |
isStrictlyBetween(BigDecimal start,
BigDecimal end)
Verifies that the actual value is in ]start, end[ range (start excluded, end excluded).
|
S |
isZero()
Verifies that the actual value is equal to zero.
|
S |
usingComparator(Comparator<? super BigDecimal> 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.
|
isEqualByComparingTo, isNotEqualByComparingToisGreaterThan, isGreaterThanOrEqualTo, isLessThan, isLessThanOrEqualToas, as, describedAs, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, equals, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, is, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, overridingErrorMessageclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitisGreaterThan, isGreaterThanOrEqualTo, isLessThan, isLessThanOrEqualToprotected AbstractBigDecimalAssert(BigDecimal actual, Class<?> selfType)
public S isZero()
isZero in interface NumberAssert<S extends AbstractBigDecimalAssert<S>,BigDecimal>public S isNotZero()
isNotZero in interface NumberAssert<S extends AbstractBigDecimalAssert<S>,BigDecimal>public S isPositive()
isPositive in interface NumberAssert<S extends AbstractBigDecimalAssert<S>,BigDecimal>public S isNegative()
isNegative in interface NumberAssert<S extends AbstractBigDecimalAssert<S>,BigDecimal>public S isNotPositive()
isNotPositive in interface NumberAssert<S extends AbstractBigDecimalAssert<S>,BigDecimal>this assertion object.public S isNotNegative()
isNotNegative in interface NumberAssert<S extends AbstractBigDecimalAssert<S>,BigDecimal>this assertion object.public S isBetween(BigDecimal start, BigDecimal end)
// these assertions succeed ... assertThat(12).isBetween(10, 14); assertThat(12).isBetween(12, 14); assertThat(12).isBetween(10, 12); // ... but these one fails assertThat(12).isBetween(14, 16);
isBetween in interface NumberAssert<S extends AbstractBigDecimalAssert<S>,BigDecimal>start - the start value (inclusive), expected not to be null.end - the end value (inclusive), expected not to be null.public S isStrictlyBetween(BigDecimal start, BigDecimal end)
// this assertion succeeds ... assertThat(12).isBetween(10, 14); // ... but these one fails assertThat(12).isBetween(12, 14); assertThat(12).isBetween(10, 12); assertThat(12).isBetween(16, 18);
isStrictlyBetween in interface NumberAssert<S extends AbstractBigDecimalAssert<S>,BigDecimal>start - the start value (exclusive), expected not to be null.end - the end value (exclusive), expected not to be null.public S isEqualTo(String expected)
isEqualTo(BigDecimal) but takes care of converting given String to
BigDecimal for you.public S isEqualByComparingTo(String expected)
isEqualByComparingTo(BigDecimal) but takes
care of converting given String to BigDecimal for you.public S usingComparator(Comparator<? super BigDecimal> 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 AbstractBigDecimalAssert<S>,BigDecimal>usingComparator in class AbstractComparableAssert<S extends AbstractBigDecimalAssert<S>,BigDecimal>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 AbstractBigDecimalAssert<S>,BigDecimal>usingDefaultComparator in class AbstractComparableAssert<S extends AbstractBigDecimalAssert<S>,BigDecimal>this assertion object.Copyright © 2013 AssertJ. All Rights Reserved.