org.fest.assertions.core
Interface NumberAssert<T extends Number>

Type Parameters:
T - the type of the "actual" value.
All Known Subinterfaces:
FloatingPointNumberAssert<T>
All Known Implementing Classes:
BigDecimalAssert, ByteAssert, DoubleAssert, FloatAssert, IntegerAssert, LongAssert, ShortAssert

public interface NumberAssert<T extends Number>

Assertion methods applicable to Numbers.

Author:
Alex Ruiz

Method Summary
 NumberAssert<T> isNegative()
          Verifies that the actual value is negative.
 NumberAssert<T> isNotZero()
          Verifies that the actual value is not equal to zero.
 NumberAssert<T> isPositive()
          Verifies that the actual value is positive.
 NumberAssert<T> isZero()
          Verifies that the actual value is equal to zero.
 

Method Detail

isZero

NumberAssert<T> isZero()
Verifies that the actual value is equal to zero.

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

isNotZero

NumberAssert<T> isNotZero()
Verifies that the actual value is not equal to zero.

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

isPositive

NumberAssert<T> isPositive()
Verifies that the actual value is positive.

Returns:
this assertion object.
Throws:
AssertionError - if the actual value is null.
AssertionError - if the actual value is not positive.

isNegative

NumberAssert<T> isNegative()
Verifies that the actual value is negative.

Returns:
this assertion object.
Throws:
AssertionError - if the actual value is null.
AssertionError - if the actual value is not negative.


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