From d87d37a163d30220b75803405c9738e3dde1802e Mon Sep 17 00:00:00 2001 From: Gergely Hegedus Date: Thu, 30 Jun 2022 15:41:06 +0300 Subject: [PATCH] Issue#90 Fix Issue with the order of commands for Koin Re-initialization --- codekata/sharedtests.instructionset.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/codekata/sharedtests.instructionset.md b/codekata/sharedtests.instructionset.md index 9af368a..b8e0065 100644 --- a/codekata/sharedtests.instructionset.md +++ b/codekata/sharedtests.instructionset.md @@ -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: ```kotlin ... -TestDatabaseInitialization.overwriteDatabaseInitialization(dispatcher) +Intents.init() if (GlobalContext.getOrNull() == null) { val application = ApplicationProvider.getApplicationContext() val baseUrl = BaseUrl(BuildConfig.BASE_URL) @@ -140,7 +140,8 @@ if (GlobalContext.getOrNull() == null) { androidContext(application) modules(createAppModules(baseUrl)) } -} +} // needs to be before the Database overwriting +val dispatcher = StandardTestDispatcher() ... ```