Class OnComponentReadyRunner

java.lang.Object
dagger.hilt.android.testing.OnComponentReadyRunner

public final class OnComponentReadyRunner extends Object
Provides access to the Singleton component in tests, so that Rules can access it after custom test modules have been added.
  • Constructor Details

    • OnComponentReadyRunner

      public OnComponentReadyRunner()
  • Method Details

    • setComponentManager

      public void setComponentManager(dagger.hilt.internal.GeneratedComponentManager<?> componentManager)
      Used by generated code, to notify listeners that the component has been created.
    • addListener

      public static <T> void addListener(android.content.Context context, Class<T> entryPoint, OnComponentReadyRunner.OnComponentReadyListener<T> listener)
      Must be called on the test thread, before the Statement is evaluated.
    • isEmpty

      public boolean isEmpty()