-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
160 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...atastore/src/test/java/com/stslex/aproselection/core/datastore/CoreDataStoreModuleTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.stslex.aproselection.core.datastore | ||
|
||
import android.content.Context | ||
import org.junit.Test | ||
import org.koin.android.ext.koin.androidContext | ||
import org.koin.dsl.koinApplication | ||
import org.koin.test.KoinTest | ||
import org.koin.test.check.checkModules | ||
import org.mockito.Mockito | ||
|
||
class CoreDataStoreModuleTest : KoinTest { | ||
|
||
@Test | ||
fun checkKoinModules() { | ||
|
||
koinApplication { | ||
androidContext(Mockito.mock(Context::class.java)) | ||
modules(coreDataStoreModule) | ||
checkModules() | ||
} | ||
} | ||
} |
17 changes: 0 additions & 17 deletions
17
core/datastore/src/test/java/com/stslex/aproselection/core/datastore/ExampleUnitTest.kt
This file was deleted.
Oops, something went wrong.
25 changes: 25 additions & 0 deletions
25
...gation/src/test/java/com/stslex/aproselection/core/navigation/CoreNavigationModuleTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.stslex.aproselection.core.navigation | ||
|
||
import android.content.Context | ||
import androidx.navigation.NavHostController | ||
import com.stslex.aproselection.core.navigation.di.moduleCoreNavigation | ||
import org.junit.Test | ||
import org.koin.android.ext.koin.androidContext | ||
import org.koin.dsl.koinApplication | ||
import org.koin.test.KoinTest | ||
import org.koin.test.check.checkModules | ||
import org.mockito.Mockito | ||
|
||
class CoreNavigationModuleTest : KoinTest { | ||
|
||
@Test | ||
fun checkKoinModules() { | ||
val navController = Mockito.mock(NavHostController::class.java) | ||
|
||
koinApplication { | ||
androidContext(Mockito.mock(Context::class.java)) | ||
modules(moduleCoreNavigation(navController)) | ||
checkModules() | ||
} | ||
} | ||
} |
17 changes: 0 additions & 17 deletions
17
core/navigation/src/test/java/com/stslex/aproselection/core/navigation/ExampleUnitTest.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 0 additions & 17 deletions
17
core/network/src/test/java/com/stslex/aproselection/core/network/ExampleUnitTest.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
core/user/src/test/java/com/stslex/aproselection/core/user/CoreUserModuleTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.stslex.aproselection.core.user | ||
|
||
import android.content.Context | ||
import com.stslex.aproselection.core.network.clients.user.UserNetworkClient | ||
import com.stslex.aproselection.core.user.di.moduleCoreUser | ||
import org.junit.Test | ||
import org.koin.android.ext.koin.androidContext | ||
import org.koin.core.KoinApplication | ||
import org.koin.dsl.koinApplication | ||
import org.koin.dsl.module | ||
import org.koin.test.KoinTest | ||
import org.koin.test.check.checkModules | ||
import org.mockito.Mockito | ||
|
||
class CoreUserModuleTest : KoinTest { | ||
|
||
@Test | ||
fun checkKoinModules() { | ||
koinApplication { | ||
androidContext(Mockito.mock(Context::class.java)) | ||
load<UserNetworkClient>() | ||
modules(moduleCoreUser) | ||
checkModules() | ||
} | ||
} | ||
|
||
private inline fun <reified T> KoinApplication.load() { | ||
koin.loadModules( | ||
listOf(module { single<T> { Mockito.mock(T::class.java) } }) | ||
) | ||
} | ||
} |
17 changes: 0 additions & 17 deletions
17
core/user/src/test/java/com/stslex/aproselection/core/user/ExampleUnitTest.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 0 additions & 17 deletions
17
feature/home/src/test/java/com/stslex/aproselection/feature/home/ExampleUnitTest.kt
This file was deleted.
Oops, something went wrong.
34 changes: 34 additions & 0 deletions
34
feature/home/src/test/java/com/stslex/aproselection/feature/home/ModuleFeatureHomeTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.stslex.aproselection.feature.home | ||
|
||
import android.content.Context | ||
import com.stslex.aproselection.core.datastore.AppDataStore | ||
import com.stslex.aproselection.core.user.data.repository.UserRepository | ||
import com.stslex.aproselection.feature.home.di.moduleFeatureHome | ||
import org.junit.Test | ||
import org.koin.android.ext.koin.androidContext | ||
import org.koin.core.KoinApplication | ||
import org.koin.dsl.koinApplication | ||
import org.koin.dsl.module | ||
import org.koin.test.KoinTest | ||
import org.koin.test.check.checkModules | ||
import org.mockito.Mockito | ||
|
||
class ModuleFeatureHomeTest : KoinTest { | ||
|
||
@Test | ||
fun checkKoinModules() { | ||
koinApplication { | ||
androidContext(Mockito.mock(Context::class.java)) | ||
load<UserRepository>() | ||
load<AppDataStore>() | ||
modules(moduleFeatureHome) | ||
checkModules() | ||
} | ||
} | ||
|
||
private inline fun <reified T> KoinApplication.load() { | ||
koin.loadModules( | ||
listOf(module { single<T> { Mockito.mock(T::class.java) } }) | ||
) | ||
} | ||
} |