Skip to content

Commit

Permalink
unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chrishonson committed Nov 26, 2023
1 parent 50f5b99 commit fe37dc1
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
7 changes: 4 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ kotlin = "1.9.10"
compose = "1.5.4"
compose-compiler = "1.5.3"
compose-material3 = "1.1.2"
androidx-activityCompose = "1.8.0"
androidx-activityCompose = "1.8.1"
kotlinxCoroutinesCore = "1.7.1"
kotlinxDatetime = "0.4.0"
ktorVersion = "2.3.2"
animationCoreAndroid = "1.5.4"
animationAndroid = "1.5.4"
uiToolingPreviewAndroid = "1.5.4"
uiToolingPreviewDesktop = "1.6.0-alpha08"
uiToolingPreviewDesktop = "1.6.0-beta01"
appcompat = "1.6.1"
mockk = "1.12.4"

Expand Down Expand Up @@ -46,4 +46,5 @@ androidLibrary = { id = "com.android.library", version.ref = "android-gradle-plu
kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
kotlinCocoapods = { id = "org.jetbrains.kotlin.native.cocoapods", version.ref = "kotlin" }
compose = {id = "org.jetbrains.compose", version.ref = "compose-compiler"}
compose = {id = "org.jetbrains.compose", version.ref = "compose-compiler"}
serialization = {id = "plugin.serialization", version.ref = "kotlin"}
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sun Oct 22 16:56:53 CDT 2023
#Sat Nov 25 19:59:47 CST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class AndroidGreetingTest {
@Test
fun testExample() {
runTest{
val mockEngine = MockEngine { request ->
val mockEngine = MockEngine { _ ->
respond(
content = ByteReadChannel("""[{"name":"CTS21","flight_number":42,"success":true,"date_utc":"2021-09-15T00:00:00Z"}]"""),
status = HttpStatusCode.OK,
Expand Down
4 changes: 2 additions & 2 deletions shared/src/commonTest/kotlin/com/example/kmptemplate/Test.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class CommonGreetingTest {

fun testExample() {
runTest{
val mockEngine = MockEngine { request ->
val mockEngine = MockEngine { _ ->
respond(
content = ByteReadChannel("""[{"name":"CTS21","flight_number":42,"success":true,"date_utc":"2021-09-15T00:00:00Z"}]"""),
status = HttpStatusCode.OK,
Expand All @@ -34,7 +34,7 @@ class CommonGreetingTest {
}
}
assertTrue {
"Check 2021-09 is mentioned".equals( Greeting(mockHttpClient).greet().contains("Greetings!"))
Greeting(mockHttpClient).greet().contains("Greetings!")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class IosGreetingTest {
}
}
assertTrue {
"Check 2021-09 is mentioned".equals( Greeting(mockHttpClient).greet().contains("Greetings!"))
Greeting(mockHttpClient).greet().contains("Greetings!")
}

}
Expand Down

0 comments on commit fe37dc1

Please sign in to comment.