com.google.inject.testing.throwingproviders

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

  • java.lang.Object
    • com.google.common.truth.Subject
      • com.google.inject.testing.throwingproviders.CheckedProviderSubject<T,P>


  • public final class CheckedProviderSubject<T,P extends CheckedProvider<T>>
    extends com.google.common.truth.Subject
    Truth Subject for use with CheckedProvider classes.
    Author:
    eatnumber1@google.com (Russ Harmon)
    • 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>
    • 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()

Copyright © 2006–2020 Google, Inc.. All rights reserved.