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, Nicolas François
  • Method Details

    • 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.
    • isNotNegative

      NumberAssert<T> isNotNegative()
      Verifies that the actual value is non negative (positive or equal zero).
      Returns:
      this assertion object.
      Throws:
      AssertionError - if the actual value is null.
      AssertionError - if the actual value is not non negative.
    • isNotPositive

      NumberAssert<T> isNotPositive()
      Verifies that the actual value is non positive (negative or equal zero).
      Returns:
      this assertion object.
      Throws:
      AssertionError - if the actual value is null.
      AssertionError - if the actual value is not non positive.