Cleaned up more tests
This commit is contained in:
parent
656740b748
commit
ee74cf0cc4
2 changed files with 6 additions and 3 deletions
|
@ -12,7 +12,7 @@ plugins {
|
|||
id("java")
|
||||
id("maven-publish")
|
||||
id("org.jetbrains.dokka") version "1.7.10"
|
||||
id("org.jetbrains.kotlinx.kover") version "0.6.0"
|
||||
id("org.jetbrains.kotlinx.kover") version "0.6.1"
|
||||
id("org.sonarqube") version "3.4.0.2513"
|
||||
id("signing")
|
||||
kotlin("jvm") version "1.7.20"
|
||||
|
|
|
@ -37,6 +37,7 @@ import assertk.assertThat
|
|||
import assertk.assertions.contains
|
||||
import assertk.assertions.isEqualTo
|
||||
import assertk.assertions.isGreaterThan
|
||||
import assertk.assertions.isNotNull
|
||||
import assertk.assertions.prop
|
||||
import net.thauvin.erik.crypto.CryptoPrice.Companion.apiCall
|
||||
import net.thauvin.erik.crypto.CryptoPrice.Companion.buyPrice
|
||||
|
@ -142,8 +143,10 @@ class CryptoPriceTest {
|
|||
try {
|
||||
sellPrice("FOOBAR")
|
||||
} catch (e: CryptoException) {
|
||||
assertThat(e, "sellPrice(FOOBAR)").prop(CryptoException::statusCode).isEqualTo(404)
|
||||
assertThat(e.message!!, "sellPrice(FOOBAR)").contains("invalid", true)
|
||||
assertThat(e, "sellPrice(FOOBAR)").all {
|
||||
prop(CryptoException::statusCode).isEqualTo(404)
|
||||
prop(CryptoException::message).isNotNull().contains("invalid", true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue