Fix tests
This commit is contained in:
parent
f206ab8b32
commit
d0c8b0c98a
@ -17,6 +17,8 @@ import okio.source
|
|||||||
import org.junit.jupiter.api.BeforeAll
|
import org.junit.jupiter.api.BeforeAll
|
||||||
import org.junit.jupiter.api.Disabled
|
import org.junit.jupiter.api.Disabled
|
||||||
import org.junit.jupiter.api.Test
|
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.interactor.GetCategories
|
||||||
import tachiyomi.domain.category.model.Category
|
import tachiyomi.domain.category.model.Category
|
||||||
import tachiyomi.domain.manga.interactor.GetCustomMangaInfo
|
import tachiyomi.domain.manga.interactor.GetCustomMangaInfo
|
||||||
@ -26,8 +28,6 @@ import tachiyomi.domain.manga.model.CustomMangaInfo
|
|||||||
import tachiyomi.domain.manga.model.FavoriteEntry
|
import tachiyomi.domain.manga.model.FavoriteEntry
|
||||||
import tachiyomi.domain.manga.model.Manga
|
import tachiyomi.domain.manga.model.Manga
|
||||||
import tachiyomi.domain.manga.repository.CustomMangaRepository
|
import tachiyomi.domain.manga.repository.CustomMangaRepository
|
||||||
import uy.kohesive.injekt.Injekt
|
|
||||||
import uy.kohesive.injekt.api.addSingletonFactory
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
class Tester {
|
class Tester {
|
||||||
@ -165,7 +165,10 @@ class Tester {
|
|||||||
@JvmStatic
|
@JvmStatic
|
||||||
@BeforeAll
|
@BeforeAll
|
||||||
fun before() {
|
fun before() {
|
||||||
Injekt.addSingletonFactory {
|
startKoin {
|
||||||
|
modules(
|
||||||
|
module {
|
||||||
|
single {
|
||||||
GetCustomMangaInfo(
|
GetCustomMangaInfo(
|
||||||
object : CustomMangaRepository {
|
object : CustomMangaRepository {
|
||||||
override fun get(mangaId: Long) = null
|
override fun get(mangaId: Long) = null
|
||||||
@ -174,5 +177,8 @@ class Tester {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user