public class Configuration extends Object
| Constructor and Description |
|---|
Configuration(BigDecimal tolerance,
Options options,
String ignorePlaceholder)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
static @NotNull DifferenceListener |
dummyDifferenceListener() |
static @NotNull Configuration |
empty()
Returns an empty configuration.
|
@NotNull DifferenceListener |
getDifferenceListener() |
@NotNull String |
getIgnorePlaceholder() |
@Nullable org.hamcrest.Matcher<?> |
getMatcher(String matcherName) |
@NotNull Options |
getOptions() |
@NotNull List<PathOption> |
getPathOptions() |
@NotNull Set<String> |
getPathsToBeIgnored() |
@Nullable BigDecimal |
getTolerance() |
boolean |
shouldIgnore(String expectedValue) |
@NotNull Configuration |
when(@NotNull ConfigurationWhen.PathsParam object,
ConfigurationWhen.ApplicableForPath... actions)
Defines general comparison options.
|
@NotNull Configuration |
when(@NotNull Option first,
Option... next)
Adds comparison options.
|
@NotNull Configuration |
whenIgnoringPaths(@NotNull Collection<String> pathsToBeIgnored) |
@NotNull Configuration |
whenIgnoringPaths(String... pathsToBeIgnored)
Makes JsonUnit ignore the specified paths in the actual value.
|
@NotNull Configuration |
withDifferenceListener(@NotNull DifferenceListener differenceListener)
Sets difference listener
|
@NotNull Configuration |
withIgnorePlaceholder(@NotNull String ignorePlaceholder)
Sets ignore placeholder.
|
@NotNull Configuration |
withMatcher(@NotNull String matcherName,
@NotNull org.hamcrest.Matcher<?> matcher)
Adds a matcher to be used in ${json-unit.matches:matcherName} macro.
|
@NotNull Configuration |
withOptions(@NotNull Option first,
Option... next)
Adds comparison options.
|
@NotNull Configuration |
withOptions(@NotNull Options options)
Sets comparison options.
|
@NotNull Configuration |
withPathOptions(@NotNull List<PathOption> pathOptions) |
@NotNull Configuration |
withTolerance(@Nullable BigDecimal tolerance)
Sets numerical comparison tolerance.
|
@NotNull Configuration |
withTolerance(double tolerance)
Sets numerical comparison tolerance.
|
@Deprecated public Configuration(BigDecimal tolerance, Options options, String ignorePlaceholder)
@NotNull public static @NotNull Configuration empty()
@NotNull public @NotNull Configuration withTolerance(@Nullable @Nullable BigDecimal tolerance)
tolerance - @NotNull public @NotNull Configuration withTolerance(double tolerance)
tolerance - @NotNull public @NotNull Configuration when(@NotNull @NotNull Option first, @NotNull Option... next)
first - next - @NotNull public @NotNull Configuration withOptions(@NotNull @NotNull Option first, @NotNull Option... next)
first - next - @NotNull public @NotNull Configuration withOptions(@NotNull @NotNull Options options)
options - @NotNull public final @NotNull Configuration when(@NotNull @NotNull ConfigurationWhen.PathsParam object, @NotNull ConfigurationWhen.ApplicableForPath... actions)
ConfigurationWhen.path(java.lang.String) for some examples.object - an object to apply actions, e.g. ConfigurationWhen.path(java.lang.String), ConfigurationWhen.rootPath().actions - actions to be applied on the object.ConfigurationWhen.path(java.lang.String)@NotNull public @NotNull Configuration withPathOptions(@NotNull @NotNull List<PathOption> pathOptions)
@NotNull public @NotNull Configuration whenIgnoringPaths(@NotNull @NotNull Collection<String> pathsToBeIgnored)
@NotNull public @NotNull Configuration whenIgnoringPaths(@NotNull String... pathsToBeIgnored)
pathsToBeIgnored - ConfigurationWhen.thenIgnore()@NotNull public @NotNull Configuration withIgnorePlaceholder(@NotNull @NotNull String ignorePlaceholder)
ignorePlaceholder - @NotNull public @NotNull Configuration withMatcher(@NotNull @NotNull String matcherName, @NotNull @NotNull org.hamcrest.Matcher<?> matcher)
matcherName - matcher - @NotNull public @NotNull Configuration withDifferenceListener(@NotNull @NotNull DifferenceListener differenceListener)
@NotNull public static @NotNull DifferenceListener dummyDifferenceListener()
@Nullable public @Nullable org.hamcrest.Matcher<?> getMatcher(String matcherName)
@Nullable public @Nullable BigDecimal getTolerance()
@NotNull public @NotNull Options getOptions()
@NotNull public @NotNull String getIgnorePlaceholder()
@NotNull public @NotNull List<PathOption> getPathOptions()
@NotNull public @NotNull DifferenceListener getDifferenceListener()
public boolean shouldIgnore(String expectedValue)
Copyright © 2020. All rights reserved.