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 toprovideJsonContentAssertto AssertJassertThatcalls.- Since:
- 1.4.0
Constructor Summary
Constructors Constructor Description JsonContent(Class<?> resourceLoadClass, org.springframework.core.ResolvableType type, String json)Create a newJsonContentinstance.
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description JsonContentAssertassertThat()Deprecated.in favor of AssertJ'sassertThatStringgetJson()Return the actual JSON content string.StringtoString()
Constructor Detail
JsonContent
public JsonContent(Class<?> resourceLoadClass, org.springframework.core.ResolvableType type, String json)
Create a newJsonContentinstance.- Parameters:
resourceLoadClass- the source class used to load resourcestype- the type under test (ornullif not known)json- the actual JSON content
Method Detail
assertThat
@Deprecated public JsonContentAssert assertThat()
Deprecated.in favor of AssertJ'sassertThatUse AssertJ'sassertThatinstead.- Specified by:
assertThatin interfaceorg.assertj.core.api.AssertProvider<T>