Class CheckedProviderSubject<T,​P extends CheckedProvider<T>>


  • public final class CheckedProviderSubject<T,​P extends CheckedProvider<T>>
    extends com.google.common.truth.Subject
    Truth Subject for use with CheckedProvider classes.
    • 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

      • providedValue

        public com.google.common.truth.Subject providedValue()
        Allows for assertions on the value provided by this provider.

        The value provided by a checked provider is the object returned by a call to CheckedProvider.get()

        Returns:
        a Subject for asserting against the return value of CheckedProvider.get()
      • thrownException

        public com.google.common.truth.ThrowableSubject thrownException()
        Allows for assertions on the exception thrown by this provider.

        The exception thrown by a checked provider is the Throwable thrown by a call to CheckedProvider.get()

        Returns:
        a ThrowableSubject for asserting against the Throwable thrown by CheckedProvider.get()