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 418902b commit 50f5b99
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 51 deletions.
45 changes: 0 additions & 45 deletions .github/workflows/appium-tests.yml

This file was deleted.

4 changes: 1 addition & 3 deletions shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ kotlin {
val commonTest by getting {
dependencies {
implementation(libs.kotlin.test)
implementation(libs.ktor.client.mock)
}
}
}
Expand All @@ -82,8 +83,5 @@ dependencies {
implementation(libs.androidx.animation.android)
implementation(libs.androidx.ui.tooling.preview.android)
implementation(libs.androidx.ui.tooling.preview.desktop)
testImplementation(libs.mockk)
testImplementation(libs.mockk)
testImplementation(libs.ktor.client.mock)
debugImplementation(libs.compose.ui.tooling.preview)
}
6 changes: 4 additions & 2 deletions shared/src/commonTest/kotlin/com/example/kmptemplate/Test.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.example.kmptemplate

import Greeting
import io.ktor.client.*
import io.ktor.client.engine.mock.*
import io.ktor.client.plugins.contentnegotiation.*
import io.ktor.http.*
import io.ktor.serialization.kotlinx.json.*
Expand Down Expand Up @@ -32,8 +33,9 @@ class CommonGreetingTest {
})
}
}
assertTrue("Check 2021-09 is mentioned", Greeting(mockHttpClient).greet().contains("Greetings!"))

assertTrue {
"Check 2021-09 is mentioned".equals( Greeting(mockHttpClient).greet().contains("Greetings!"))
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ class IosGreetingTest {
})
}
}
assertTrue("Check 2021-09 is mentioned", Greeting(mockHttpClient).greet().contains("Greetings!"))
assertTrue {
"Check 2021-09 is mentioned".equals( Greeting(mockHttpClient).greet().contains("Greetings!"))
}

}
}
Expand Down

0 comments on commit 50f5b99

Please sign in to comment.