org.fest.assertions
Class BigDecimalAssert

java.lang.Object
  extended by org.fest.assertions.Assert
      extended by org.fest.assertions.GenericAssert<S,T>
          extended by org.fest.assertions.ComparableAssert<BigDecimalAssert,BigDecimal>
              extended by org.fest.assertions.BigDecimalAssert
All Implemented Interfaces:
NumberAssert

public class BigDecimalAssert
extends ComparableAssert<BigDecimalAssert,BigDecimal>
implements NumberAssert

Assertions for BigDecimals.

To create a new instance of this class invoke Assertions.assertThat(BigDecimal).

Author:
David DIDIER, Ted M. Young, Yvonne Wang, Alex Ruiz

Field Summary
 
Fields inherited from class org.fest.assertions.GenericAssert
actual, myself
 
Constructor Summary
protected BigDecimalAssert(BigDecimal actual)
          Creates a new BigDecimalAssert.
 
Method Summary
 BigDecimalAssert isNegative()
          Verifies that the actual BigDecimal is negative.
 BigDecimalAssert isNotZero()
          Verifies that the actual BigDecimal is not equal to zero, regardless of precision.
 BigDecimalAssert isPositive()
          Verifies that the actual BigDecimal is positive.
 BigDecimalAssert isZero()
          Verifies that the actual BigDecimal is equal to zero, regardless of precision.
 
Methods inherited from class org.fest.assertions.ComparableAssert
isEqualByComparingTo, isGreaterThan, isGreaterThanOrEqualTo, isLessThan, isLessThanOrEqualTo, isNotEqualByComparingTo
 
Methods inherited from class org.fest.assertions.GenericAssert
as, as, describedAs, describedAs, doesNotSatisfy, is, isEqualTo, isIn, isIn, isNot, isNotEqualTo, isNotIn, isNotIn, isNotNull, isNotSameAs, isNull, isSameAs, overridingErrorMessage, satisfies
 
Methods inherited from class org.fest.assertions.Assert
customErrorMessage, description, description, description, equals, fail, fail, failIfCustomMessageIsSet, failIfCustomMessageIsSet, failure, formattedErrorMessage, hashCode, rawDescription, replaceDefaultErrorMessagesWith
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BigDecimalAssert

protected BigDecimalAssert(BigDecimal actual)
Creates a new BigDecimalAssert.

Parameters:
actual - the target to verify.
Method Detail

isPositive

public BigDecimalAssert isPositive()
Verifies that the actual BigDecimal is positive.

Specified by:
isPositive in interface NumberAssert
Returns:
this assertion object.
Throws:
AssertionError - if the actual BigDecimal value is null.
AssertionError - if the actual BigDecimal value is not positive.

isNegative

public BigDecimalAssert isNegative()
Verifies that the actual BigDecimal is negative.

Specified by:
isNegative in interface NumberAssert
Returns:
this assertion object.
Throws:
AssertionError - if the actual BigDecimal value is null.
AssertionError - if the actual BigDecimal value is not negative.

isZero

public BigDecimalAssert isZero()
Verifies that the actual BigDecimal is equal to zero, regardless of precision. Essentially, this is the same as isEqualByComparingTo(BigDecimal.ZERO).

Specified by:
isZero in interface NumberAssert
Returns:
this assertion object.
Throws:
AssertionError - if the actual BigDecimal value is null.
AssertionError - if the actual BigDecimal value is not equal to zero.

isNotZero

public BigDecimalAssert isNotZero()
Verifies that the actual BigDecimal is not equal to zero, regardless of precision. Essentially, this is the same as isNotEqualByComparingTo(BigDecimal.ZERO).

Returns:
this assertion object.
Throws:
AssertionError - if the actual BigDecimal is null.
AssertionError - if the actual BigDecimal is equal to zero.


Copyright © 2007-2011 FEST (Fixtures for Easy Software Testing). All Rights Reserved.