Class BigDecimalSubject
java.lang.Object
com.qaitsolutions.pframe.core.assertion.subjects.Subject
com.qaitsolutions.pframe.core.assertion.subjects.ComparableSubject<BigDecimal>
com.qaitsolutions.pframe.core.assertion.subjects.BigDecimalSubject
Wrapper over
BigDecimalSubject
.
- Since:
- 1.0
- Author:
- Iulian Andrei (iulian.andrei@qaitsolutions.com)
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionBigDecimalSubject
(BigDecimal actual, String message) Constructor for regular assertions.BigDecimalSubject
(BigDecimal actual, String message, ErrorTracker tracker) Constructor for soft assertions. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Fails if the subject is not equal to the given object.void
isEqualToIgnoringScale
(long expected) Fails if the subject's value is not equal to the value of the BigDecimal created from the expected long.void
isEqualToIgnoringScale
(String expected) Fails if the subject's value is not equal to the value of the BigDecimal created from the expected string.void
isEqualToIgnoringScale
(BigDecimal expected) Fails if the subject's value is not equal to the value of the given BigDecimal.void
isEquivalentAccordingToCompareTo
(BigDecimal expected) Checks that the subject is equivalent toother
according toComparable.compareTo(T)
.Methods inherited from class com.qaitsolutions.pframe.core.assertion.subjects.ComparableSubject
isAtLeast, isAtMost, isGreaterThan, isIn, isLessThan, isNotIn
Methods inherited from class com.qaitsolutions.pframe.core.assertion.subjects.Subject
isAnyOf, isIn, isInstanceOf, isNoneOf, isNotEqualTo, isNotIn, isNotInstanceOf, isNotNull, isNotSameInstanceAs, isNull, isSameInstanceAs
-
Constructor Details
-
BigDecimalSubject
Constructor for regular assertions.- Parameters:
actual
- Current value to be verified.message
- Description of the assertion.
-
BigDecimalSubject
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
-
isEqualToIgnoringScale
Fails if the subject's value is not equal to the value of the given BigDecimal. Wrapper overBigDecimalSubject.isEqualToIgnoringScale(BigDecimal)
.- Parameters:
expected
- Value to be verified against.
-
isEqualToIgnoringScale
Fails if the subject's value is not equal to the value of the BigDecimal created from the expected string. Wrapper overBigDecimalSubject.isEqualToIgnoringScale(String)
.- Parameters:
expected
- Value to be verified against.
-
isEqualToIgnoringScale
public void isEqualToIgnoringScale(long expected) Fails if the subject's value is not equal to the value of the BigDecimal created from the expected long. Wrapper overBigDecimalSubject.isEqualToIgnoringScale(long)
)}.- Parameters:
expected
- Value to be verified against.
-
isEqualTo
Description copied from class:Subject
Fails if the subject is not equal to the given object. Wrapper overSubject.isEqualTo(Object)
. -
isEquivalentAccordingToCompareTo
Description copied from class:ComparableSubject
Checks that the subject is equivalent toother
according toComparable.compareTo(T)
. Wrapper overComparableSubject.isEquivalentAccordingToCompareTo(Comparable)
.- Overrides:
isEquivalentAccordingToCompareTo
in classComparableSubject<BigDecimal>
- Parameters:
expected
- Value to be verified against.
-