Interface FloatingPointNumberAssert<T extends 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 Number> extends NumberAssert<T>
Assertion methods applicable to floating-point Numbers.
Author:
Alex Ruiz, Yvonne Wang
  • Method Details

    • 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:
      NullPointerException - if the given offset is null.
      NullPointerException - if the expected number is null.
      AssertionError - if the actual value is not equal to the given one.
    • isNaN

      Verifies that the actual value is equal to NaN.
      Returns:
      this assertion object.
      Throws:
      AssertionError - if the actual value is not equal to NaN.
    • isNotNaN

      Verifies that the actual value is not equal to NaN.
      Returns:
      this assertion object.
      Throws:
      AssertionError - if the actual value is equal to NaN.