public static class JsonAssert.ConfigurableJsonAssert extends JsonAssert
assertThatJson(...).isEqualsTo(...).when(...);
JsonAssert.ConfigurableJsonAssert| Modifier and Type | Method and Description |
|---|---|
@NotNull JsonAssert.ConfigurableJsonAssert |
as(@NotNull org.assertj.core.description.Description description) |
@NotNull JsonAssert.ConfigurableJsonAssert |
as(@NotNull String description,
Object... args) |
@NotNull JsonAssert.ConfigurableJsonAssert |
describedAs(@NotNull org.assertj.core.description.Description description) |
@NotNull JsonAssert.ConfigurableJsonAssert |
describedAs(@NotNull String description,
Object... args) |
@NotNull JsonAssert |
inPath(@NotNull String jsonPath) |
@NotNull JsonAssert.ConfigurableJsonAssert |
when(@NotNull net.javacrumbs.jsonunit.core.ConfigurationWhen.PathsParam object,
net.javacrumbs.jsonunit.core.ConfigurationWhen.ApplicableForPath... actions)
Adds path specific options.
|
@NotNull JsonAssert.ConfigurableJsonAssert |
when(@NotNull net.javacrumbs.jsonunit.core.Option first,
net.javacrumbs.jsonunit.core.Option... other)
Adds comparison options.
|
@NotNull JsonAssert.ConfigurableJsonAssert |
whenIgnoringPaths(String... pathsToBeIgnored)
Makes JsonUnit ignore the specified paths in the actual value.
|
@NotNull JsonAssert.ConfigurableJsonAssert |
withConfiguration(@NotNull 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)))
.... |
@NotNull JsonAssert.ConfigurableJsonAssert |
withDifferenceListener(@NotNull net.javacrumbs.jsonunit.core.listener.DifferenceListener differenceListener)
Sets difference listener
|
@NotNull JsonAssert.ConfigurableJsonAssert |
withIgnorePlaceholder(@NotNull String ignorePlaceholder)
Sets ignore placeholder.
|
@NotNull JsonAssert.ConfigurableJsonAssert |
withMatcher(@NotNull String matcherName,
@NotNull org.hamcrest.Matcher<?> matcher)
Adds a matcher to be used in ${json-unit.matches:matcherName} macro.
|
@NotNull JsonAssert.ConfigurableJsonAssert |
withOptions(@NotNull net.javacrumbs.jsonunit.core.internal.Options options)
Sets comparison options.
|
@NotNull JsonAssert.ConfigurableJsonAssert |
withTolerance(@Nullable BigDecimal tolerance)
Sets numerical comparison tolerance.
|
@NotNull JsonAssert.ConfigurableJsonAssert |
withTolerance(double tolerance)
Sets numerical comparison tolerance.
|
and, asNumber, asString, isAbsent, isArray, isBoolean, isEqualTo, isNotNull, isNull, isNumber, isObject, isPresent, isString, nodeasInstanceOf, asList, assertionError, 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, satisfies, satisfiesAnyOf, satisfiesAnyOf, setCustomRepresentation, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, usingRecursiveComparison, usingRecursiveComparison, withFailMessage, withRepresentation, withThreadDumpOnError@NotNull public @NotNull JsonAssert.ConfigurableJsonAssert when(@NotNull @NotNull net.javacrumbs.jsonunit.core.Option first, @NotNull net.javacrumbs.jsonunit.core.Option... other)
@NotNull public final @NotNull JsonAssert.ConfigurableJsonAssert when(@NotNull @NotNull net.javacrumbs.jsonunit.core.ConfigurationWhen.PathsParam object, @NotNull net.javacrumbs.jsonunit.core.ConfigurationWhen.ApplicableForPath... actions)
Configuration#when(PathsParam, ApplicableForPath...)@NotNull public @NotNull JsonAssert.ConfigurableJsonAssert withOptions(@NotNull @NotNull net.javacrumbs.jsonunit.core.internal.Options options)
options - @NotNull public @NotNull JsonAssert.ConfigurableJsonAssert withConfiguration(@NotNull @NotNull Function<net.javacrumbs.jsonunit.core.Configuration,net.javacrumbs.jsonunit.core.Configuration> configurationFunction)
assertThatJson(...)
.withConfiguration(c -> c.withMatcher("positive", greaterThan(valueOf(0)))
....
@NotNull public @NotNull JsonAssert.ConfigurableJsonAssert withTolerance(@Nullable @Nullable BigDecimal tolerance)
tolerance - @NotNull public @NotNull JsonAssert.ConfigurableJsonAssert withTolerance(double tolerance)
tolerance - @NotNull public @NotNull JsonAssert.ConfigurableJsonAssert whenIgnoringPaths(@NotNull String... pathsToBeIgnored)
pathsToBeIgnored - @NotNull public @NotNull JsonAssert.ConfigurableJsonAssert withIgnorePlaceholder(@NotNull @NotNull String ignorePlaceholder)
ignorePlaceholder - @NotNull public @NotNull JsonAssert.ConfigurableJsonAssert withMatcher(@NotNull @NotNull String matcherName, @NotNull @NotNull org.hamcrest.Matcher<?> matcher)
matcherName - matcher - @NotNull public @NotNull JsonAssert.ConfigurableJsonAssert withDifferenceListener(@NotNull @NotNull net.javacrumbs.jsonunit.core.listener.DifferenceListener differenceListener)
@NotNull public @NotNull JsonAssert inPath(@NotNull @NotNull String jsonPath)
@NotNull public @NotNull JsonAssert.ConfigurableJsonAssert describedAs(@NotNull @NotNull 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>@NotNull public @NotNull JsonAssert.ConfigurableJsonAssert describedAs(@NotNull @NotNull String description, Object... args)
@NotNull public @NotNull JsonAssert.ConfigurableJsonAssert as(@NotNull @NotNull org.assertj.core.description.Description description)
@NotNull public @NotNull JsonAssert.ConfigurableJsonAssert as(@NotNull @NotNull String description, Object... args)
Copyright © 2020. All rights reserved.