nextcloud-android/app/src/debug
Álvaro Brey 7ea6283af4
Add testing utilities to override injections in classes injected with AndroidInjection
This includes Activities, Fragments, Services, etc. Other classes should use constructor injection,
and as such shouldn't need this.

This works by overriding the androidInjector method in the Application class (new TestMainApp added)
and allowing to use custom injectors there.

A InjectionOverrideRule is included for ease of use, but for more complicated cases, injection can be
controlled by accessing TestMainApp directly.

A sample is included in InjectionTestActivityTest.

Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2023-01-12 12:58:31 +01:00
..
java/com/nextcloud Add testing utilities to override injections in classes injected with AndroidInjection 2023-01-12 12:58:31 +01:00
res/layout Add testing utilities to override injections in classes injected with AndroidInjection 2023-01-12 12:58:31 +01:00
AndroidManifest.xml Add testing utilities to override injections in classes injected with AndroidInjection 2023-01-12 12:58:31 +01:00