Package com.google.common.truth
Class OptionalLongSubject
- java.lang.Object
-
- com.google.common.truth.Subject
-
- com.google.common.truth.OptionalLongSubject
-
public final class OptionalLongSubject extends com.google.common.truth.SubjectPropositions for Java 8OptionalLongsubjects.- Author:
- Ben Douglass
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.common.truth.Subject
com.google.common.truth.Subject.Factory<SubjectT extends com.google.common.truth.Subject,ActualT extends Object>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhasValue(long expected)Fails if theOptionalLongdoes not have the given value or the subject is null.voidisEmpty()Fails if theOptionalLongis present or the subject is null.voidisPresent()Fails if theOptionalLongis empty or the subject is null.static com.google.common.truth.Subject.Factory<OptionalLongSubject,OptionalLong>optionalLongs()-
Methods inherited from class com.google.common.truth.Subject
actualCustomStringRepresentation, check, equals, failWithActual, failWithActual, failWithoutActual, hashCode, ignoreCheck, isAnyOf, isEqualTo, isIn, isInstanceOf, isNoneOf, isNotEqualTo, isNotIn, isNotInstanceOf, isNotNull, isNotSameInstanceAs, isNull, isSameInstanceAs, toString
-
-
-
-
Method Detail
-
isPresent
public void isPresent()
Fails if theOptionalLongis empty or the subject is null.
-
isEmpty
public void isEmpty()
Fails if theOptionalLongis present or the subject is null.
-
hasValue
public void hasValue(long expected)
Fails if theOptionalLongdoes not have the given value or the subject is null. More sophisticated comparisons can be done using#hasValueThat().
-
optionalLongs
public static com.google.common.truth.Subject.Factory<OptionalLongSubject,OptionalLong> optionalLongs()
-
-