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 usually created from a JSON tester. Generally used only to
 
provide JsonContentAssert to AssertJ assertThat
 calls.- Since:
- 1.4.0
- Author:
- Phillip Webb, Diego Berrueta
- 
Constructor SummaryConstructorsConstructorDescriptionJsonContent(Class<?> resourceLoadClass, ResolvableType type, String json) Create a newJsonContentinstance.
- 
Method Summary
- 
Constructor Details- 
JsonContentCreate a newJsonContentinstance.- Parameters:
- resourceLoadClass- the source class used to load resources
- type- the type under test (or- nullif not known)
- json- the actual JSON content
 
 
- 
- 
Method Details- 
assertThatDeprecated.to prevent accidental use. Prefer standard AssertJassertThat(context)...calls instead.Use AssertJ'sassertThatinstead.- Specified by:
- assertThatin interface- org.assertj.core.api.AssertProvider<T>
 
- 
getJsonReturn the actual JSON content string.- Returns:
- the JSON content
 
- 
toString
 
-