public static class JsonAssert.ConfigurableJsonAssert extends JsonAssert
assertThatJson(...).isEqualsTo(...).when(...);
JsonAssert.ConfigurableJsonAssert| Modifier and Type | Method and Description |
|---|---|
JsonAssert.ConfigurableJsonAssert |
as(org.assertj.core.description.Description description) |
JsonAssert.ConfigurableJsonAssert |
as(String description,
Object... args) |
JsonAssert.ConfigurableJsonAssert |
describedAs(org.assertj.core.description.Description description) |
JsonAssert.ConfigurableJsonAssert |
describedAs(String description,
Object... args) |
JsonAssert |
inPath(String jsonPath) |
JsonAssert.ConfigurableJsonAssert |
when(net.javacrumbs.jsonunit.core.Option first,
net.javacrumbs.jsonunit.core.Option... other)
Adds comparison options.
|
JsonAssert.ConfigurableJsonAssert |
whenIgnoringPaths(String... pathsToBeIgnored)
Makes JsonUnit ignore the specified paths in the actual value.
|
JsonAssert.ConfigurableJsonAssert |
withConfiguration(Function<net.javacrumbs.jsonunit.core.Configuration,net.javacrumbs.jsonunit.core.Configuration> configurationFunction)
Allows to configure like this
assertThatJson(...)
.withConfiguration(c -> c.withMatcher("positive", greaterThan(valueOf(0)))
.... |
JsonAssert.ConfigurableJsonAssert |
withDifferenceListener(net.javacrumbs.jsonunit.core.listener.DifferenceListener differenceListener)
Sets difference listener
|
JsonAssert.ConfigurableJsonAssert |
withIgnorePlaceholder(String ignorePlaceholder)
Sets ignore placeholder.
|
JsonAssert.ConfigurableJsonAssert |
withMatcher(String matcherName,
org.hamcrest.Matcher<?> matcher)
Adds a matcher to be used in ${json-unit.matches:matcherName} macro.
|
JsonAssert.ConfigurableJsonAssert |
withOptions(net.javacrumbs.jsonunit.core.internal.Options options)
Sets comparison options.
|
JsonAssert.ConfigurableJsonAssert |
withTolerance(BigDecimal tolerance)
Sets numerical comparison tolerance.
|
JsonAssert.ConfigurableJsonAssert |
withTolerance(double tolerance)
Sets numerical comparison tolerance.
|
and, asNumber, asString, isAbsent, isArray, isBoolean, isEqualTo, isNotNull, isNull, isNumber, isObject, isPresent, isString, nodeasList, descriptionText, doesNotHave, doesNotHaveSameClassAs, equals, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, inBinary, inHexadecimal, is, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotOfAnyClassIn, isNotSameAs, isOfAnyClassIn, isSameAs, matches, matches, newListAssertInstance, overridingErrorMessage, satisfies, setCustomRepresentation, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, withFailMessage, withRepresentation, withThreadDumpOnErrorpublic JsonAssert.ConfigurableJsonAssert when(net.javacrumbs.jsonunit.core.Option first, net.javacrumbs.jsonunit.core.Option... other)
public JsonAssert.ConfigurableJsonAssert withOptions(net.javacrumbs.jsonunit.core.internal.Options options)
options - public JsonAssert.ConfigurableJsonAssert withConfiguration(Function<net.javacrumbs.jsonunit.core.Configuration,net.javacrumbs.jsonunit.core.Configuration> configurationFunction)
assertThatJson(...)
.withConfiguration(c -> c.withMatcher("positive", greaterThan(valueOf(0)))
....
public JsonAssert.ConfigurableJsonAssert withTolerance(BigDecimal tolerance)
tolerance - public JsonAssert.ConfigurableJsonAssert withTolerance(double tolerance)
tolerance - public JsonAssert.ConfigurableJsonAssert whenIgnoringPaths(String... pathsToBeIgnored)
pathsToBeIgnored - public JsonAssert.ConfigurableJsonAssert withIgnorePlaceholder(String ignorePlaceholder)
ignorePlaceholder - public JsonAssert.ConfigurableJsonAssert withMatcher(String matcherName, org.hamcrest.Matcher<?> matcher)
matcherName - matcher - public JsonAssert.ConfigurableJsonAssert withDifferenceListener(net.javacrumbs.jsonunit.core.listener.DifferenceListener differenceListener)
public JsonAssert inPath(String jsonPath)
public JsonAssert.ConfigurableJsonAssert describedAs(org.assertj.core.description.Description description)
describedAs in interface org.assertj.core.api.Descriptable<JsonAssert>describedAs in class org.assertj.core.api.AbstractAssert<JsonAssert,Object>public JsonAssert.ConfigurableJsonAssert describedAs(String description, Object... args)
describedAs in interface org.assertj.core.api.Descriptable<JsonAssert>describedAs in class org.assertj.core.api.AbstractAssert<JsonAssert,Object>public JsonAssert.ConfigurableJsonAssert as(org.assertj.core.description.Description description)
as in interface org.assertj.core.api.Descriptable<JsonAssert>as in class org.assertj.core.api.AbstractAssert<JsonAssert,Object>public JsonAssert.ConfigurableJsonAssert as(String description, Object... args)
as in interface org.assertj.core.api.Descriptable<JsonAssert>as in class org.assertj.core.api.AbstractAssert<JsonAssert,Object>Copyright © 2019. All rights reserved.