Skip to content

Commit

Permalink
Fix tests not building
Browse files Browse the repository at this point in the history
  • Loading branch information
robinlinden committed Feb 27, 2021
1 parent a52fcac commit b342f25
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
11 changes: 10 additions & 1 deletion atox/src/androidTest/kotlin/IntegrationTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import io.mockk.mockk
import javax.inject.Singleton
import ltd.evilcorp.atox.di.AndroidModule
import ltd.evilcorp.atox.di.AppComponent
import ltd.evilcorp.atox.di.AppModule
import ltd.evilcorp.atox.di.ViewModelModule
import ltd.evilcorp.core.db.Database
import ltd.evilcorp.core.di.DaoModule
Expand Down Expand Up @@ -60,7 +61,15 @@ class TestModule {
}

@Singleton
@Component(modules = [AndroidModule::class, TestModule::class, DaoModule::class, ViewModelModule::class])
@Component(
modules = [
AppModule::class,
AndroidModule::class,
TestModule::class,
DaoModule::class,
ViewModelModule::class
]
)
interface TestComponent : AppComponent {
@Component.Factory
interface Factory {
Expand Down
3 changes: 2 additions & 1 deletion domain/src/androidTest/kotlin/tox/ToxTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ class ToxTest {
@Test
fun quitting_does_not_crash() {
for (i in 1..10) {
val tox = Tox(mockk(relaxUnitFun = true), mockk(relaxUnitFun = true)).apply { isBootstrapNeeded = false }
val tox =
Tox(mockk(relaxUnitFun = true), mockk(relaxUnitFun = true), mockk()).apply { isBootstrapNeeded = false }
tox.start(SaveOptions(null, false, ProxyType.None, "", 0), ToxEventListener(), ToxAvEventListener())
sleep(25)
tox.stop()
Expand Down

0 comments on commit b342f25

Please sign in to comment.