Package au.com.dius.pact.core.matchers
Class MatchingContext
-
- All Implemented Interfaces:
public final class MatchingContext
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classMatchingContext.BestMatcherResult
-
Field Summary
Fields Modifier and Type Field Description private final MatchingRuleCategorymatchersprivate final BooleanallowUnexpectedKeysprivate final Map<String, PluginConfiguration>pluginConfigurationprivate final BooleancoerceNumbers
-
Constructor Summary
Constructors Constructor Description MatchingContext(MatchingRuleCategory matchers, Boolean allowUnexpectedKeys, Map<String, PluginConfiguration> pluginConfiguration, Boolean coerceNumbers)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 BooleangetCoerceNumbers()final Boolean)>matcherDefined(List<String> path, <Error class: unknown class><String> pathComparator)final Boolean)>matcherDefined(List<String> path)final MatchingRuleGroup)>selectBestMatcher(List<String> path, <Error class: unknown class><String> pathComparator)final MatchingRuleGroup)>selectBestMatcher(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 Boolean)>directMatcherDefined(List<String> path, List<Class<out MatchingRule>> matchers, <Error class: unknown class><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 -
-
Constructor Detail
-
MatchingContext
MatchingContext(MatchingRuleCategory matchers, Boolean allowUnexpectedKeys, Map<String, PluginConfiguration> pluginConfiguration, Boolean coerceNumbers)
-
MatchingContext
MatchingContext(MatchingRuleCategory matchers, Boolean allowUnexpectedKeys, Map<String, PluginConfiguration> pluginConfiguration)
-
MatchingContext
MatchingContext(MatchingRuleCategory matchers, Boolean allowUnexpectedKeys)
-
-
Method Detail
-
getMatchers
final MatchingRuleCategory getMatchers()
-
getAllowUnexpectedKeys
final Boolean getAllowUnexpectedKeys()
-
getPluginConfiguration
final Map<String, PluginConfiguration> getPluginConfiguration()
-
getCoerceNumbers
final Boolean getCoerceNumbers()
-
matcherDefined
@JvmOverloads() final Boolean )>matcherDefined(List<String> path, <Error class: unknown class><String> pathComparator)
-
matcherDefined
@JvmOverloads() final Boolean )>matcherDefined(List<String> path)
-
selectBestMatcher
@JvmOverloads() final MatchingRuleGroup )>selectBestMatcher(List<String> path, <Error class: unknown class><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, <Error class: unknown class><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
-
-
-
-