-
- All Implemented Interfaces:
public final class MatchingContext
-
-
Field Summary
Fields Modifier and Type Field Description private final MatchingRuleCategorymatchersprivate final BooleanallowUnexpectedKeysprivate final Map<String, PluginConfiguration>pluginConfiguration
-
Constructor Summary
Constructors Constructor Description MatchingContext(MatchingRuleCategory matchers, Boolean allowUnexpectedKeys, Map<String, PluginConfiguration> pluginConfiguration)MatchingContext(MatchingRuleCategory matchers, Boolean allowUnexpectedKeys)
-
Method Summary
Modifier and Type Method Description final MatchingRuleCategorygetMatchers()final BooleangetAllowUnexpectedKeys()final Map<String, PluginConfiguration>getPluginConfiguration()final BooleanmatcherDefined(List<String> path, Comparator<String> pathComparator)final BooleanmatcherDefined(List<String> path)final MatchingRuleGroupselectBestMatcher(List<String> path, Comparator<String> pathComparator)final MatchingRuleGroupselectBestMatcher(List<String> path)final BooleantypeMatcherDefined(List<String> path)final <T extends Any> List<BodyItemMatchResult>matchKeys(List<String> path, Map<String, T> expectedEntries, Map<String, T> actualEntries, Function0<String> generateDiff)final BooleandirectMatcherDefined(List<String> path, List<Class<out MatchingRule>> matchers, Comparator<String> pathComparator)Matcher defined at that path (ignoring parents) final UnitisEqualsIgnoreOrderMatcherDefined(List<String> path)Determines if any ignore-order matcher is defined for path or ancestor of path. final MatchingContextextractPath(String rootPath)Creates a new context with all rules that match the rootPath, with that path replaced with root -
-
Method Detail
-
getMatchers
final MatchingRuleCategory getMatchers()
-
getAllowUnexpectedKeys
final Boolean getAllowUnexpectedKeys()
-
getPluginConfiguration
final Map<String, PluginConfiguration> getPluginConfiguration()
-
matcherDefined
@JvmOverloads() final Boolean matcherDefined(List<String> path, Comparator<String> pathComparator)
-
matcherDefined
@JvmOverloads() final Boolean matcherDefined(List<String> path)
-
selectBestMatcher
@JvmOverloads() final MatchingRuleGroup selectBestMatcher(List<String> path, Comparator<String> pathComparator)
-
selectBestMatcher
@JvmOverloads() final MatchingRuleGroup selectBestMatcher(List<String> path)
-
typeMatcherDefined
final Boolean typeMatcherDefined(List<String> path)
-
matchKeys
final <T extends Any> List<BodyItemMatchResult> matchKeys(List<String> path, Map<String, T> expectedEntries, Map<String, T> actualEntries, Function0<String> generateDiff)
-
directMatcherDefined
final Boolean directMatcherDefined(List<String> path, List<Class<out MatchingRule>> matchers, Comparator<String> pathComparator)
Matcher defined at that path (ignoring parents)
-
isEqualsIgnoreOrderMatcherDefined
final Unit isEqualsIgnoreOrderMatcherDefined(List<String> path)
Determines if any ignore-order matcher is defined for path or ancestor of path.
-
extractPath
final MatchingContext extractPath(String rootPath)
Creates a new context with all rules that match the rootPath, with that path replaced with root
-
-
-
-