@ParametersAreNonnullByDefault
Package dagger.hilt.android.testing
This package contains APIs for writing Android local or instrumentation tests with Hilt.
- See Also:
- Hilt Testing
-
Interface Summary Interface Description OnComponentReadyRunner.OnComponentReadyListener<T> Rules should register an implementation of this to get access to the singleton componentOnComponentReadyRunner.OnComponentReadyRunnerHolder Public for use by generated code andTestApplicationComponentManager
-
Class Summary Class Description HiltAndroidRule ATestRule
for Hilt that can be used with JVM or Instrumentation tests.HiltTestApplication An application that can be used for Android instrumentation or Robolectric tests using Hilt.OnComponentReadyRunner Provides access to the Singleton component in tests, so that Rules can access it after custom test modules have been added. -
Annotation Types Summary Annotation Type Description BindElementsIntoSet An annotation that can be used on a test field to contribute the value into theSingletonComponent
as anElementsIntoSet
for the given type.BindValue An annotation that can be used on a test field to contribute the value into theSingletonComponent
.BindValueIntoMap An annotation that can be used on a test field to contribute the value into theSingletonComponent
as anIntoMap
for the given type.BindValueIntoSet An annotation that can be used on a test field to contribute the value into theSingletonComponent
as anIntoSet
for the given type.CustomTestApplication An annotation that creates an application with the given base type that can be used for any test in the given build.HiltAndroidTest Annotation used for marking an Android emulator tests that require injection.UninstallModules An annotation used to uninstall modules that have previously been installed withInstallIn
.