public final class OptionalDoubleSubject extends Subject
OptionalDouble subjects.| Modifier and Type | Method and Description | 
|---|---|
void | 
hasValue(double expected)
Fails if the  
OptionalDouble does not have the given value or the subject is null. | 
DoubleSubject | 
hasValueThat()
Deprecated. 
 
Instead of  
assertThat(optional).hasValueThat()...., use assertThat(optional.getAsDouble())..... | 
void | 
isEmpty()
Fails if the  
OptionalDouble is present or the subject is null. | 
void | 
isPresent()
Fails if the  
OptionalDouble is empty or the subject is null. | 
static Subject.Factory<OptionalDoubleSubject,OptionalDouble> | 
optionalDoubles()  | 
actualCustomStringRepresentation, check, equals, failWithActual, failWithActual, failWithoutActual, hashCode, ignoreCheck, isAnyOf, isEqualTo, isIn, isInstanceOf, isNoneOf, isNotEqualTo, isNotIn, isNotInstanceOf, isNotNull, isNotSameInstanceAs, isNull, isSameInstanceAs, toStringpublic void isPresent()
OptionalDouble is empty or the subject is null.public void isEmpty()
OptionalDouble is present or the subject is null.public void hasValue(double expected)
OptionalDouble does not have the given value or the subject is null. This
 method is not recommended when the code under test is doing any kind of arithmetic,
 since the exact result of floating point arithmetic is sensitive to apparently trivial changes.
 More sophisticated comparisons can be done using hasValueThat(). This method is
 recommended when the code under test is specified as either copying a value without
 modification from its input or returning a well-defined literal or constant value.@Deprecated public DoubleSubject hasValueThat()
assertThat(optional).hasValueThat()...., use assertThat(optional.getAsDouble()).....OptionalDouble. Fails
 immediately if the subject is empty.public static Subject.Factory<OptionalDoubleSubject,OptionalDouble> optionalDoubles()
Copyright © 2019. All rights reserved.