JsonContentAssert
AssertJ Assert for JsonContent.
Author
Phillip Webb
Andy Wilkinson
Diego Berrueta
Camille Vienot
Since
1.4.0
Constructors
Link copied to clipboard
Create a new JsonContentAssert instance that will load resources as UTF-8.
Create a new JsonContentAssert instance that will load resources in the given
charset
.Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun doesNotHaveEmptyJsonPathValue(expression: CharSequence, args: Array<Any>): JsonContentAssert
Verify that the actual value at the given JSON path does not produce an empty result.
Link copied to clipboard
Verify that the JSON path is not present, even if it has a
null
value.Link copied to clipboard
Verify that the actual value at the given JSON path produces no result.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun <E> extractingJsonPathArrayValue(expression: CharSequence, args: Array<Any>): ListAssert<E>
Extract the array value at the given JSON path for further object assertions.
Link copied to clipboard
open fun extractingJsonPathBooleanValue(expression: CharSequence, args: Array<Any>): AbstractBooleanAssert<out Any>
Extract the boolean value at the given JSON path for further object assertions.
Link copied to clipboard
open fun <K, V> extractingJsonPathMapValue(expression: CharSequence, args: Array<Any>): MapAssert<K, V>
Extract the map value at the given JSON path for further object assertions.
Link copied to clipboard
open fun extractingJsonPathNumberValue(expression: CharSequence, args: Array<Any>): AbstractObjectAssert<out Any, Number>
Extract the number value at the given JSON path for further object assertions.
Link copied to clipboard
open fun extractingJsonPathStringValue(expression: CharSequence, args: Array<Any>): AbstractCharSequenceAssert<out Any, String>
Extract the string value at the given JSON path for further object assertions.
Link copied to clipboard
open fun extractingJsonPathValue(expression: CharSequence, args: Array<Any>): AbstractObjectAssert<out Any, Any>
Extract the value at the given JSON path for further object assertions.
Link copied to clipboard
Link copied to clipboard
Verify that the actual value at the given JSON path produces an empty result.
Link copied to clipboard
Verify that the JSON path is present without checking if it has a value.
Link copied to clipboard
Verify that the actual value at the given JSON path produces a non-null array result.
Link copied to clipboard
Verify that the actual value at the given JSON path produces a non-null boolean result.
Link copied to clipboard
Verify that the actual value at the given JSON path produces a non-null map result.
Link copied to clipboard
Verify that the actual value at the given JSON path produces a non-null number result.
Link copied to clipboard
Verify that the actual value at the given JSON path produces a non-null string result.
Link copied to clipboard
Verify that the actual value at the given JSON path produces a non-null result.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Overridden version of
isEqualTo
to perform JSON tests based on the object type.Link copied to clipboard
Verifies that the actual value is leniently equal to the specified JSON bytes.
Verifies that the actual value is leniently equal to the specified JSON file.
Verifies that the actual value is leniently equal to the specified JSON input stream.
Verifies that the actual value is leniently equal to the specified JSON.
Verifies that the actual value is leniently equal to the specified JSON resource.
Verifies that the actual value is equal to the specified JSON bytes.
Verifies that the actual value is equal to the specified JSON file.
Verifies that the actual value is equal to the specified JSON input stream.
Verifies that the actual value is equal to the specified JSON.
open fun isEqualToJson(path: String, resourceLoadClass: Class<out Any>, compareMode: JSONCompareMode): JsonContentAssert
open fun isEqualToJson(path: String, resourceLoadClass: Class<out Any>, comparator: JSONComparator): JsonContentAssert
Verifies that the actual value is equal to the specified JSON resource.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Overridden version of
isNotEqualTo
to perform JSON tests based on the object type.Link copied to clipboard
Verifies that the actual value is not leniently equal to the specified JSON bytes.
Verifies that the actual value is not leniently equal to the specified JSON file.
Verifies that the actual value is not leniently equal to the specified JSON input stream.
Verifies that the actual value is not leniently equal to the specified JSON.
Verifies that the actual value is not leniently equal to the specified JSON resource.
Verifies that the actual value is not equal to the specified JSON bytes.
Verifies that the actual value is not equal to the specified JSON file.
Verifies that the actual value is not equal to the specified JSON input stream.
Verifies that the actual value is not equal to the specified JSON.
open fun isNotEqualToJson(path: String, resourceLoadClass: Class<out Any>, compareMode: JSONCompareMode): JsonContentAssert
open fun isNotEqualToJson(path: String, resourceLoadClass: Class<out Any>, comparator: JSONComparator): JsonContentAssert
Verifies that the actual value is not equal to the specified JSON resource.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Verifies that the actual value is not strictly equal to the specified JSON bytes.
Verifies that the actual value is not strictly equal to the specified JSON file.
Verifies that the actual value is not strictly equal to the specified JSON input stream.
Verifies that the actual value is not strictly equal to the specified JSON.
open fun isNotStrictlyEqualToJson(path: String, resourceLoadClass: Class<out Any>): JsonContentAssert
Verifies that the actual value is not strictly equal to the specified JSON resource.
Link copied to clipboard
Link copied to clipboard
Verifies that the actual value is strictly equal to the specified JSON bytes.
Verifies that the actual value is strictly equal to the specified JSON file.
Verifies that the actual value is strictly equal to the specified JSON input stream.
Verifies that the actual value is strictly equal to the specified JSON.
Verifies that the actual value is strictly equal to the specified JSON resource.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard