public class OptionalSubject<T> extends Subject<OptionalSubject<T>,com.google.common.base.Optional<T>>
Optional
<T>
subjectsSubject.HasField
failureStrategy
Constructor and Description |
---|
OptionalSubject(FailureStrategy failureStrategy,
com.google.common.base.Optional<T> subject) |
Modifier and Type | Method and Description |
---|---|
void |
hasValue(Object expected)
Attests that the
Optional <T> subject is present and has the supplied value. |
void |
isAbsent()
Attests that the
Optional <T> subject is absent. |
void |
isPresent()
Attests that the
Optional <T> subject has a present value. |
check, equals, fail, failWithBadResults, failWithCustomSubject, failWithoutSubject, failWithRawMessage, getDisplaySubject, getSubject, hasField, hashCode, internalCustomName, is, isA, isEqualTo, isNotA, isNotEqualTo, isNotNull, isNull, labeled, named
public OptionalSubject(FailureStrategy failureStrategy, com.google.common.base.Optional<T> subject)
public void isPresent()
Optional
<T>
subject has a present value.public void isAbsent()
Optional
<T>
subject is absent.public void hasValue(Object expected)
Optional
<T>
subject is present and has the supplied value.Copyright © 2017. All rights reserved.