public final class OptionalLongSubject extends Subject<OptionalLongSubject,OptionalLong>
OptionalLong
subjects.failureStrategy
Modifier and Type | Method and Description |
---|---|
void |
hasValue(long expected)
Fails if the
OptionalLong does not have the given value or the subject is null. |
LongSubject |
hasValueThat()
Prepares for a check regarding the value contained within the
OptionalLong . |
void |
isEmpty()
Fails if the
OptionalLong is present or the subject is null. |
void |
isPresent()
Fails if the
OptionalLong is empty or the subject is null. |
static SubjectFactory<OptionalLongSubject,OptionalLong> |
optionalLongs() |
actual, actualAsString, actualCustomStringRepresentation, check, equals, fail, fail, fail, failComparing, failComparing, failWithBadResults, failWithCustomSubject, failWithoutActual, failWithoutSubject, failWithRawMessage, failWithRawMessageAndCause, getDisplaySubject, getSubject, hashCode, ignoreCheck, internalCustomName, isAnyOf, isEqualTo, isIn, isInstanceOf, isNoneOf, isNotEqualTo, isNotIn, isNotInstanceOf, isNotNull, isNotSameAs, isNull, isSameAs, named
public void isPresent()
OptionalLong
is empty or the subject is null.public void isEmpty()
OptionalLong
is present or the subject is null.public void hasValue(long expected)
OptionalLong
does not have the given value or the subject is null. More
sophisticated comparisons can be done using hasValueThat()
.public LongSubject hasValueThat()
OptionalLong
. Fails
immediately if the subject is empty.public static SubjectFactory<OptionalLongSubject,OptionalLong> optionalLongs()
Copyright © 2017. All rights reserved.