Package 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 forOptional<T>subjects.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.common.truth.Subject
Subject.HasField
-
-
Field Summary
-
Fields inherited from class com.google.common.truth.Subject
failureStrategy
-
-
Constructor Summary
Constructors Constructor Description OptionalSubject(FailureStrategy failureStrategy, com.google.common.base.Optional<T> subject)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhasValue(java.lang.Object expected)Fails if theOptional<T>does not have the given value.voidisAbsent()Fails if theOptional<T>is present.voidisPresent()Fails if theOptional<T>is absent.-
Methods inherited from class com.google.common.truth.Subject
check, equals, fail, fail, fail, failWithBadResults, failWithCustomSubject, failWithoutSubject, failWithRawMessage, getDisplaySubject, getSubject, hasField, hashCode, internalCustomName, is, isA, isEqualTo, isInstanceOf, isNotA, isNotEqualTo, isNotInstanceOf, isNotNull, isNotSameAs, isNull, isSameAs, labeled, named
-
-
-
-
Constructor Detail
-
OptionalSubject
OptionalSubject(FailureStrategy failureStrategy, com.google.common.base.Optional<T> subject)
-
-