Interface FloatingPointNumberAssert<T extends java.lang.Number>

  • Type Parameters:
    T - the type of the "actual" value.
    All Superinterfaces:
    NumberAssert<T>
    All Known Implementing Classes:
    DoubleAssert, FloatAssert

    public interface FloatingPointNumberAssert<T extends java.lang.Number>
    extends NumberAssert<T>
    Assertion methods applicable to floating-point Numbers.
    Author:
    Alex Ruiz, Yvonne Wang
    • Method Detail

      • isEqualTo

        FloatingPointNumberAssert<T> isEqualTo​(T expected,
                                               Offset<T> offset)
        Verifies that the actual value is equal to the given one, within a positive offset.
        Parameters:
        expected - the given value to compare the actual value to.
        offset - the given positive offset.
        Returns:
        this assertion object.
        Throws:
        java.lang.NullPointerException - if the given offset is null.
        java.lang.NullPointerException - if the expected number is null.
        java.lang.AssertionError - if the actual value is not equal to the given one.
      • isNaN

        FloatingPointNumberAssert<T> isNaN()
        Verifies that the actual value is equal to NaN.
        Returns:
        this assertion object.
        Throws:
        java.lang.AssertionError - if the actual value is not equal to NaN.
      • isNotNaN

        FloatingPointNumberAssert<T> isNotNaN()
        Verifies that the actual value is not equal to NaN.
        Returns:
        this assertion object.
        Throws:
        java.lang.AssertionError - if the actual value is equal to NaN.