Class JsonContent<T>
- java.lang.Object
- org.springframework.boot.test.json.JsonContent<T>
- Type Parameters:
T
- the source type that created the content
- All Implemented Interfaces:
org.assertj.core.api.AssertProvider<JsonContentAssert>
public final class JsonContent<T> extends Object implements org.assertj.core.api.AssertProvider<JsonContentAssert>
JSON content created usually from a JSON tester. Generally used only toprovide
JsonContentAssert
to AssertJassertThat
calls.- Since:
- 1.4.0
Constructor Summary
Constructors Constructor Description JsonContent(Class<?> resourceLoadClass, org.springframework.core.ResolvableType type, String json)
Create a newJsonContent
instance.
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description JsonContentAssert
assertThat()
Deprecated.in favor of AssertJ'sassertThat
String
getJson()
Return the actual JSON content string.String
toString()
Constructor Detail
JsonContent
public JsonContent(Class<?> resourceLoadClass, org.springframework.core.ResolvableType type, String json)
Create a newJsonContent
instance.- Parameters:
resourceLoadClass
- the source class used to load resourcestype
- the type under test (ornull
if not known)json
- the actual JSON content
Method Detail
assertThat
@Deprecated public JsonContentAssert assertThat()
Deprecated.in favor of AssertJ'sassertThat
Use AssertJ'sassertThat
instead.- Specified by:
assertThat
in interfaceorg.assertj.core.api.AssertProvider<T>