| Modifier and Type | Method and Description | 
|---|---|
void | 
hasValue(Object expected)
Fails if the  
Optional<T> does not have the given value or the subject is null. | 
void | 
isEmpty()
Fails if the  
Optional<T> is present or the subject is null. | 
void | 
isPresent()
Fails if the  
Optional<T> is empty or the subject is null. | 
static Subject.Factory<OptionalSubject,Optional<?>> | 
optionals()  | 
actualCustomStringRepresentation, check, equals, failWithActual, failWithActual, failWithoutActual, hashCode, ignoreCheck, isAnyOf, isEqualTo, isIn, isInstanceOf, isNoneOf, isNotEqualTo, isNotIn, isNotInstanceOf, isNotNull, isNotSameInstanceAs, isNull, isSameInstanceAs, toStringpublic void isPresent()
Optional<T> is empty or the subject is null.public void isEmpty()
Optional<T> is present or the subject is null.public void hasValue(Object expected)
Optional<T> does not have the given value or the subject is null.
 To make more complex assertions on the optional's value split your assertion in two:
 assertThat(myOptional).isPresent();
 assertThat(myOptional.get()).contains("foo");
 public static Subject.Factory<OptionalSubject,Optional<?>> optionals()
Copyright © 2019. All rights reserved.