public final class DoubleSubject extends ComparableSubject<Double>
Wrapper over DoubleSubject.

Since:
1.0
Author:
Iulian Andrei (iulian.andrei@qaitsolutions.com)
  • Constructor Details

    • DoubleSubject

      public DoubleSubject(Double actual, String message)
      Constructor for regular assertions.

      Parameters:
      actual - Current value to be verified.
      message - Description of the assertion.
    • DoubleSubject

      public DoubleSubject(Double actual, String message, ErrorTracker tracker)
      Constructor for soft assertions.

      Parameters:
      actual - Current value to be verified.
      message - Description of the assertion.
      tracker - Entity which allows keeping track of existing errors.
  • Method Details

    • isEqualTo

      public void isEqualTo(@Nullable Object other)
      Description copied from class: Subject
      Fails if the subject is not equal to the given object. Wrapper over Subject.isEqualTo(Object).

      Overrides:
      isEqualTo in class Subject
      Parameters:
      other - Value to be checked against.
    • isNotEqualTo

      public void isNotEqualTo(@Nullable Object other)
      Description copied from class: Subject
      Fails if the subject is equal to the given object. The meaning of equality is the same as for the Subject.isEqualTo(java.lang.Object) method. Wrapper over Subject.isNotEqualTo(Object).

      Overrides:
      isNotEqualTo in class Subject
      Parameters:
      other - Value to be checked against.
    • isZero

      public void isZero()
      Asserts that the subject is zero. Wrapper over DoubleSubject.isZero().
    • isNonZero

      public void isNonZero()
      Asserts that the subject is a non-null value other than zero. Wrapper over DoubleSubject.isNonZero().
    • isPositiveInfinity

      public void isPositiveInfinity()
      Asserts that the subject is Double.POSITIVE_INFINITY. Wrapper over DoubleSubject.isPositiveInfinity().
    • isNegativeInfinity

      public void isNegativeInfinity()
      Asserts that the subject is Double.NEGATIVE_INFINITY. Wrapper over DoubleSubject.isNegativeInfinity().
    • isNaN

      public void isNaN()
      Asserts that the subject is Double.NaN. Wrapper over DoubleSubject.isNaN().
    • isFinite

      public void isFinite()
      Asserts that the subject is finite. Wrapper over DoubleSubject.isFinite().
    • isNotNaN

      public void isNotNaN()
      Asserts that the subject is a non-null value other than Double.NaN. Wrapper over DoubleSubject.isNotNaN().
    • isGreaterThan

      public void isGreaterThan(int other)
      Checks that the subject is greater than other. Wrapper over DoubleSubject.isGreaterThan(int).

      Parameters:
      other - Value to be verified against.
    • isLessThan

      public void isLessThan(int other)
      Checks that the subject is less than other. Wrapper over DoubleSubject.isLessThan(int).

      Parameters:
      other - Value to be verified against.
    • isAtMost

      public void isAtMost(int other)
      Checks that the subject is less than or equal to other. Wrapper over DoubleSubject.isAtMost(int).

      Parameters:
      other - Value to be verified against.
    • isAtLeast

      public void isAtLeast(int other)
      Checks that the subject is greater than or equal to other. Wrapper over DoubleSubject.isAtLeast(int).

      Parameters:
      other - Value to be verified against.