com.google.common.truth
Class OptionalSubject<T>
java.lang.Object
com.google.common.truth.Subject<OptionalSubject<T>,com.google.common.base.Optional<T>>
com.google.common.truth.OptionalSubject<T>
public class OptionalSubject<T>
- extends Subject<OptionalSubject<T>,com.google.common.base.Optional<T>>
Propositions for Optional
<T>
subjects
- Author:
- Christian Gruber ([email protected])
Method Summary |
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. |
Methods inherited from class com.google.common.truth.Subject |
check, equals, fail, failWithBadResults, failWithCustomSubject, failWithoutSubject, failWithRawMessage, getDisplaySubject, getSubject, hasField, hashCode, internalCustomName, is, isA, isEqualTo, isNotA, isNotEqualTo, isNotNull, isNull, labeled, named |
OptionalSubject
public OptionalSubject(FailureStrategy failureStrategy,
com.google.common.base.Optional<T> subject)
isPresent
public void isPresent()
- Attests that the
Optional
<T>
subject has a present value.
isAbsent
public void isAbsent()
- Attests that the
Optional
<T>
subject is absent.
hasValue
public void hasValue(Object expected)
- Attests that the
Optional
<T>
subject is present and has the supplied value.
Copyright © 2014. All rights reserved.