public final class OptionalIntSubject extends Subject
OptionalInt subjects.| Modifier and Type | Method and Description | 
|---|---|
void | 
hasValue(int expected)
Fails if the  
OptionalInt does not have the given value or the subject is null. | 
IntegerSubject | 
hasValueThat()
Deprecated. 
 
Instead of  
assertThat(optional).hasValueThat()...., use assertThat(optional.getAsInt())..... | 
void | 
isEmpty()
Fails if the  
OptionalInt is present or the subject is null. | 
void | 
isPresent()
Fails if the  
OptionalInt is empty or the subject is null. | 
static Subject.Factory<OptionalIntSubject,OptionalInt> | 
optionalInts()  | 
actualCustomStringRepresentation, check, equals, failWithActual, failWithActual, failWithoutActual, hashCode, ignoreCheck, isAnyOf, isEqualTo, isIn, isInstanceOf, isNoneOf, isNotEqualTo, isNotIn, isNotInstanceOf, isNotNull, isNotSameInstanceAs, isNull, isSameInstanceAs, toStringpublic void isPresent()
OptionalInt is empty or the subject is null.public void isEmpty()
OptionalInt is present or the subject is null.public void hasValue(int expected)
OptionalInt does not have the given value or the subject is null. More
 sophisticated comparisons can be done using hasValueThat().@Deprecated public IntegerSubject hasValueThat()
assertThat(optional).hasValueThat()...., use assertThat(optional.getAsInt()).....OptionalInt. Fails
 immediately if the subject is empty.public static Subject.Factory<OptionalIntSubject,OptionalInt> optionalInts()
Copyright © 2019. All rights reserved.