mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
refactor: Migrate to JUnit 5
This commit is contained in:
parent
8898d50539
commit
b28f905d10
3 changed files with 10 additions and 8 deletions
|
@ -26,3 +26,4 @@
|
||||||
- Added Unit Test for version checker
|
- Added Unit Test for version checker
|
||||||
<!-- - Use Coil pipeline instead of SSIV for image decode, might improve Webtoon performance -->
|
<!-- - Use Coil pipeline instead of SSIV for image decode, might improve Webtoon performance -->
|
||||||
- Migrated from Coil2 to Coil3
|
- Migrated from Coil2 to Coil3
|
||||||
|
- Migrated from JUnit4 to JUnit5
|
||||||
|
|
|
@ -4,15 +4,14 @@ import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
||||||
import eu.kanade.tachiyomi.network.NetworkHelper
|
import eu.kanade.tachiyomi.network.NetworkHelper
|
||||||
import io.mockk.mockk
|
import io.mockk.mockk
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
import org.junit.Assert.assertFalse
|
import org.junit.jupiter.api.Assertions.*
|
||||||
import org.junit.Assert.assertTrue
|
import org.junit.jupiter.api.BeforeEach
|
||||||
import org.junit.Before
|
import org.junit.jupiter.api.Test
|
||||||
import org.junit.Test
|
|
||||||
|
|
||||||
class AppUpdateCheckerTest {
|
class AppUpdateCheckerTest {
|
||||||
lateinit var appUpdateChecker: AppUpdateChecker
|
private lateinit var appUpdateChecker: AppUpdateChecker
|
||||||
|
|
||||||
@Before
|
@BeforeEach
|
||||||
fun setup() {
|
fun setup() {
|
||||||
val json = mockk<Json>()
|
val json = mockk<Json>()
|
||||||
val network = mockk<NetworkHelper>()
|
val network = mockk<NetworkHelper>()
|
||||||
|
|
|
@ -6,6 +6,7 @@ fast_adapter = "5.6.0"
|
||||||
nucleus = "3.0.0"
|
nucleus = "3.0.0"
|
||||||
okhttp = "5.0.0-alpha.11"
|
okhttp = "5.0.0-alpha.11"
|
||||||
shizuku = "12.1.0"
|
shizuku = "12.1.0"
|
||||||
|
junit = "5.8.2"
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
accompanist-webview = { module = "com.google.accompanist:accompanist-webview", version = "0.30.1" }
|
accompanist-webview = { module = "com.google.accompanist:accompanist-webview", version = "0.30.1" }
|
||||||
|
@ -69,7 +70,8 @@ firebase-crashlytics = { module = "com.google.firebase:firebase-crashlytics-ktx"
|
||||||
unifile = { module = "com.github.tachiyomiorg:unifile", version = "17bec43" }
|
unifile = { module = "com.github.tachiyomiorg:unifile", version = "17bec43" }
|
||||||
viewstatepageradapter = { module = "com.nightlynexus.viewstatepageradapter:viewstatepageradapter", version = "1.1.0" }
|
viewstatepageradapter = { module = "com.nightlynexus.viewstatepageradapter:viewstatepageradapter", version = "1.1.0" }
|
||||||
viewtooltip = { module = "com.github.florent37:viewtooltip", version = "1.2.2" }
|
viewtooltip = { module = "com.github.florent37:viewtooltip", version = "1.2.2" }
|
||||||
junit = { module = "junit:junit", version = "4.13.2" }
|
junit-engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "junit" }
|
||||||
|
junit-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junit" }
|
||||||
junit-android = { module = "androidx.test.ext:junit", version = "1.1.5" }
|
junit-android = { module = "androidx.test.ext:junit", version = "1.1.5" }
|
||||||
mockk = { module = "io.mockk:mockk", version = "1.13.11" }
|
mockk = { module = "io.mockk:mockk", version = "1.13.11" }
|
||||||
|
|
||||||
|
@ -79,4 +81,4 @@ gradle-versions = { id = "com.github.ben-manes.versions", version = "0.42.0" }
|
||||||
|
|
||||||
[bundles]
|
[bundles]
|
||||||
coil = [ "coil3", "coil3-svg", "coil3-gif", "coil3-okhttp" ]
|
coil = [ "coil3", "coil3-svg", "coil3-gif", "coil3-okhttp" ]
|
||||||
test = [ "junit", "mockk" ]
|
test = [ "junit-api", "junit-engine", "mockk" ]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue