public final class OptionalIntSubject extends Subject<OptionalIntSubject,OptionalInt>
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()
Prepares for a check regarding the value contained within the
OptionalInt . |
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() |
actual, actualAsString, actualCustomStringRepresentation, check, check, equals, fail, fail, fail, failComparing, failComparing, failWithActual, failWithActual, failWithBadResults, failWithCustomSubject, failWithoutActual, failWithoutActual, failWithoutSubject, failWithRawMessage, failWithRawMessageAndCause, getSubject, hashCode, ignoreCheck, internalCustomName, isAnyOf, isEqualTo, isIn, isInstanceOf, isNoneOf, isNotEqualTo, isNotIn, isNotInstanceOf, isNotNull, isNotSameAs, isNull, isSameAs, named, 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 IntegerSubject hasValueThat()
OptionalInt
. Fails
immediately if the subject is empty.public static Subject.Factory<OptionalIntSubject,OptionalInt> optionalInts()
Copyright © 2018. All rights reserved.