mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-17 23:47:02 +05:30
Merge #160
160: Switch to kotlin.test and move AndroidManifest r=msfjarvis a=msfjarvis bors r+ Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
commit
7eb7ee81ba
12 changed files with 37 additions and 15 deletions
|
@ -9,6 +9,6 @@ dependencies {
|
|||
ksp(Dependencies.ThirdParty.Moshi.ksp)
|
||||
implementation(Dependencies.ThirdParty.Retrofit.moshi)
|
||||
testImplementation(Dependencies.Kotlin.Coroutines.core)
|
||||
testImplementation(Dependencies.Testing.junit)
|
||||
testImplementation(kotlin("test-junit"))
|
||||
testImplementation(Dependencies.Testing.mockWebServer)
|
||||
}
|
||||
|
|
|
@ -2,6 +2,9 @@ package dev.msfjarvis.lobsters.data.api
|
|||
|
||||
import com.squareup.moshi.Moshi
|
||||
import dev.msfjarvis.lobsters.util.TestUtils
|
||||
import kotlin.test.Test
|
||||
import kotlin.test.assertEquals
|
||||
import kotlin.test.assertTrue
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import mockwebserver3.Dispatcher
|
||||
import mockwebserver3.MockResponse
|
||||
|
@ -9,10 +12,7 @@ import mockwebserver3.MockWebServer
|
|||
import mockwebserver3.RecordedRequest
|
||||
import okhttp3.OkHttpClient
|
||||
import org.junit.AfterClass
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.BeforeClass
|
||||
import org.junit.Test
|
||||
import retrofit2.Retrofit
|
||||
import retrofit2.converter.moshi.MoshiConverterFactory
|
||||
import retrofit2.create
|
||||
|
|
|
@ -47,6 +47,6 @@ dependencies {
|
|||
implementation(Dependencies.ThirdParty.pullToRefresh)
|
||||
implementation(Dependencies.ThirdParty.Retrofit.moshi)
|
||||
implementation(Dependencies.ThirdParty.SQLDelight.androidDriver)
|
||||
testImplementation(Dependencies.Testing.junit)
|
||||
androidTestImplementation(Dependencies.AndroidX.Compose.activity)
|
||||
testImplementation(kotlin("test-junit"))
|
||||
androidTestImplementation(kotlin("test-junit"))
|
||||
}
|
||||
|
|
|
@ -15,8 +15,8 @@ import com.karumi.shot.ScreenshotTest
|
|||
import dev.msfjarvis.lobsters.ui.DarkTestTheme
|
||||
import dev.msfjarvis.lobsters.ui.main.LobstersBottomNav
|
||||
import dev.msfjarvis.lobsters.ui.theme.LobstersTheme
|
||||
import kotlin.test.Test
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
|
||||
class LobstersBottomNavTest : ScreenshotTest {
|
||||
|
||||
|
|
|
@ -13,8 +13,8 @@ import androidx.compose.ui.test.onRoot
|
|||
import com.karumi.shot.ScreenshotTest
|
||||
import dev.msfjarvis.lobsters.ui.DarkTestTheme
|
||||
import java.time.Month
|
||||
import kotlin.test.Test
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
|
||||
class HeaderTest : ScreenshotTest {
|
||||
@get:Rule
|
||||
|
|
|
@ -6,8 +6,8 @@ import androidx.compose.ui.test.junit4.createComposeRule
|
|||
import androidx.compose.ui.test.onRoot
|
||||
import com.karumi.shot.ScreenshotTest
|
||||
import dev.msfjarvis.lobsters.ui.DarkTestTheme
|
||||
import kotlin.test.Test
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
|
||||
class LobstersItemTest : ScreenshotTest {
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package dev.msfjarvis.lobsters.util
|
||||
|
||||
import java.time.Month
|
||||
import org.junit.Assert.*
|
||||
import org.junit.Test
|
||||
import kotlin.test.Test
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
class DateExtensionsTest {
|
||||
@Test
|
||||
|
|
|
@ -94,7 +94,6 @@ object Dependencies {
|
|||
|
||||
object Testing {
|
||||
|
||||
const val junit = "junit:junit:4.13.2"
|
||||
const val mockWebServer = "com.squareup.okhttp3:mockwebserver3-junit4:5.0.0-alpha.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,5 +44,28 @@ kotlin {
|
|||
implementation(compose.runtime)
|
||||
}
|
||||
}
|
||||
|
||||
val androidTest by getting {
|
||||
dependencies {
|
||||
implementation(kotlin("test-junit"))
|
||||
}
|
||||
}
|
||||
|
||||
val jvmTest by getting {
|
||||
dependencies {
|
||||
implementation(kotlin("test-junit"))
|
||||
}
|
||||
}
|
||||
|
||||
val commonTest by getting {
|
||||
dependencies {
|
||||
implementation(kotlin("test-common"))
|
||||
implementation(kotlin("test-annotations-common"))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
android {
|
||||
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
|
||||
}
|
||||
|
|
|
@ -7,5 +7,5 @@ plugins {
|
|||
dependencies {
|
||||
testImplementation(Dependencies.Kotlin.Coroutines.core)
|
||||
testImplementation(Dependencies.ThirdParty.SQLDelight.jvmDriver)
|
||||
testImplementation(Dependencies.Testing.junit)
|
||||
testImplementation(kotlin("test-junit"))
|
||||
}
|
||||
|
|
|
@ -3,10 +3,10 @@ package dev.msfjarvis.lobsters.data.local
|
|||
import com.squareup.sqldelight.sqlite.driver.JdbcSqliteDriver
|
||||
import dev.msfjarvis.lobsters.database.LobstersDatabase
|
||||
import dev.msfjarvis.lobsters.model.TagsAdapter
|
||||
import kotlin.test.Test
|
||||
import kotlin.test.assertEquals
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Before
|
||||
import org.junit.Test
|
||||
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
class SqlDelightQueriesTest {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue