クラス JsonContent

java.lang.ObjectSE
org.springframework.test.json.JsonContent
実装されているすべてのインターフェース:
org.assertj.core.api.AssertProvider<JsonContentAssert>

public final class JsonContent extends ObjectSE implements org.assertj.core.api.AssertProvider<JsonContentAssert>
一般的に provide JsonContentAssert から AssertJ assertThat 呼び出しに使用される JSON コンテンツ。
導入:
6.2
作成者:
Phillip Webb, Diego Berrueta
  • コンストラクターの詳細

    • JsonContent

      public JsonContent(StringSE json, @Nullable JsonConverterDelegate converterDelegate)
      コンテンツを逆直列化するために使用するメッセージコンバーターを使用して新しい JsonContent インスタンスを作成します。
      パラメーター:
      json - 実際の JSON コンテンツ
      converterDelegate - 使用するコンテンツコンバーター
    • JsonContent

      @DeprecatedSE(since="7.0", forRemoval=true) public JsonContent(StringSE json, @Nullable HttpMessageContentConverter converter)
      非推奨、削除予定: この API 要素は、将来のバージョンで削除される可能性があります。
      コンテンツを逆直列化するために使用するメッセージコンバーターを使用して新しい JsonContent インスタンスを作成します。
      パラメーター:
      json - 実際の JSON コンテンツ
      converter - 使用するコンテンツコンバーター
    • JsonContent

      public JsonContent(StringSE json)
      新しい JsonContent インスタンスを作成します。
      パラメーター:
      json - 実際の JSON コンテンツ
  • メソッドの詳細

    • assertThat

      public JsonContentAssert assertThat()
      代わりに AssertJ の assertThat を使用してください。
      次で指定:
      インターフェース org.assertj.core.api.AssertProvider<JsonContentAssert>assertThat 
    • getJson

      public StringSE getJson()
      実際の JSON コンテンツ文字列を返します。
    • getJsonConverterDelegate

      public @Nullable JsonConverterDelegate getJsonConverterDelegate()
      JSON コンテンツをデコードするために使用する JsonConverterDelegate を返します。
      導入:
      7.0
    • toString

      public StringSE toString()
      オーバーライド:
      クラス ObjectSEtoString