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. |
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, toString
public 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()
.public static Subject.Factory<OptionalIntSubject,OptionalInt> optionalInts()
Copyright © 2019. All rights reserved.