From 53d8c7bffdae309d0ca4cb562b2962b5bd391aee Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Thu, 9 Jan 2025 17:12:21 +0100 Subject: [PATCH] reuse KoinCoreTest to avoid unwanted dangling Koin instance --- .../kotlin/org/koin/core/OverrideAndCreateatStartTest.kt | 8 ++------ .../kotlin/org/koin/dsl/AdditionalTypeBindingTest.kt | 3 ++- .../commonTest/kotlin/org/koin/dsl/CloseDefinitionTest.kt | 3 ++- .../commonTest/kotlin/org/koin/dsl/ConstructorDSLTest.kt | 3 ++- .../src/commonTest/kotlin/org/koin/dsl/CreateOnStart.kt | 8 ++------ .../src/commonTest/kotlin/org/koin/dsl/FlattenTest.kt | 3 ++- .../commonTest/kotlin/org/koin/dsl/KoinAppCreationTest.kt | 8 ++------ .../kotlin/org/koin/dsl/ModuleAndPropertiesTest.kt | 3 ++- .../commonTest/kotlin/org/koin/dsl/ModuleCreationTest.kt | 3 ++- .../kotlin/org/koin/dsl/ModuleDeclarationRulesTest.kt | 3 ++- .../kotlin/org/koin/dsl/ModuleFactoryIsolationTest.kt | 3 ++- .../commonTest/kotlin/org/koin/dsl/ModuleIncludeTest.kt | 3 ++- .../commonTest/kotlin/org/koin/dsl/ModuleRestartTest.kt | 8 ++------ .../kotlin/org/koin/dsl/ModuleSpecialRulesTest.kt | 3 ++- .../src/commonTest/kotlin/org/koin/dsl/NamingTest.kt | 3 ++- .../src/commonTest/kotlin/org/koin/dsl/NewDSLTest.kt | 3 ++- .../kotlin/org/koin/dsl/PropertyDefinitionTest.kt | 3 ++- .../src/commonTest/kotlin/org/koin/full/TODOAppTest.kt | 3 ++- .../commonTest/kotlin/org/koin/koincomponent/AppTest.kt | 3 ++- .../org/koin/koincomponent/CustomKoinComponentTest.kt | 3 ++- .../kotlin/org/koin/koincomponent/KoinComponentTest.kt | 3 ++- .../kotlin/org/koin/koincomponent/TODOAppTest.kt | 3 ++- .../src/jvmTest/kotlin/org/koin/core/DebugLogTest.kt | 3 ++- .../kotlin/org/koin/core/instance/ReflectAPITest.kt | 3 ++- .../src/jvmTest/kotlin/org/koin/perfs/PerfsTest.kt | 3 ++- 25 files changed, 50 insertions(+), 45 deletions(-) diff --git a/projects/core/koin-core/src/commonTest/kotlin/org/koin/core/OverrideAndCreateatStartTest.kt b/projects/core/koin-core/src/commonTest/kotlin/org/koin/core/OverrideAndCreateatStartTest.kt index 9dab6dd1c..4361c0b9e 100644 --- a/projects/core/koin-core/src/commonTest/kotlin/org/koin/core/OverrideAndCreateatStartTest.kt +++ b/projects/core/koin-core/src/commonTest/kotlin/org/koin/core/OverrideAndCreateatStartTest.kt @@ -1,5 +1,6 @@ package org.koin.core +import org.koin.KoinCoreTest import org.koin.core.annotation.KoinInternalApi import org.koin.core.context.startKoin import org.koin.core.context.stopKoin @@ -33,7 +34,7 @@ class SomeClassB : SomeClassInterface { } } -class OverrideAndCreateatStartTest { +class OverrideAndCreateatStartTest : KoinCoreTest(){ val moduleA = module { single(createdAtStart = true) { SomeClassA() @@ -46,11 +47,6 @@ class OverrideAndCreateatStartTest { } } - @AfterTest - fun after() { - stopKoin() - } - @OptIn(KoinInternalApi::class) @Test fun testDefinitionOverride() { diff --git a/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/AdditionalTypeBindingTest.kt b/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/AdditionalTypeBindingTest.kt index e1c99db15..a7569331f 100644 --- a/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/AdditionalTypeBindingTest.kt +++ b/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/AdditionalTypeBindingTest.kt @@ -1,5 +1,6 @@ package org.koin.dsl +import org.koin.KoinCoreTest import org.koin.Simple import org.koin.core.logger.Level import org.koin.core.qualifier.named @@ -9,7 +10,7 @@ import kotlin.test.Test import kotlin.test.assertEquals // TODO - Check flaky tests -class AdditionalTypeBindingTest { +class AdditionalTypeBindingTest : KoinCoreTest() { // @Test // fun `can resolve an additional type - bind`() { diff --git a/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/CloseDefinitionTest.kt b/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/CloseDefinitionTest.kt index e211b862d..d397dbf72 100644 --- a/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/CloseDefinitionTest.kt +++ b/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/CloseDefinitionTest.kt @@ -1,5 +1,6 @@ package org.koin.dsl +import org.koin.KoinCoreTest import org.koin.Simple import org.koin.core.context.startKoin import org.koin.core.context.stopKoin @@ -9,7 +10,7 @@ import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.assertTrue -class CloseDefinitionTest { +class CloseDefinitionTest : KoinCoreTest() { @Test fun test_onClose() { diff --git a/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ConstructorDSLTest.kt b/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ConstructorDSLTest.kt index 988349133..9a0d1e21f 100644 --- a/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ConstructorDSLTest.kt +++ b/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ConstructorDSLTest.kt @@ -1,5 +1,6 @@ package org.koin.dsl +import org.koin.KoinCoreTest import org.koin.core.logger.Level import org.koin.core.module.dsl.bind import org.koin.core.module.dsl.factoryOf @@ -9,7 +10,7 @@ import kotlin.test.Test import kotlin.test.assertNotNull import kotlin.test.assertNull -class ConstructorDSLTest { +class ConstructorDSLTest : KoinCoreTest() { @Test fun test_reified_type_constructor() { diff --git a/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/CreateOnStart.kt b/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/CreateOnStart.kt index b7b9cc45b..626fb379a 100644 --- a/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/CreateOnStart.kt +++ b/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/CreateOnStart.kt @@ -1,5 +1,6 @@ package org.koin.dsl +import org.koin.KoinCoreTest import org.koin.Simple import org.koin.core.component.KoinComponent import org.koin.core.context.startKoin @@ -9,12 +10,7 @@ import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.assertTrue -class CreateOnStart { - - @AfterTest - fun after() { - stopKoin() - } +class CreateOnStart : KoinCoreTest() { @Test fun `works with koin 2_2_3 and koin 3_0_2 breaks with koin 3_1_4`() { diff --git a/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/FlattenTest.kt b/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/FlattenTest.kt index ab419d870..95043b948 100644 --- a/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/FlattenTest.kt +++ b/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/FlattenTest.kt @@ -1,10 +1,11 @@ package org.koin.dsl +import org.koin.KoinCoreTest import org.koin.core.module.flatten import kotlin.test.Test import kotlin.test.assertTrue -class FlattenTest { +class FlattenTest : KoinCoreTest() { @Test fun test_simple_flatten() { diff --git a/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/KoinAppCreationTest.kt b/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/KoinAppCreationTest.kt index 5a5a3ea15..cfeb67421 100644 --- a/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/KoinAppCreationTest.kt +++ b/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/KoinAppCreationTest.kt @@ -1,5 +1,6 @@ package org.koin.dsl +import org.koin.KoinCoreTest import org.koin.Simple.ComponentA import org.koin.Simple.ComponentB import org.koin.core.annotation.KoinInternalApi @@ -19,12 +20,7 @@ import kotlin.test.assertNotNull import kotlin.test.fail @OptIn(KoinInternalApi::class) -class KoinAppCreationTest { - - @AfterTest - fun after() { - stopKoin() - } +class KoinAppCreationTest : KoinCoreTest() { @Test fun `make a Koin application`() { diff --git a/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleAndPropertiesTest.kt b/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleAndPropertiesTest.kt index 6149f3948..c3ee79580 100644 --- a/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleAndPropertiesTest.kt +++ b/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleAndPropertiesTest.kt @@ -1,12 +1,13 @@ package org.koin.dsl +import org.koin.KoinCoreTest import org.koin.Simple import org.koin.core.error.InstanceCreationException import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.fail -class ModuleAndPropertiesTest { +class ModuleAndPropertiesTest : KoinCoreTest() { @Test fun `get a property from a module`() { diff --git a/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleCreationTest.kt b/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleCreationTest.kt index 42ab9caf9..9d8bbe5ea 100644 --- a/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleCreationTest.kt +++ b/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleCreationTest.kt @@ -1,12 +1,13 @@ package org.koin.dsl +import org.koin.KoinCoreTest import org.koin.Simple import org.koin.core.logger.Level import org.koin.test.assertDefinitionsCount import kotlin.test.Test import kotlin.test.assertEquals -class ModuleCreationTest { +class ModuleCreationTest : KoinCoreTest() { @Test fun `create an empty module`() { diff --git a/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleDeclarationRulesTest.kt b/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleDeclarationRulesTest.kt index f05d74db3..454917042 100644 --- a/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleDeclarationRulesTest.kt +++ b/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleDeclarationRulesTest.kt @@ -1,5 +1,6 @@ package org.koin.dsl +import org.koin.KoinCoreTest import org.koin.Simple import org.koin.core.error.DefinitionOverrideException import org.koin.core.logger.Level @@ -8,7 +9,7 @@ import org.koin.test.assertDefinitionsCount import kotlin.test.Test import kotlin.test.assertEquals -class ModuleDeclarationRulesTest { +class ModuleDeclarationRulesTest : KoinCoreTest() { @Test fun `don't allow redeclaration`() { diff --git a/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleFactoryIsolationTest.kt b/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleFactoryIsolationTest.kt index 894eabffc..e19bbc08c 100644 --- a/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleFactoryIsolationTest.kt +++ b/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleFactoryIsolationTest.kt @@ -1,5 +1,6 @@ package org.koin.dsl +import org.koin.KoinCoreTest import org.koin.Simple import org.koin.core.annotation.KoinInternalApi import org.koin.core.module.Module @@ -14,7 +15,7 @@ val myGetModule : Module get() = module { single { Simple.ComponentA() } } fun myFunModule() = module { single { Simple.ComponentA() } } @OptIn(KoinInternalApi::class) -class ModuleFactoryIsolationTest { +class ModuleFactoryIsolationTest : KoinCoreTest() { @Test fun testVariableIsolationAndInstanceFactories(){ diff --git a/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleIncludeTest.kt b/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleIncludeTest.kt index cf7bbe0d9..41066bd21 100644 --- a/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleIncludeTest.kt +++ b/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleIncludeTest.kt @@ -1,11 +1,12 @@ package org.koin.dsl +import org.koin.KoinCoreTest import org.koin.core.module.dsl.singleOf import org.koin.core.qualifier.named import kotlin.test.Test import kotlin.test.assertNotNull -class ModuleIncludeTest { +class ModuleIncludeTest : KoinCoreTest() { @Test fun test_include() { diff --git a/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleRestartTest.kt b/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleRestartTest.kt index ad843c035..e3b4cb720 100644 --- a/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleRestartTest.kt +++ b/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleRestartTest.kt @@ -1,5 +1,6 @@ package org.koin.dsl +import org.koin.KoinCoreTest import org.koin.Simple import org.koin.core.component.KoinComponent import org.koin.core.component.get @@ -9,7 +10,7 @@ import kotlin.test.AfterTest import kotlin.test.BeforeTest import kotlin.test.Test -class ModuleRestartTest : KoinComponent { +class ModuleRestartTest : KoinComponent, KoinCoreTest() { @BeforeTest fun before() { @@ -22,11 +23,6 @@ class ModuleRestartTest : KoinComponent { } } - @AfterTest - fun after() { - stopKoin() - } - @Test fun first_test() { get() diff --git a/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleSpecialRulesTest.kt b/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleSpecialRulesTest.kt index 253505889..dfd094cf8 100644 --- a/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleSpecialRulesTest.kt +++ b/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleSpecialRulesTest.kt @@ -1,10 +1,11 @@ package org.koin.dsl +import org.koin.KoinCoreTest import org.koin.core.qualifier.named import kotlin.test.Test import kotlin.test.assertEquals -class ModuleSpecialRulesTest { +class ModuleSpecialRulesTest : KoinCoreTest() { @Test fun `generic type declaration`() { diff --git a/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/NamingTest.kt b/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/NamingTest.kt index 337bea5eb..ddf44ded1 100644 --- a/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/NamingTest.kt +++ b/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/NamingTest.kt @@ -1,12 +1,13 @@ package org.koin.dsl +import org.koin.KoinCoreTest import org.koin.Simple import org.koin.core.logger.Level import org.koin.core.qualifier.* import kotlin.test.Test import kotlin.test.assertEquals -class NamingTest { +class NamingTest : KoinCoreTest(){ @Test fun `can resolve naming from root`() { diff --git a/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/NewDSLTest.kt b/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/NewDSLTest.kt index 5ef8dce9a..441e7a71b 100644 --- a/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/NewDSLTest.kt +++ b/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/NewDSLTest.kt @@ -2,6 +2,7 @@ package org.koin.dsl +import org.koin.KoinCoreTest import org.koin.core.annotation.KoinInternalApi import org.koin.core.instance.FactoryInstanceFactory import org.koin.core.instance.ScopedInstanceFactory @@ -18,7 +19,7 @@ class ClassA2 : IClassA class ClassB(val a: IClassA) interface IClassA -class NewDSLTest { +class NewDSLTest : KoinCoreTest() { @Test fun singleof_options() { diff --git a/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/PropertyDefinitionTest.kt b/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/PropertyDefinitionTest.kt index 4764d9f8b..6ff51f9bb 100644 --- a/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/PropertyDefinitionTest.kt +++ b/projects/core/koin-core/src/commonTest/kotlin/org/koin/dsl/PropertyDefinitionTest.kt @@ -1,10 +1,11 @@ package org.koin.dsl +import org.koin.KoinCoreTest import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.assertNull -class PropertyDefinitionTest { +class PropertyDefinitionTest : KoinCoreTest(){ @Test fun `load and get properties`() { diff --git a/projects/core/koin-core/src/commonTest/kotlin/org/koin/full/TODOAppTest.kt b/projects/core/koin-core/src/commonTest/kotlin/org/koin/full/TODOAppTest.kt index 393bc7e88..d637e8be1 100644 --- a/projects/core/koin-core/src/commonTest/kotlin/org/koin/full/TODOAppTest.kt +++ b/projects/core/koin-core/src/commonTest/kotlin/org/koin/full/TODOAppTest.kt @@ -1,11 +1,12 @@ package org.koin.full +import org.koin.KoinCoreTest import org.koin.core.logger.Level import org.koin.dsl.koinApplication import org.koin.dsl.module import kotlin.test.* -class TODOAppTest { +class TODOAppTest : KoinCoreTest(){ val defaultModule = module { single { TasksRepository(get()) } diff --git a/projects/core/koin-core/src/commonTest/kotlin/org/koin/koincomponent/AppTest.kt b/projects/core/koin-core/src/commonTest/kotlin/org/koin/koincomponent/AppTest.kt index 710c41f42..69a5133b7 100644 --- a/projects/core/koin-core/src/commonTest/kotlin/org/koin/koincomponent/AppTest.kt +++ b/projects/core/koin-core/src/commonTest/kotlin/org/koin/koincomponent/AppTest.kt @@ -1,5 +1,6 @@ package org.koin.koincomponent +import org.koin.KoinCoreTest import org.koin.core.component.KoinComponent import org.koin.core.component.inject import org.koin.core.context.startKoin @@ -16,7 +17,7 @@ class MyApp : KoinComponent { val presenter: TasksPresenter by inject() } -class AppTest { +class AppTest : KoinCoreTest(){ @Test fun can_run_KoinComponent_app() { diff --git a/projects/core/koin-core/src/commonTest/kotlin/org/koin/koincomponent/CustomKoinComponentTest.kt b/projects/core/koin-core/src/commonTest/kotlin/org/koin/koincomponent/CustomKoinComponentTest.kt index b9fe4aeab..ee36f6816 100644 --- a/projects/core/koin-core/src/commonTest/kotlin/org/koin/koincomponent/CustomKoinComponentTest.kt +++ b/projects/core/koin-core/src/commonTest/kotlin/org/koin/koincomponent/CustomKoinComponentTest.kt @@ -1,5 +1,6 @@ package org.koin.koincomponent +import org.koin.KoinCoreTest import org.koin.Simple import org.koin.core.Koin import org.koin.core.component.KoinComponent @@ -31,7 +32,7 @@ class MyCustomApp : CustomKoinComponent() { val a: Simple.ComponentA by inject() } -class CustomKoinComponentTest { +class CustomKoinComponentTest : KoinCoreTest(){ @Test fun can_inject_KoinComponent_from_custom_instance() { diff --git a/projects/core/koin-core/src/commonTest/kotlin/org/koin/koincomponent/KoinComponentTest.kt b/projects/core/koin-core/src/commonTest/kotlin/org/koin/koincomponent/KoinComponentTest.kt index f6d96f07e..7095c4627 100644 --- a/projects/core/koin-core/src/commonTest/kotlin/org/koin/koincomponent/KoinComponentTest.kt +++ b/projects/core/koin-core/src/commonTest/kotlin/org/koin/koincomponent/KoinComponentTest.kt @@ -1,5 +1,6 @@ package org.koin.koincomponent +import org.koin.KoinCoreTest import org.koin.Simple import org.koin.core.component.KoinComponent import org.koin.core.component.get @@ -20,7 +21,7 @@ class MyLazyComponent : KoinComponent { val anInject: Simple.ComponentA by inject() } -class KoinComponentTest { +class KoinComponentTest : KoinCoreTest(){ @Test fun can_lazy_inject_from_KoinComponent() { diff --git a/projects/core/koin-core/src/commonTest/kotlin/org/koin/koincomponent/TODOAppTest.kt b/projects/core/koin-core/src/commonTest/kotlin/org/koin/koincomponent/TODOAppTest.kt index 3430000fd..9b070249b 100644 --- a/projects/core/koin-core/src/commonTest/kotlin/org/koin/koincomponent/TODOAppTest.kt +++ b/projects/core/koin-core/src/commonTest/kotlin/org/koin/koincomponent/TODOAppTest.kt @@ -1,5 +1,6 @@ package org.koin.koincomponent +import org.koin.KoinCoreTest import org.koin.core.component.KoinComponent import org.koin.core.component.inject import org.koin.core.context.startKoin @@ -10,7 +11,7 @@ import org.koin.dsl.bind import org.koin.dsl.module import kotlin.test.Test -class TODOAppTest { +class TODOAppTest : KoinCoreTest(){ val todoAppModule = module { single { TasksView() } bind TasksContract.View::class diff --git a/projects/core/koin-core/src/jvmTest/kotlin/org/koin/core/DebugLogTest.kt b/projects/core/koin-core/src/jvmTest/kotlin/org/koin/core/DebugLogTest.kt index 56bceff2d..1bc3265b4 100644 --- a/projects/core/koin-core/src/jvmTest/kotlin/org/koin/core/DebugLogTest.kt +++ b/projects/core/koin-core/src/jvmTest/kotlin/org/koin/core/DebugLogTest.kt @@ -1,13 +1,14 @@ package org.koin.core import org.junit.Test +import org.koin.KoinCoreTest import org.koin.core.annotation.KoinInternalApi import org.koin.core.context.startKoin import org.koin.core.context.stopKoin import org.koin.core.logger.Level @OptIn(KoinInternalApi::class) -class DebugLogTest { +class DebugLogTest : KoinCoreTest(){ @Test fun fasterDebug() { diff --git a/projects/core/koin-core/src/jvmTest/kotlin/org/koin/core/instance/ReflectAPITest.kt b/projects/core/koin-core/src/jvmTest/kotlin/org/koin/core/instance/ReflectAPITest.kt index 6f19a8c76..bb448e57d 100644 --- a/projects/core/koin-core/src/jvmTest/kotlin/org/koin/core/instance/ReflectAPITest.kt +++ b/projects/core/koin-core/src/jvmTest/kotlin/org/koin/core/instance/ReflectAPITest.kt @@ -1,11 +1,12 @@ package org.koin.core.instance import org.junit.Test +import org.koin.KoinCoreTest import org.koin.core.time.inMs import kotlin.reflect.KClass import kotlin.time.measureTimedValue -class ReflectAPITest { +class ReflectAPITest : KoinCoreTest(){ @Test fun `reflect api to construct an instance`() { diff --git a/projects/core/koin-core/src/jvmTest/kotlin/org/koin/perfs/PerfsTest.kt b/projects/core/koin-core/src/jvmTest/kotlin/org/koin/perfs/PerfsTest.kt index 37bde3854..c3d5f96d4 100644 --- a/projects/core/koin-core/src/jvmTest/kotlin/org/koin/perfs/PerfsTest.kt +++ b/projects/core/koin-core/src/jvmTest/kotlin/org/koin/perfs/PerfsTest.kt @@ -1,5 +1,6 @@ package org.koin.perfs// package org.koin.perfs + import org.koin.KoinCoreTest import kotlin.test.Test import org.koin.core.time.inMs import org.koin.dsl.koinApplication @@ -7,7 +8,7 @@ package org.koin.perfs// package org.koin.perfs import kotlin.time.measureTime import kotlin.time.measureTimedValue - class PerfsTest { + class PerfsTest : KoinCoreTest(){ @Test fun empty_module_perfs() {