Skip to content

Commit

Permalink
add sample for it package
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudgiuliani committed Oct 15, 2024
1 parent f60f14c commit 2ae4175
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.koin.sample.androidx

import it.example.component.ExampleSingleton
import org.junit.Test
import org.koin.core.context.startKoin
import org.koin.core.context.stopKoin
Expand Down Expand Up @@ -38,6 +39,9 @@ class AndroidModuleTest {
assert(koin.getOrNull<DataConsumer>() != null)
assert(koin.getOrNull<MyDataConsumer>() != null)

assert(koin.getOrNull<ExampleSingleton>() != null)


stopKoin()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package it.example.component

import org.koin.core.annotation.ComponentScan
import org.koin.core.annotation.Module
import org.koin.core.annotation.Single

@Module
@ComponentScan
class ExampleModule

@Single
class ExampleSingleton
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package org.koin.sample.android.library

import it.example.component.ExampleModule
import org.koin.core.annotation.ComponentScan
import org.koin.core.annotation.Module

@Module
@Module(includes = [ExampleModule::class])
@ComponentScan
class CommonModule

0 comments on commit 2ae4175

Please sign in to comment.