Class DoubleSubject
java.lang.Object
com.qaitsolutions.pframe.core.assertion.subjects.Subject
com.qaitsolutions.pframe.core.assertion.subjects.ComparableSubject<Double>
com.qaitsolutions.pframe.core.assertion.subjects.DoubleSubject
Wrapper over
DoubleSubject
.
- Since:
- 1.0
- Author:
- Iulian Andrei (iulian.andrei@qaitsolutions.com)
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionDoubleSubject
(Double actual, String message) Constructor for regular assertions.DoubleSubject
(Double actual, String message, ErrorTracker tracker) Constructor for soft assertions. -
Method Summary
Modifier and TypeMethodDescriptionvoid
isAtLeast
(int other) Checks that the subject is greater than or equal toother
.void
isAtMost
(int other) Checks that the subject is less than or equal toother
.void
Fails if the subject is not equal to the given object.void
isFinite()
Asserts that the subject is finite.void
isGreaterThan
(int other) Checks that the subject is greater thanother
.void
isLessThan
(int other) Checks that the subject is less thanother
.void
isNaN()
Asserts that the subject isDouble.NaN
.void
Asserts that the subject isDouble.NEGATIVE_INFINITY
.void
Asserts that the subject is a non-null value other than zero.void
isNotEqualTo
(@Nullable Object other) Fails if the subject is equal to the given object.void
isNotNaN()
Asserts that the subject is a non-null value other thanDouble.NaN
.void
Asserts that the subject isDouble.POSITIVE_INFINITY
.void
isZero()
Asserts that the subject is zero.Methods inherited from class com.qaitsolutions.pframe.core.assertion.subjects.ComparableSubject
isAtLeast, isAtMost, isEquivalentAccordingToCompareTo, isGreaterThan, isIn, isLessThan, isNotIn
Methods inherited from class com.qaitsolutions.pframe.core.assertion.subjects.Subject
isAnyOf, isIn, isInstanceOf, isNoneOf, isNotIn, isNotInstanceOf, isNotNull, isNotSameInstanceAs, isNull, isSameInstanceAs
-
Constructor Details
-
DoubleSubject
Constructor for regular assertions.- Parameters:
actual
- Current value to be verified.message
- Description of the assertion.
-
DoubleSubject
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
Description copied from class:Subject
Fails if the subject is not equal to the given object. Wrapper overSubject.isEqualTo(Object)
. -
isNotEqualTo
Description copied from class:Subject
Fails if the subject is equal to the given object. The meaning of equality is the same as for theSubject.isEqualTo(java.lang.Object)
method. Wrapper overSubject.isNotEqualTo(Object)
.- Overrides:
isNotEqualTo
in classSubject
- Parameters:
other
- Value to be checked against.
-
isZero
public void isZero()Asserts that the subject is zero. Wrapper overDoubleSubject.isZero()
. -
isNonZero
public void isNonZero()Asserts that the subject is a non-null value other than zero. Wrapper overDoubleSubject.isNonZero()
. -
isPositiveInfinity
public void isPositiveInfinity()Asserts that the subject isDouble.POSITIVE_INFINITY
. Wrapper overDoubleSubject.isPositiveInfinity()
. -
isNegativeInfinity
public void isNegativeInfinity()Asserts that the subject isDouble.NEGATIVE_INFINITY
. Wrapper overDoubleSubject.isNegativeInfinity()
. -
isNaN
public void isNaN()Asserts that the subject isDouble.NaN
. Wrapper overDoubleSubject.isNaN()
. -
isFinite
public void isFinite()Asserts that the subject is finite. Wrapper overDoubleSubject.isFinite()
. -
isNotNaN
public void isNotNaN()Asserts that the subject is a non-null value other thanDouble.NaN
. Wrapper overDoubleSubject.isNotNaN()
. -
isGreaterThan
public void isGreaterThan(int other) Checks that the subject is greater thanother
. Wrapper overDoubleSubject.isGreaterThan(int)
.- Parameters:
other
- Value to be verified against.
-
isLessThan
public void isLessThan(int other) Checks that the subject is less thanother
. Wrapper overDoubleSubject.isLessThan(int)
.- Parameters:
other
- Value to be verified against.
-
isAtMost
public void isAtMost(int other) Checks that the subject is less than or equal toother
. Wrapper overDoubleSubject.isAtMost(int)
.- Parameters:
other
- Value to be verified against.
-
isAtLeast
public void isAtLeast(int other) Checks that the subject is greater than or equal toother
. Wrapper overDoubleSubject.isAtLeast(int)
.- Parameters:
other
- Value to be verified against.
-