Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jobobby04 committed Oct 28, 2024
1 parent f206ab8 commit d0c8b0c
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions app/src/test/kotlin/Tester.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import okio.source
import org.junit.jupiter.api.BeforeAll
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
import org.koin.core.context.startKoin
import org.koin.dsl.module
import tachiyomi.domain.category.interactor.GetCategories
import tachiyomi.domain.category.model.Category
import tachiyomi.domain.manga.interactor.GetCustomMangaInfo
Expand All @@ -26,8 +28,6 @@ import tachiyomi.domain.manga.model.CustomMangaInfo
import tachiyomi.domain.manga.model.FavoriteEntry
import tachiyomi.domain.manga.model.Manga
import tachiyomi.domain.manga.repository.CustomMangaRepository
import uy.kohesive.injekt.Injekt
import uy.kohesive.injekt.api.addSingletonFactory
import java.io.File

class Tester {
Expand Down Expand Up @@ -165,12 +165,18 @@ class Tester {
@JvmStatic
@BeforeAll
fun before() {
Injekt.addSingletonFactory {
GetCustomMangaInfo(
object : CustomMangaRepository {
override fun get(mangaId: Long) = null
override fun set(mangaInfo: CustomMangaInfo) = Unit
},
startKoin {
modules(
module {
single {
GetCustomMangaInfo(
object : CustomMangaRepository {
override fun get(mangaId: Long) = null
override fun set(mangaInfo: CustomMangaInfo) = Unit
},
)
}
}
)
}
}
Expand Down

0 comments on commit d0c8b0c

Please sign in to comment.