From 13429e38d5a569e2f479283f24ebee08eecea88c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Dec 2024 17:40:47 +0000 Subject: [PATCH] chore(test): use `JsonValue` instead of `JsonString` (#16) --- .../test/kotlin/com/anthropic/services/ErrorHandlingTest.kt | 3 +-- .../test/kotlin/com/anthropic/services/ServiceParamsTest.kt | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/anthropic-java-core/src/test/kotlin/com/anthropic/services/ErrorHandlingTest.kt b/anthropic-java-core/src/test/kotlin/com/anthropic/services/ErrorHandlingTest.kt index cb9f15a..d5aa333 100644 --- a/anthropic-java-core/src/test/kotlin/com/anthropic/services/ErrorHandlingTest.kt +++ b/anthropic-java-core/src/test/kotlin/com/anthropic/services/ErrorHandlingTest.kt @@ -4,7 +4,6 @@ package com.anthropic.services import com.anthropic.client.AnthropicClient import com.anthropic.client.okhttp.AnthropicOkHttpClient -import com.anthropic.core.JsonString import com.anthropic.core.JsonValue import com.anthropic.core.http.Headers import com.anthropic.core.jsonMapper @@ -39,7 +38,7 @@ class ErrorHandlingTest { private val JSON_MAPPER: JsonMapper = jsonMapper() private val ANTHROPIC_ERROR: AnthropicError = - AnthropicError.builder().putAdditionalProperty("key", JsonString.of("value")).build() + AnthropicError.builder().putAdditionalProperty("key", JsonValue.from("value")).build() private lateinit var client: AnthropicClient diff --git a/anthropic-java-core/src/test/kotlin/com/anthropic/services/ServiceParamsTest.kt b/anthropic-java-core/src/test/kotlin/com/anthropic/services/ServiceParamsTest.kt index 9fa9ff7..32fd07d 100644 --- a/anthropic-java-core/src/test/kotlin/com/anthropic/services/ServiceParamsTest.kt +++ b/anthropic-java-core/src/test/kotlin/com/anthropic/services/ServiceParamsTest.kt @@ -4,7 +4,6 @@ package com.anthropic.services import com.anthropic.client.AnthropicClient import com.anthropic.client.okhttp.AnthropicOkHttpClient -import com.anthropic.core.JsonString import com.anthropic.core.JsonValue import com.anthropic.core.jsonMapper import com.anthropic.models.* @@ -51,7 +50,7 @@ class ServiceParamsTest { val additionalBodyProperties = mutableMapOf() - additionalBodyProperties.put("testBodyProperty", JsonString.of("ghi890")) + additionalBodyProperties.put("testBodyProperty", JsonValue.from("ghi890")) val params = MessageCreateParams.builder()