Skip to content

Commit

Permalink
chore(test): use JsonValue instead of JsonString (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Dec 12, 2024
1 parent 9315104 commit 13429e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.*
Expand Down Expand Up @@ -51,7 +50,7 @@ class ServiceParamsTest {

val additionalBodyProperties = mutableMapOf<String, JsonValue>()

additionalBodyProperties.put("testBodyProperty", JsonString.of("ghi890"))
additionalBodyProperties.put("testBodyProperty", JsonValue.from("ghi890"))

val params =
MessageCreateParams.builder()
Expand Down

0 comments on commit 13429e3

Please sign in to comment.