public final class DoubleSubject extends ComparableSubject<DoubleSubject,Double>
Double
subjects.Modifier and Type | Class and Description |
---|---|
class |
DoubleSubject.TolerantDoubleComparison
A partially specified proposition about an approximate relationship to a
double
subject using a tolerance. |
failureStrategy
Modifier and Type | Method and Description |
---|---|
void |
isEqualTo(Double other)
Deprecated.
Use
isWithin(double) instead. Double comparison should always have a tolerance. |
void |
isEquivalentAccordingToCompareTo(Double other)
Deprecated.
Use
isWithin(double) instead. Double comparison should always have a tolerance. |
void |
isNotEqualTo(Double other)
Deprecated.
Use
isNotWithin(double) instead. Double comparison should always have a tolerance. |
DoubleSubject.TolerantDoubleComparison |
isNotWithin(double tolerance)
Prepares for a check that the subject is not within the given tolerance of an expected value
that will be provided in the next call in the fluent chain.
|
DoubleSubject.TolerantDoubleComparison |
isWithin(double tolerance)
Prepares for a check that the subject is within the given tolerance of an expected value
that will be provided in the next call in the fluent chain.
|
comparesEqualTo, isAtLeast, isAtMost, isGreaterThan, isIn, isLessThan, isNotIn
check, equals, fail, fail, fail, failWithBadResults, failWithCustomSubject, failWithoutSubject, failWithRawMessage, getDisplaySubject, getSubject, hashCode, internalCustomName, isAnyOf, isEqualTo, isIn, isInstanceOf, isNoneOf, isNotEqualTo, isNotIn, isNotInstanceOf, isNotNull, isNotSameAs, isNull, isSameAs, named
@CheckReturnValue public DoubleSubject.TolerantDoubleComparison isWithin(double tolerance)
@CheckReturnValue public DoubleSubject.TolerantDoubleComparison isNotWithin(double tolerance)
@Deprecated public final void isEqualTo(@Nullable Double other)
isWithin(double)
instead. Double comparison should always have a tolerance.@Deprecated public final void isNotEqualTo(@Nullable Double other)
isNotWithin(double)
instead. Double comparison should always have a tolerance.@Deprecated public final void isEquivalentAccordingToCompareTo(Double other)
isWithin(double)
instead. Double comparison should always have a tolerance.ComparableSubject
Comparable.compareTo(T)
, (i.e., fails if a.comparesTo(b) != 0
).
Note: Do not use this method for checking object equality. Instead, use
Subject.isEqualTo(Object)
.
isEquivalentAccordingToCompareTo
in class ComparableSubject<DoubleSubject,Double>
Copyright © 2015. All rights reserved.