Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudgiuliani committed Dec 17, 2024
1 parent 75f0b4b commit e548a3b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ class MainApplication : Application() {
androidFileProperties()
fragmentFactory()
workManagerFactory()
lazyModules(allModules, dispatcher = IO)
// modules(allModules)
// lazyModules(allModules, dispatcher = IO)
modules(allModules)
}

//TODO Load/Unload Koin modules scenario cases
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import org.koin.sample.sandbox.scope.ScopedFragment
import org.koin.sample.sandbox.workmanager.SimpleWorker
import org.koin.sample.sandbox.workmanager.SimpleWorkerService

val appModule = lazyModule {
val appModule = module {

singleOf(::SimpleServiceImpl) { bind<SimpleService>() }
singleOf(::DumbServiceImpl) {
Expand All @@ -43,7 +43,7 @@ val appModule = lazyModule {
factory { RandomId() }
}

val mvpModule = lazyModule {
val mvpModule = module {
//factory { (id: String) -> FactoryPresenter(id, get()) }
factoryOf(::FactoryPresenter)

Expand All @@ -53,7 +53,7 @@ val mvpModule = lazyModule {
}
}

val mvvmModule = lazyModule {
val mvvmModule = module {

viewModelOf(::SimpleViewModel)// { (id: String) -> SimpleViewModel(id, get()) }
viewModelOf(::SimpleViewModel) { named("vm1") } //{ (id: String) -> SimpleViewModel(id, get()) }
Expand Down Expand Up @@ -93,7 +93,7 @@ val mvvmModule = lazyModule {
}
}

val scopeModule = lazyModule {
val scopeModule = module {
scope(named(SCOPE_ID)) {
scopedOf(::Session) {
named(SCOPE_SESSION)
Expand All @@ -106,7 +106,7 @@ val scopeModule = lazyModule {
}
}

val scopeModuleActivityA = lazyModule {
val scopeModuleActivityA = module {
scope<ScopedActivityA> {
fragmentOf(::ScopedFragment)
scopedOf(::Session)
Expand All @@ -117,19 +117,19 @@ val scopeModuleActivityA = lazyModule {
}
}

val workerServiceModule = lazyModule {
val workerServiceModule = module {
singleOf(::SimpleWorkerService)
}

val workerScopedModule = lazyModule {
val workerScopedModule = module {
workerOf(::SimpleWorker)// { SimpleWorker(get(), androidContext(), it.get()) }
}

val navModule = lazyModule {
val navModule = module {
viewModelOf(::NavViewModel)
viewModelOf(::NavViewModel2)
}

val allModules = lazyModule {
val allModules = module {
includes(appModule, mvpModule, mvvmModule , scopeModule , workerServiceModule , workerScopedModule , navModule , scopeModuleActivityA)
}

0 comments on commit e548a3b

Please sign in to comment.