Issue#90 Fix Issue with the order of commands for Koin Re-initialization
This commit is contained in:
parent
659eaff77e
commit
d87d37a163
1 changed files with 3 additions and 2 deletions
|
|
@ -132,7 +132,7 @@ This is great if you want to have End-to-End tests that follow each other, but s
|
||||||
We will check if koin is initialized, if it isn't then we simply initialize it:
|
We will check if koin is initialized, if it isn't then we simply initialize it:
|
||||||
```kotlin
|
```kotlin
|
||||||
...
|
...
|
||||||
TestDatabaseInitialization.overwriteDatabaseInitialization(dispatcher)
|
Intents.init()
|
||||||
if (GlobalContext.getOrNull() == null) {
|
if (GlobalContext.getOrNull() == null) {
|
||||||
val application = ApplicationProvider.getApplicationContext<TestShowcaseApplication>()
|
val application = ApplicationProvider.getApplicationContext<TestShowcaseApplication>()
|
||||||
val baseUrl = BaseUrl(BuildConfig.BASE_URL)
|
val baseUrl = BaseUrl(BuildConfig.BASE_URL)
|
||||||
|
|
@ -140,7 +140,8 @@ if (GlobalContext.getOrNull() == null) {
|
||||||
androidContext(application)
|
androidContext(application)
|
||||||
modules(createAppModules(baseUrl))
|
modules(createAppModules(baseUrl))
|
||||||
}
|
}
|
||||||
}
|
} // needs to be before the Database overwriting
|
||||||
|
val dispatcher = StandardTestDispatcher()
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue