类 JsonContent<T>

java.lang.Object
cn.taketoday.framework.test.json.JsonContent<T>
类型参数:
T - the source type that created the content
所有已实现的接口:
org.assertj.core.api.AssertProvider<JsonContentAssert>

public final class JsonContent<T> extends Object implements org.assertj.core.api.AssertProvider<JsonContentAssert>
JSON content usually created from a JSON tester. Generally used only to provide JsonContentAssert to AssertJ assertThat calls.
从以下版本开始:
4.0
作者:
Phillip Webb, Diego Berrueta
  • 字段详细资料

    • resourceLoadClass

      private final Class<?> resourceLoadClass
    • type

      private final cn.taketoday.core.ResolvableType type
    • json

      private final String json
    • configuration

      private final com.jayway.jsonpath.Configuration configuration
  • 构造器详细资料

    • JsonContent

      public JsonContent(Class<?> resourceLoadClass, cn.taketoday.core.ResolvableType type, String json)
      Create a new JsonContent instance.
      参数:
      resourceLoadClass - the source class used to load resources
      type - the type under test (or null if not known)
      json - the actual JSON content
    • JsonContent

      JsonContent(Class<?> resourceLoadClass, cn.taketoday.core.ResolvableType type, String json, com.jayway.jsonpath.Configuration configuration)
      Create a new JsonContent instance.
      参数:
      resourceLoadClass - the source class used to load resources
      type - the type under test (or null if not known)
      json - the actual JSON content
      configuration - the JsonPath configuration
  • 方法详细资料

    • assertThat

      @Deprecated public JsonContentAssert assertThat()
      已过时。
      to prevent accidental use. Prefer standard AssertJ assertThat(context)... calls instead.
      Use AssertJ's assertThat instead.
      指定者:
      assertThat 在接口中 org.assertj.core.api.AssertProvider<T>
    • getJson

      public String getJson()
      Return the actual JSON content string.
      返回:
      the JSON content
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object