From 35bc91761ad1f8336f331c6b04cff8bf4d9ae064 Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Mon, 24 Aug 2020 14:28:34 -0300 Subject: Upgrade to Kotlin 1.4 --- merchant-lib/src/test/java/net/taler/merchantlib/MockHttpClient.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'merchant-lib/src/test/java') diff --git a/merchant-lib/src/test/java/net/taler/merchantlib/MockHttpClient.kt b/merchant-lib/src/test/java/net/taler/merchantlib/MockHttpClient.kt index 993be15..c8e6f22 100644 --- a/merchant-lib/src/test/java/net/taler/merchantlib/MockHttpClient.kt +++ b/merchant-lib/src/test/java/net/taler/merchantlib/MockHttpClient.kt @@ -32,6 +32,7 @@ import io.ktor.http.content.TextContent import io.ktor.http.fullPath import io.ktor.http.headersOf import io.ktor.http.hostWithPort +import kotlinx.serialization.json.Json.Default.parseToJsonElement import org.junit.Assert.assertEquals object MockHttpClient { @@ -75,8 +76,8 @@ object MockHttpClient { private val Url.fullUrl: String get() = "${protocol.name}://$hostWithPortIfRequired$fullPath" private fun assertJsonEquals(json1: String, json2: String) { - val parsed1 = kotlinx.serialization.json.Json.parseJson(json1) - val parsed2 = kotlinx.serialization.json.Json.parseJson(json2) + val parsed1 = parseToJsonElement(json1) + val parsed2 = parseToJsonElement(json2) assertEquals(parsed1, parsed2) } -- cgit v1.2.3