Class OptionalLongSubject


  • public final class OptionalLongSubject
    extends com.google.common.truth.Subject
    Propositions for Java 8 OptionalLong subjects.
    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 Detail

      • isPresent

        public void isPresent()
        Fails if the OptionalLong is empty or the subject is null.
      • isEmpty

        public void isEmpty()
        Fails if the OptionalLong is present or the subject is null.
      • hasValue

        public void hasValue​(long expected)
        Fails if the OptionalLong does not have the given value or the subject is null. More sophisticated comparisons can be done using #hasValueThat().