public class JsonContentAssert extends org.assertj.core.api.AbstractAssert<JsonContentAssert,CharSequence>
Assert
for JsonContent
.Constructor and Description |
---|
JsonContentAssert(Class<?> resourceLoadClass,
CharSequence json)
Create a new
JsonContentAssert instance that will load resources as UTF-8. |
JsonContentAssert(Class<?> resourceLoadClass,
Charset charset,
CharSequence json)
Create a new
JsonContentAssert instance that will load resources in the
given charset . |
Modifier and Type | Method and Description |
---|---|
JsonContentAssert |
doesNotHaveEmptyJsonPathValue(CharSequence expression,
Object... args)
Verify that the actual value at the given JSON path does not produce an
empty result. |
JsonContentAssert |
doesNotHaveJsonPath(CharSequence expression,
Object... args)
Verify that the JSON path is not present, even if it has a
null value. |
JsonContentAssert |
doesNotHaveJsonPathValue(CharSequence expression,
Object... args)
Verify that the actual value at the given JSON path produces no result.
|
<E> org.assertj.core.api.ListAssert<E> |
extractingJsonPathArrayValue(CharSequence expression,
Object... args)
Extract the array value at the given JSON path for further object assertions.
|
org.assertj.core.api.AbstractBooleanAssert<?> |
extractingJsonPathBooleanValue(CharSequence expression,
Object... args)
Extract the boolean value at the given JSON path for further object assertions.
|
<K,V> org.assertj.core.api.MapAssert<K,V> |
extractingJsonPathMapValue(CharSequence expression,
Object... args)
Extract the map value at the given JSON path for further object assertions.
|
org.assertj.core.api.AbstractObjectAssert<?,Number> |
extractingJsonPathNumberValue(CharSequence expression,
Object... args)
Extract the number value at the given JSON path for further object assertions.
|
org.assertj.core.api.AbstractCharSequenceAssert<?,String> |
extractingJsonPathStringValue(CharSequence expression,
Object... args)
Extract the string value at the given JSON path for further object assertions.
|
org.assertj.core.api.AbstractObjectAssert<?,Object> |
extractingJsonPathValue(CharSequence expression,
Object... args)
Extract the value at the given JSON path for further object assertions.
|
JsonContentAssert |
hasEmptyJsonPathValue(CharSequence expression,
Object... args)
Verify that the actual value at the given JSON path produces an
empty result. |
JsonContentAssert |
hasJsonPath(CharSequence expression,
Object... args)
Verify that the JSON path is present without checking if it has a value.
|
JsonContentAssert |
hasJsonPathArrayValue(CharSequence expression,
Object... args)
Verify that the actual value at the given JSON path produces a non-null array
result.
|
JsonContentAssert |
hasJsonPathBooleanValue(CharSequence expression,
Object... args)
Verify that the actual value at the given JSON path produces a non-null boolean
result.
|
JsonContentAssert |
hasJsonPathMapValue(CharSequence expression,
Object... args)
Verify that the actual value at the given JSON path produces a non-null map result.
|
JsonContentAssert |
hasJsonPathNumberValue(CharSequence expression,
Object... args)
Verify that the actual value at the given JSON path produces a non-null number
result.
|
JsonContentAssert |
hasJsonPathStringValue(CharSequence expression,
Object... args)
Verify that the actual value at the given JSON path produces a non-null string
result.
|
JsonContentAssert |
hasJsonPathValue(CharSequence expression,
Object... args)
Verify that the actual value at the given JSON path produces a non-null result.
|
JsonContentAssert |
isEqualTo(Object expected)
Overridden version of
isEqualTo to perform JSON tests based on the object
type. |
JsonContentAssert |
isEqualToJson(byte[] expected)
Verifies that the actual value is
leniently equal
to the specified JSON bytes. |
JsonContentAssert |
isEqualToJson(byte[] expected,
org.skyscreamer.jsonassert.comparator.JSONComparator comparator)
Verifies that the actual value is equal to the specified JSON bytes.
|
JsonContentAssert |
isEqualToJson(byte[] expected,
org.skyscreamer.jsonassert.JSONCompareMode compareMode)
Verifies that the actual value is equal to the specified JSON bytes.
|
JsonContentAssert |
isEqualToJson(CharSequence expected)
Verifies that the actual value is
leniently equal
to the specified JSON. |
JsonContentAssert |
isEqualToJson(CharSequence expected,
org.skyscreamer.jsonassert.comparator.JSONComparator comparator)
Verifies that the actual value is equal to the specified JSON.
|
JsonContentAssert |
isEqualToJson(CharSequence expected,
org.skyscreamer.jsonassert.JSONCompareMode compareMode)
Verifies that the actual value is equal to the specified JSON.
|
JsonContentAssert |
isEqualToJson(File expected)
Verifies that the actual value is
leniently equal
to the specified JSON file. |
JsonContentAssert |
isEqualToJson(File expected,
org.skyscreamer.jsonassert.comparator.JSONComparator comparator)
Verifies that the actual value is equal to the specified JSON file.
|
JsonContentAssert |
isEqualToJson(File expected,
org.skyscreamer.jsonassert.JSONCompareMode compareMode)
Verifies that the actual value is equal to the specified JSON file.
|
JsonContentAssert |
isEqualToJson(InputStream expected)
Verifies that the actual value is
leniently equal
to the specified JSON input stream. |
JsonContentAssert |
isEqualToJson(InputStream expected,
org.skyscreamer.jsonassert.comparator.JSONComparator comparator)
Verifies that the actual value is equal to the specified JSON input stream.
|
JsonContentAssert |
isEqualToJson(InputStream expected,
org.skyscreamer.jsonassert.JSONCompareMode compareMode)
Verifies that the actual value is equal to the specified JSON input stream.
|
JsonContentAssert |
isEqualToJson(Resource expected)
Verifies that the actual value is
leniently equal
to the specified JSON resource. |
JsonContentAssert |
isEqualToJson(Resource expected,
org.skyscreamer.jsonassert.comparator.JSONComparator comparator)
Verifies that the actual value is equal to the specified JSON resource.
|
JsonContentAssert |
isEqualToJson(Resource expected,
org.skyscreamer.jsonassert.JSONCompareMode compareMode)
Verifies that the actual value is equal to the specified JSON resource.
|
JsonContentAssert |
isEqualToJson(String path,
Class<?> resourceLoadClass)
Verifies that the actual value is
leniently equal
to the specified JSON resource. |
JsonContentAssert |
isEqualToJson(String path,
Class<?> resourceLoadClass,
org.skyscreamer.jsonassert.comparator.JSONComparator comparator)
Verifies that the actual value is equal to the specified JSON resource.
|
JsonContentAssert |
isEqualToJson(String path,
Class<?> resourceLoadClass,
org.skyscreamer.jsonassert.JSONCompareMode compareMode)
Verifies that the actual value is equal to the specified JSON resource.
|
JsonContentAssert |
isNotEqualTo(Object expected)
Overridden version of
isNotEqualTo to perform JSON tests based on the
object type. |
JsonContentAssert |
isNotEqualToJson(byte[] expected)
Verifies that the actual value is not
leniently
equal to the specified JSON bytes. |
JsonContentAssert |
isNotEqualToJson(byte[] expected,
org.skyscreamer.jsonassert.comparator.JSONComparator comparator)
Verifies that the actual value is not equal to the specified JSON bytes.
|
JsonContentAssert |
isNotEqualToJson(byte[] expected,
org.skyscreamer.jsonassert.JSONCompareMode compareMode)
Verifies that the actual value is not equal to the specified JSON bytes.
|
JsonContentAssert |
isNotEqualToJson(CharSequence expected)
Verifies that the actual value is not
leniently
equal to the specified JSON. |
JsonContentAssert |
isNotEqualToJson(CharSequence expected,
org.skyscreamer.jsonassert.comparator.JSONComparator comparator)
Verifies that the actual value is not equal to the specified JSON.
|
JsonContentAssert |
isNotEqualToJson(CharSequence expected,
org.skyscreamer.jsonassert.JSONCompareMode compareMode)
Verifies that the actual value is not equal to the specified JSON.
|
JsonContentAssert |
isNotEqualToJson(File expected)
Verifies that the actual value is not
leniently
equal to the specified JSON file. |
JsonContentAssert |
isNotEqualToJson(File expected,
org.skyscreamer.jsonassert.comparator.JSONComparator comparator)
Verifies that the actual value is not equal to the specified JSON file.
|
JsonContentAssert |
isNotEqualToJson(File expected,
org.skyscreamer.jsonassert.JSONCompareMode compareMode)
Verifies that the actual value is not equal to the specified JSON file.
|
JsonContentAssert |
isNotEqualToJson(InputStream expected)
Verifies that the actual value is not
leniently
equal to the specified JSON input stream. |
JsonContentAssert |
isNotEqualToJson(InputStream expected,
org.skyscreamer.jsonassert.comparator.JSONComparator comparator)
Verifies that the actual value is not equal to the specified JSON input stream.
|
JsonContentAssert |
isNotEqualToJson(InputStream expected,
org.skyscreamer.jsonassert.JSONCompareMode compareMode)
Verifies that the actual value is not equal to the specified JSON input stream.
|
JsonContentAssert |
isNotEqualToJson(Resource expected)
Verifies that the actual value is not
leniently
equal to the specified JSON resource. |
JsonContentAssert |
isNotEqualToJson(Resource expected,
org.skyscreamer.jsonassert.comparator.JSONComparator comparator)
Verifies that the actual value is not equal to the specified JSON resource.
|
JsonContentAssert |
isNotEqualToJson(Resource expected,
org.skyscreamer.jsonassert.JSONCompareMode compareMode)
Verifies that the actual value is not equal to the specified JSON resource.
|
JsonContentAssert |
isNotEqualToJson(String path,
Class<?> resourceLoadClass)
Verifies that the actual value is not
leniently
equal to the specified JSON resource. |
JsonContentAssert |
isNotEqualToJson(String path,
Class<?> resourceLoadClass,
org.skyscreamer.jsonassert.comparator.JSONComparator comparator)
Verifies that the actual value is not equal to the specified JSON resource.
|
JsonContentAssert |
isNotEqualToJson(String path,
Class<?> resourceLoadClass,
org.skyscreamer.jsonassert.JSONCompareMode compareMode)
Verifies that the actual value is not equal to the specified JSON resource.
|
JsonContentAssert |
isNotStrictlyEqualToJson(byte[] expected)
Verifies that the actual value is not
strictly equal
to the specified JSON bytes. |
JsonContentAssert |
isNotStrictlyEqualToJson(CharSequence expected)
Verifies that the actual value is not
strictly equal
to the specified JSON. |
JsonContentAssert |
isNotStrictlyEqualToJson(File expected)
Verifies that the actual value is not
strictly equal
to the specified JSON file. |
JsonContentAssert |
isNotStrictlyEqualToJson(InputStream expected)
Verifies that the actual value is not
strictly equal
to the specified JSON input stream. |
JsonContentAssert |
isNotStrictlyEqualToJson(Resource expected)
Verifies that the actual value is not
strictly equal
to the specified JSON resource. |
JsonContentAssert |
isNotStrictlyEqualToJson(String path,
Class<?> resourceLoadClass)
Verifies that the actual value is not
strictly equal
to the specified JSON resource. |
JsonContentAssert |
isStrictlyEqualToJson(byte[] expected)
Verifies that the actual value is
strictly equal to
the specified JSON bytes. |
JsonContentAssert |
isStrictlyEqualToJson(CharSequence expected)
Verifies that the actual value is
strictly equal to
the specified JSON. |
JsonContentAssert |
isStrictlyEqualToJson(File expected)
Verifies that the actual value is
strictly equal to
the specified JSON file. |
JsonContentAssert |
isStrictlyEqualToJson(InputStream expected)
Verifies that the actual value is
strictly equal to
the specified JSON input stream. |
JsonContentAssert |
isStrictlyEqualToJson(Resource expected)
Verifies that the actual value is
strictly equal to
the specified JSON resource. |
JsonContentAssert |
isStrictlyEqualToJson(String path,
Class<?> resourceLoadClass)
Verifies that the actual value is
strictly equal to
the specified JSON resource. |
asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, inBinary, inHexadecimal, is, isElementOfCustomAssert, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, newListAssertInstance, overridingErrorMessage, overridingErrorMessage, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOf, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, usingRecursiveComparison, usingRecursiveComparison, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnError
public JsonContentAssert(Class<?> resourceLoadClass, CharSequence json)
JsonContentAssert
instance that will load resources as UTF-8.resourceLoadClass
- the source class used to load resourcesjson
- the actual JSON contentpublic JsonContentAssert(Class<?> resourceLoadClass, Charset charset, CharSequence json)
JsonContentAssert
instance that will load resources in the
given charset
.resourceLoadClass
- the source class used to load resourcescharset
- the charset of the JSON resourcesjson
- the actual JSON contentpublic JsonContentAssert isEqualTo(Object expected)
isEqualTo
to perform JSON tests based on the object
type.isEqualTo
in interface org.assertj.core.api.Assert<JsonContentAssert,CharSequence>
isEqualTo
in class org.assertj.core.api.AbstractAssert<JsonContentAssert,CharSequence>
AbstractAssert.isEqualTo(java.lang.Object)
public JsonContentAssert isEqualToJson(CharSequence expected)
leniently
equal
to the specified JSON. The expected
value can contain the JSON itself or,
if it ends with .json
, the name of a resource to be loaded using
resourceLoadClass
.expected
- the expected JSON or the name of a resource containing the expected
JSONthis
assertion objectAssertionError
- if the actual JSON value is not equal to the given onepublic JsonContentAssert isEqualToJson(String path, Class<?> resourceLoadClass)
leniently
equal
to the specified JSON resource.path
- the name of a resource containing the expected JSONresourceLoadClass
- the source class used to load the resourcethis
assertion objectAssertionError
- if the actual JSON value is not equal to the given onepublic JsonContentAssert isEqualToJson(byte[] expected)
leniently
equal
to the specified JSON bytes.expected
- the expected JSON bytesthis
assertion objectAssertionError
- if the actual JSON value is not equal to the given onepublic JsonContentAssert isEqualToJson(File expected)
leniently
equal
to the specified JSON file.expected
- a file containing the expected JSONthis
assertion objectAssertionError
- if the actual JSON value is not equal to the given onepublic JsonContentAssert isEqualToJson(InputStream expected)
leniently
equal
to the specified JSON input stream.expected
- an input stream containing the expected JSONthis
assertion objectAssertionError
- if the actual JSON value is not equal to the given onepublic JsonContentAssert isEqualToJson(Resource expected)
leniently
equal
to the specified JSON resource.expected
- a resource containing the expected JSONthis
assertion objectAssertionError
- if the actual JSON value is not equal to the given onepublic JsonContentAssert isStrictlyEqualToJson(CharSequence expected)
strictly
equal to
the specified JSON. The expected
value can contain the JSON itself or, if
it ends with .json
, the name of a resource to be loaded using
resourceLoadClass
.expected
- the expected JSON or the name of a resource containing the expected
JSONthis
assertion objectAssertionError
- if the actual JSON value is not equal to the given onepublic JsonContentAssert isStrictlyEqualToJson(String path, Class<?> resourceLoadClass)
strictly
equal to
the specified JSON resource.path
- the name of a resource containing the expected JSONresourceLoadClass
- the source class used to load the resourcethis
assertion objectAssertionError
- if the actual JSON value is not equal to the given onepublic JsonContentAssert isStrictlyEqualToJson(byte[] expected)
strictly
equal to
the specified JSON bytes.expected
- the expected JSON bytesthis
assertion objectAssertionError
- if the actual JSON value is not equal to the given onepublic JsonContentAssert isStrictlyEqualToJson(File expected)
strictly
equal to
the specified JSON file.expected
- a file containing the expected JSONthis
assertion objectAssertionError
- if the actual JSON value is not equal to the given onepublic JsonContentAssert isStrictlyEqualToJson(InputStream expected)
strictly
equal to
the specified JSON input stream.expected
- an input stream containing the expected JSONthis
assertion objectAssertionError
- if the actual JSON value is not equal to the given onepublic JsonContentAssert isStrictlyEqualToJson(Resource expected)
strictly
equal to
the specified JSON resource.expected
- a resource containing the expected JSONthis
assertion objectAssertionError
- if the actual JSON value is not equal to the given onepublic JsonContentAssert isEqualToJson(CharSequence expected, org.skyscreamer.jsonassert.JSONCompareMode compareMode)
expected
value can contain the JSON itself or, if it ends with .json
, the name of a
resource to be loaded using resourceLoadClass
.expected
- the expected JSON or the name of a resource containing the expected
JSONcompareMode
- the compare mode used when checkingthis
assertion objectAssertionError
- if the actual JSON value is not equal to the given onepublic JsonContentAssert isEqualToJson(String path, Class<?> resourceLoadClass, org.skyscreamer.jsonassert.JSONCompareMode compareMode)
path
- the name of a resource containing the expected JSONresourceLoadClass
- the source class used to load the resourcecompareMode
- the compare mode used when checkingthis
assertion objectAssertionError
- if the actual JSON value is not equal to the given onepublic JsonContentAssert isEqualToJson(byte[] expected, org.skyscreamer.jsonassert.JSONCompareMode compareMode)
expected
- the expected JSON bytescompareMode
- the compare mode used when checkingthis
assertion objectAssertionError
- if the actual JSON value is not equal to the given onepublic JsonContentAssert isEqualToJson(File expected, org.skyscreamer.jsonassert.JSONCompareMode compareMode)
expected
- a file containing the expected JSONcompareMode
- the compare mode used when checkingthis
assertion objectAssertionError
- if the actual JSON value is not equal to the given onepublic JsonContentAssert isEqualToJson(InputStream expected, org.skyscreamer.jsonassert.JSONCompareMode compareMode)
expected
- an input stream containing the expected JSONcompareMode
- the compare mode used when checkingthis
assertion objectAssertionError
- if the actual JSON value is not equal to the given onepublic JsonContentAssert isEqualToJson(Resource expected, org.skyscreamer.jsonassert.JSONCompareMode compareMode)
expected
- a resource containing the expected JSONcompareMode
- the compare mode used when checkingthis
assertion objectAssertionError
- if the actual JSON value is not equal to the given onepublic JsonContentAssert isEqualToJson(CharSequence expected, org.skyscreamer.jsonassert.comparator.JSONComparator comparator)
expected
value can contain the JSON itself or, if it ends with .json
, the name of a
resource to be loaded using resourceLoadClass
.expected
- the expected JSON or the name of a resource containing the expected
JSONcomparator
- the comparator used when checkingthis
assertion objectAssertionError
- if the actual JSON value is not equal to the given onepublic JsonContentAssert isEqualToJson(String path, Class<?> resourceLoadClass, org.skyscreamer.jsonassert.comparator.JSONComparator comparator)
path
- the name of a resource containing the expected JSONresourceLoadClass
- the source class used to load the resourcecomparator
- the comparator used when checkingthis
assertion objectAssertionError
- if the actual JSON value is not equal to the given onepublic JsonContentAssert isEqualToJson(byte[] expected, org.skyscreamer.jsonassert.comparator.JSONComparator comparator)
expected
- the expected JSON bytescomparator
- the comparator used when checkingthis
assertion objectAssertionError
- if the actual JSON value is not equal to the given onepublic JsonContentAssert isEqualToJson(File expected, org.skyscreamer.jsonassert.comparator.JSONComparator comparator)
expected
- a file containing the expected JSONcomparator
- the comparator used when checkingthis
assertion objectAssertionError
- if the actual JSON value is not equal to the given onepublic JsonContentAssert isEqualToJson(InputStream expected, org.skyscreamer.jsonassert.comparator.JSONComparator comparator)
expected
- an input stream containing the expected JSONcomparator
- the comparator used when checkingthis
assertion objectAssertionError
- if the actual JSON value is not equal to the given onepublic JsonContentAssert isEqualToJson(Resource expected, org.skyscreamer.jsonassert.comparator.JSONComparator comparator)
expected
- a resource containing the expected JSONcomparator
- the comparator used when checkingthis
assertion objectAssertionError
- if the actual JSON value is not equal to the given onepublic JsonContentAssert isNotEqualTo(Object expected)
isNotEqualTo
to perform JSON tests based on the
object type.isNotEqualTo
in interface org.assertj.core.api.Assert<JsonContentAssert,CharSequence>
isNotEqualTo
in class org.assertj.core.api.AbstractAssert<JsonContentAssert,CharSequence>
AbstractAssert.isEqualTo(java.lang.Object)
public JsonContentAssert isNotEqualToJson(CharSequence expected)
leniently
equal to the specified JSON. The expected
value can contain the JSON itself
or, if it ends with .json
, the name of a resource to be loaded using
resourceLoadClass
.expected
- the expected JSON or the name of a resource containing the expected
JSONthis
assertion objectAssertionError
- if the actual JSON value is equal to the given onepublic JsonContentAssert isNotEqualToJson(String path, Class<?> resourceLoadClass)
leniently
equal to the specified JSON resource.path
- the name of a resource containing the expected JSONresourceLoadClass
- the source class used to load the resourcethis
assertion objectAssertionError
- if the actual JSON value is equal to the given onepublic JsonContentAssert isNotEqualToJson(byte[] expected)
leniently
equal to the specified JSON bytes.expected
- the expected JSON bytesthis
assertion objectAssertionError
- if the actual JSON value is equal to the given onepublic JsonContentAssert isNotEqualToJson(File expected)
leniently
equal to the specified JSON file.expected
- a file containing the expected JSONthis
assertion objectAssertionError
- if the actual JSON value is equal to the given onepublic JsonContentAssert isNotEqualToJson(InputStream expected)
leniently
equal to the specified JSON input stream.expected
- an input stream containing the expected JSONthis
assertion objectAssertionError
- if the actual JSON value is equal to the given onepublic JsonContentAssert isNotEqualToJson(Resource expected)
leniently
equal to the specified JSON resource.expected
- a resource containing the expected JSONthis
assertion objectAssertionError
- if the actual JSON value is equal to the given onepublic JsonContentAssert isNotStrictlyEqualToJson(CharSequence expected)
strictly
equal
to the specified JSON. The expected
value can contain the JSON itself or,
if it ends with .json
, the name of a resource to be loaded using
resourceLoadClass
.expected
- the expected JSON or the name of a resource containing the expected
JSONthis
assertion objectAssertionError
- if the actual JSON value is equal to the given onepublic JsonContentAssert isNotStrictlyEqualToJson(String path, Class<?> resourceLoadClass)
strictly
equal
to the specified JSON resource.path
- the name of a resource containing the expected JSONresourceLoadClass
- the source class used to load the resourcethis
assertion objectAssertionError
- if the actual JSON value is equal to the given onepublic JsonContentAssert isNotStrictlyEqualToJson(byte[] expected)
strictly
equal
to the specified JSON bytes.expected
- the expected JSON bytesthis
assertion objectAssertionError
- if the actual JSON value is equal to the given onepublic JsonContentAssert isNotStrictlyEqualToJson(File expected)
strictly
equal
to the specified JSON file.expected
- a file containing the expected JSONthis
assertion objectAssertionError
- if the actual JSON value is equal to the given onepublic JsonContentAssert isNotStrictlyEqualToJson(InputStream expected)
strictly
equal
to the specified JSON input stream.expected
- an input stream containing the expected JSONthis
assertion objectAssertionError
- if the actual JSON value is equal to the given onepublic JsonContentAssert isNotStrictlyEqualToJson(Resource expected)
strictly
equal
to the specified JSON resource.expected
- a resource containing the expected JSONthis
assertion objectAssertionError
- if the actual JSON value is equal to the given onepublic JsonContentAssert isNotEqualToJson(CharSequence expected, org.skyscreamer.jsonassert.JSONCompareMode compareMode)
expected
value can contain the JSON itself or, if it ends with
.json
, the name of a resource to be loaded using resourceLoadClass
.expected
- the expected JSON or the name of a resource containing the expected
JSONcompareMode
- the compare mode used when checkingthis
assertion objectAssertionError
- if the actual JSON value is equal to the given onepublic JsonContentAssert isNotEqualToJson(String path, Class<?> resourceLoadClass, org.skyscreamer.jsonassert.JSONCompareMode compareMode)
path
- the name of a resource containing the expected JSONresourceLoadClass
- the source class used to load the resourcecompareMode
- the compare mode used when checkingthis
assertion objectAssertionError
- if the actual JSON value is equal to the given onepublic JsonContentAssert isNotEqualToJson(byte[] expected, org.skyscreamer.jsonassert.JSONCompareMode compareMode)
expected
- the expected JSON bytescompareMode
- the compare mode used when checkingthis
assertion objectAssertionError
- if the actual JSON value is equal to the given onepublic JsonContentAssert isNotEqualToJson(File expected, org.skyscreamer.jsonassert.JSONCompareMode compareMode)
expected
- a file containing the expected JSONcompareMode
- the compare mode used when checkingthis
assertion objectAssertionError
- if the actual JSON value is equal to the given onepublic JsonContentAssert isNotEqualToJson(InputStream expected, org.skyscreamer.jsonassert.JSONCompareMode compareMode)
expected
- an input stream containing the expected JSONcompareMode
- the compare mode used when checkingthis
assertion objectAssertionError
- if the actual JSON value is equal to the given onepublic JsonContentAssert isNotEqualToJson(Resource expected, org.skyscreamer.jsonassert.JSONCompareMode compareMode)
expected
- a resource containing the expected JSONcompareMode
- the compare mode used when checkingthis
assertion objectAssertionError
- if the actual JSON value is equal to the given onepublic JsonContentAssert isNotEqualToJson(CharSequence expected, org.skyscreamer.jsonassert.comparator.JSONComparator comparator)
expected
value can contain the JSON itself or, if it ends with
.json
, the name of a resource to be loaded using resourceLoadClass
.expected
- the expected JSON or the name of a resource containing the expected
JSONcomparator
- the comparator used when checkingthis
assertion objectAssertionError
- if the actual JSON value is equal to the given onepublic JsonContentAssert isNotEqualToJson(String path, Class<?> resourceLoadClass, org.skyscreamer.jsonassert.comparator.JSONComparator comparator)
path
- the name of a resource containing the expected JSONresourceLoadClass
- the source class used to load the resourcecomparator
- the comparator used when checkingthis
assertion objectAssertionError
- if the actual JSON value is equal to the given onepublic JsonContentAssert isNotEqualToJson(byte[] expected, org.skyscreamer.jsonassert.comparator.JSONComparator comparator)
expected
- the expected JSON bytescomparator
- the comparator used when checkingthis
assertion objectAssertionError
- if the actual JSON value is equal to the given onepublic JsonContentAssert isNotEqualToJson(File expected, org.skyscreamer.jsonassert.comparator.JSONComparator comparator)
expected
- a file containing the expected JSONcomparator
- the comparator used when checkingthis
assertion objectAssertionError
- if the actual JSON value is equal to the given onepublic JsonContentAssert isNotEqualToJson(InputStream expected, org.skyscreamer.jsonassert.comparator.JSONComparator comparator)
expected
- an input stream containing the expected JSONcomparator
- the comparator used when checkingthis
assertion objectAssertionError
- if the actual JSON value is equal to the given onepublic JsonContentAssert isNotEqualToJson(Resource expected, org.skyscreamer.jsonassert.comparator.JSONComparator comparator)
expected
- a resource containing the expected JSONcomparator
- the comparator used when checkingthis
assertion objectAssertionError
- if the actual JSON value is equal to the given onepublic JsonContentAssert hasJsonPath(CharSequence expression, Object... args)
expression
- the JsonPath
expressionargs
- arguments to parameterize the JsonPath
expression with, using
formatting specifiers defined in String.format(String, Object...)
this
assertion objectAssertionError
- if the value at the given path is missinghasJsonPathValue(CharSequence, Object...)
public JsonContentAssert hasJsonPathValue(CharSequence expression, Object... args)
expression
- the JsonPath
expressionargs
- arguments to parameterize the JsonPath
expression with, using
formatting specifiers defined in String.format(String, Object...)
this
assertion objectAssertionError
- if the value at the given path is missingpublic JsonContentAssert hasJsonPathStringValue(CharSequence expression, Object... args)
expression
- the JsonPath
expressionargs
- arguments to parameterize the JsonPath
expression with, using
formatting specifiers defined in String.format(String, Object...)
this
assertion objectAssertionError
- if the value at the given path is missing or not a stringpublic JsonContentAssert hasJsonPathNumberValue(CharSequence expression, Object... args)
expression
- the JsonPath
expressionargs
- arguments to parameterize the JsonPath
expression with, using
formatting specifiers defined in String.format(String, Object...)
this
assertion objectAssertionError
- if the value at the given path is missing or not a numberpublic JsonContentAssert hasJsonPathBooleanValue(CharSequence expression, Object... args)
expression
- the JsonPath
expressionargs
- arguments to parameterize the JsonPath
expression with, using
formatting specifiers defined in String.format(String, Object...)
this
assertion objectAssertionError
- if the value at the given path is missing or not a booleanpublic JsonContentAssert hasJsonPathArrayValue(CharSequence expression, Object... args)
expression
- the JsonPath
expressionargs
- arguments to parameterize the JsonPath
expression with, using
formatting specifiers defined in String.format(String, Object...)
this
assertion objectAssertionError
- if the value at the given path is missing or not an arraypublic JsonContentAssert hasJsonPathMapValue(CharSequence expression, Object... args)
expression
- the JsonPath
expressionargs
- arguments to parameterize the JsonPath
expression with, using
formatting specifiers defined in String.format(String, Object...)
this
assertion objectAssertionError
- if the value at the given path is missing or not a mappublic JsonContentAssert hasEmptyJsonPathValue(CharSequence expression, Object... args)
empty
result.expression
- the JsonPath
expressionargs
- arguments to parameterize the JsonPath
expression with, using
formatting specifiers defined in String.format(String, Object...)
this
assertion objectAssertionError
- if the value at the given path is not emptypublic JsonContentAssert doesNotHaveJsonPath(CharSequence expression, Object... args)
null
value.expression
- the JsonPath
expressionargs
- arguments to parameterize the JsonPath
expression with, using
formatting specifiers defined in String.format(String, Object...)
this
assertion objectAssertionError
- if the value at the given path is not missingdoesNotHaveJsonPathValue(CharSequence, Object...)
public JsonContentAssert doesNotHaveJsonPathValue(CharSequence expression, Object... args)
expression
- the JsonPath
expressionargs
- arguments to parameterize the JsonPath
expression with, using
formatting specifiers defined in String.format(String, Object...)
this
assertion objectAssertionError
- if the value at the given path is not missingpublic JsonContentAssert doesNotHaveEmptyJsonPathValue(CharSequence expression, Object... args)
empty
result.expression
- the JsonPath
expressionargs
- arguments to parameterize the JsonPath
expression with, using
formatting specifiers defined in String.format(String, Object...)
this
assertion objectAssertionError
- if the value at the given path is emptypublic org.assertj.core.api.AbstractObjectAssert<?,Object> extractingJsonPathValue(CharSequence expression, Object... args)
expression
- the JsonPath
expressionargs
- arguments to parameterize the JsonPath
expression with, using
formatting specifiers defined in String.format(String, Object...)
AssertionError
- if the path is not validpublic org.assertj.core.api.AbstractCharSequenceAssert<?,String> extractingJsonPathStringValue(CharSequence expression, Object... args)
expression
- the JsonPath
expressionargs
- arguments to parameterize the JsonPath
expression with, using
formatting specifiers defined in String.format(String, Object...)
AssertionError
- if the path is not valid or does not result in a stringpublic org.assertj.core.api.AbstractObjectAssert<?,Number> extractingJsonPathNumberValue(CharSequence expression, Object... args)
expression
- the JsonPath
expressionargs
- arguments to parameterize the JsonPath
expression with, using
formatting specifiers defined in String.format(String, Object...)
AssertionError
- if the path is not valid or does not result in a numberpublic org.assertj.core.api.AbstractBooleanAssert<?> extractingJsonPathBooleanValue(CharSequence expression, Object... args)
expression
- the JsonPath
expressionargs
- arguments to parameterize the JsonPath
expression with, using
formatting specifiers defined in String.format(String, Object...)
AssertionError
- if the path is not valid or does not result in a booleanpublic <E> org.assertj.core.api.ListAssert<E> extractingJsonPathArrayValue(CharSequence expression, Object... args)
E
- element typeexpression
- the JsonPath
expressionargs
- arguments to parameterize the JsonPath
expression with, using
formatting specifiers defined in String.format(String, Object...)
AssertionError
- if the path is not valid or does not result in an arraypublic <K,V> org.assertj.core.api.MapAssert<K,V> extractingJsonPathMapValue(CharSequence expression, Object... args)
K
- key typeV
- value typeexpression
- the JsonPath
expressionargs
- arguments to parameterize the JsonPath
expression with, using
formatting specifiers defined in String.format(String, Object...)
AssertionError
- if the path is not valid or does not result in a map