isEqualToJson

Verifies that the actual value is 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.

Return

this assertion object

Parameters

expected

the expected JSON or the name of a resource containing the expectedJSON

Throws

if the actual JSON value is not equal to the given one


open fun isEqualToJson(path: String, resourceLoadClass: Class<out Any>): JsonContentAssert

Verifies that the actual value is leniently equal to the specified JSON resource.

Return

this assertion object

Parameters

path

the name of a resource containing the expected JSON

resourceLoadClass

the source class used to load the resource

Throws

if the actual JSON value is not equal to the given one


Verifies that the actual value is leniently equal to the specified JSON bytes.

Return

this assertion object

Parameters

expected

the expected JSON bytes

Throws

if the actual JSON value is not equal to the given one


open fun isEqualToJson(expected: File): JsonContentAssert

Verifies that the actual value is leniently equal to the specified JSON file.

Return

this assertion object

Parameters

expected

a file containing the expected JSON

Throws

if the actual JSON value is not equal to the given one


Verifies that the actual value is leniently equal to the specified JSON input stream.

Return

this assertion object

Parameters

expected

an input stream containing the expected JSON

Throws

if the actual JSON value is not equal to the given one


Verifies that the actual value is leniently equal to the specified JSON resource.

Return

this assertion object

Parameters

expected

a resource containing the expected JSON

Throws

if the actual JSON value is not equal to the given one


open fun isEqualToJson(expected: CharSequence, compareMode: JSONCompareMode): JsonContentAssert

Verifies that the actual value is 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.

Return

this assertion object

Parameters

expected

the expected JSON or the name of a resource containing the expectedJSON

compareMode

the compare mode used when checking

Throws

if the actual JSON value is not equal to the given one


open fun isEqualToJson(path: String, resourceLoadClass: Class<out Any>, compareMode: JSONCompareMode): JsonContentAssert

Verifies that the actual value is equal to the specified JSON resource.

Return

this assertion object

Parameters

path

the name of a resource containing the expected JSON

resourceLoadClass

the source class used to load the resource

compareMode

the compare mode used when checking

Throws

if the actual JSON value is not equal to the given one


open fun isEqualToJson(expected: Array<Byte>, compareMode: JSONCompareMode): JsonContentAssert

Verifies that the actual value is equal to the specified JSON bytes.

Return

this assertion object

Parameters

expected

the expected JSON bytes

compareMode

the compare mode used when checking

Throws

if the actual JSON value is not equal to the given one


open fun isEqualToJson(expected: File, compareMode: JSONCompareMode): JsonContentAssert

Verifies that the actual value is equal to the specified JSON file.

Return

this assertion object

Parameters

expected

a file containing the expected JSON

compareMode

the compare mode used when checking

Throws

if the actual JSON value is not equal to the given one


open fun isEqualToJson(expected: InputStream, compareMode: JSONCompareMode): JsonContentAssert

Verifies that the actual value is equal to the specified JSON input stream.

Return

this assertion object

Parameters

expected

an input stream containing the expected JSON

compareMode

the compare mode used when checking

Throws

if the actual JSON value is not equal to the given one


open fun isEqualToJson(expected: Resource, compareMode: JSONCompareMode): JsonContentAssert

Verifies that the actual value is equal to the specified JSON resource.

Return

this assertion object

Parameters

expected

a resource containing the expected JSON

compareMode

the compare mode used when checking

Throws

if the actual JSON value is not equal to the given one


open fun isEqualToJson(expected: CharSequence, comparator: JSONComparator): JsonContentAssert

Verifies that the actual value is 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.

Return

this assertion object

Parameters

expected

the expected JSON or the name of a resource containing the expectedJSON

comparator

the comparator used when checking

Throws

if the actual JSON value is not equal to the given one


open fun isEqualToJson(path: String, resourceLoadClass: Class<out Any>, comparator: JSONComparator): JsonContentAssert

Verifies that the actual value is equal to the specified JSON resource.

Return

this assertion object

Parameters

path

the name of a resource containing the expected JSON

resourceLoadClass

the source class used to load the resource

comparator

the comparator used when checking

Throws

if the actual JSON value is not equal to the given one


open fun isEqualToJson(expected: Array<Byte>, comparator: JSONComparator): JsonContentAssert

Verifies that the actual value is equal to the specified JSON bytes.

Return

this assertion object

Parameters

expected

the expected JSON bytes

comparator

the comparator used when checking

Throws

if the actual JSON value is not equal to the given one


open fun isEqualToJson(expected: File, comparator: JSONComparator): JsonContentAssert

Verifies that the actual value is equal to the specified JSON file.

Return

this assertion object

Parameters

expected

a file containing the expected JSON

comparator

the comparator used when checking

Throws

if the actual JSON value is not equal to the given one


open fun isEqualToJson(expected: InputStream, comparator: JSONComparator): JsonContentAssert

Verifies that the actual value is equal to the specified JSON input stream.

Return

this assertion object

Parameters

expected

an input stream containing the expected JSON

comparator

the comparator used when checking

Throws

if the actual JSON value is not equal to the given one


open fun isEqualToJson(expected: Resource, comparator: JSONComparator): JsonContentAssert

Verifies that the actual value is equal to the specified JSON resource.

Return

this assertion object

Parameters

expected

a resource containing the expected JSON

comparator

the comparator used when checking

Throws

if the actual JSON value is not equal to the given one