-
- All Implemented Interfaces:
-
mu.KLoggable
public class Matchers extends KLogging
-
-
Method Summary
Modifier and Type Method Description final IntegermatchesPath(String pathExp, List<String> path)final IntegercalculatePathWeight(String pathExp, List<String> path)final MatchingRuleCategoryresolveMatchers(MatchingRules matchers, String category, List<String> items, Comparator<String> pathComparator)final static BooleanmatcherDefined(String category, List<String> path, MatchingRules matchers, Comparator<String> pathComparator)final static BooleanmatcherDefined(String category, List<String> path, MatchingRules matchers)final static BooleanwildcardIndexMatcherDefined(List<String> path, String category, MatchingRules matchers)Determines if a matcher of the form '*' exists for the path final static BooleanisEqualsIgnoreOrderMatcherDefined(List<String> path, String category, MatchingRules matchers)Determines if any ignore-order matcher is defined for path or ancestor of path. final static BooleanwildcardMatcherDefined(List<String> path, String category, MatchingRules matchers)Determines if a matcher of the form '. final static <M extends Mismatch> List<M>domatch(MatchingContext context, List<String> path, Object expected, Object actual, MismatchFactory<M> mismatchFn, Comparator<String> pathComparator)final static <M extends Mismatch> List<M>domatch(MatchingContext context, List<String> path, Object expected, Object actual, MismatchFactory<M> mismatchFn)final static MatchingRuleGroupselectBestMatcher(MatchingRules matchers, String category, List<String> path, Comparator<String> pathComparator)final static MatchingRuleGroupselectBestMatcher(MatchingRules matchers, String category, List<String> path)final BooleantypeMatcherDefined(String category, List<String> path, MatchingRules matchingRules)final <T extends Any> List<BodyItemMatchResult>compareMaps(List<String> path, MatchingRule matcher, Map<String, T> expectedEntries, Map<String, T> actualEntries, MatchingContext context, Function0<String> generateDiff, Function3<List<String>, T, T, List<BodyItemMatchResult>> callback)Compares the expected and actual maps using the provided matching rule final <T extends Any> List<BodyItemMatchResult>compareLists(List<String> path, MatchingRule matcher, List<T> expectedList, List<T> actualList, MatchingContext context, Function0<String> generateDiff, Boolean cascaded, Function4<List<String>, T, T, MatchingContext, List<BodyItemMatchResult>> callback)final <T extends Any> List<BodyItemMatchResult>compareListContentUnordered(List<T> expectedList, List<T> actualList, List<String> path, MatchingContext context, Function0<String> generateDiff, Function4<List<String>, T, T, MatchingContext, List<BodyItemMatchResult>> callback)Compares every permutation of actual against expected. final <T extends Any> List<BodyItemMatchResult>compareListContent(List<T> expectedList, List<T> actualList, List<String> path, MatchingContext context, Function0<String> generateDiff, Function4<List<String>, T, T, MatchingContext, List<BodyItemMatchResult>> callback)KLoggergetLogger()-
-
Method Detail
-
matchesPath
final Integer matchesPath(String pathExp, List<String> path)
-
calculatePathWeight
final Integer calculatePathWeight(String pathExp, List<String> path)
-
resolveMatchers
@Deprecated(message = Use function from MatchingContext or MatchingRuleCategory) final MatchingRuleCategory resolveMatchers(MatchingRules matchers, String category, List<String> items, Comparator<String> pathComparator)
-
matcherDefined
@Deprecated(message = Use function from MatchingContext or MatchingRuleCategory)@JvmOverloads() final static Boolean matcherDefined(String category, List<String> path, MatchingRules matchers, Comparator<String> pathComparator)
-
matcherDefined
@Deprecated(message = Use function from MatchingContext or MatchingRuleCategory)@JvmOverloads() final static Boolean matcherDefined(String category, List<String> path, MatchingRules matchers)
-
wildcardIndexMatcherDefined
@Deprecated(message = Use function from MatchingContext or MatchingRuleCategory) final static Boolean wildcardIndexMatcherDefined(List<String> path, String category, MatchingRules matchers)
Determines if a matcher of the form '*' exists for the path
-
isEqualsIgnoreOrderMatcherDefined
@Deprecated(message = Use function from MatchingContext or MatchingRuleCategory) final static Boolean isEqualsIgnoreOrderMatcherDefined(List<String> path, String category, MatchingRules matchers)
Determines if any ignore-order matcher is defined for path or ancestor of path.
-
wildcardMatcherDefined
@Deprecated(message = Use function from MatchingContext or MatchingRuleCategory) final static Boolean wildcardMatcherDefined(List<String> path, String category, MatchingRules matchers)
Determines if a matcher of the form '.*' exists for the path
-
domatch
@JvmOverloads() final static <M extends Mismatch> List<M> domatch(MatchingContext context, List<String> path, Object expected, Object actual, MismatchFactory<M> mismatchFn, Comparator<String> pathComparator)
-
domatch
@JvmOverloads() final static <M extends Mismatch> List<M> domatch(MatchingContext context, List<String> path, Object expected, Object actual, MismatchFactory<M> mismatchFn)
-
selectBestMatcher
@Deprecated(message = Use function from MatchingContext or MatchingRuleCategory)@JvmOverloads() final static MatchingRuleGroup selectBestMatcher(MatchingRules matchers, String category, List<String> path, Comparator<String> pathComparator)
-
selectBestMatcher
@Deprecated(message = Use function from MatchingContext or MatchingRuleCategory)@JvmOverloads() final static MatchingRuleGroup selectBestMatcher(MatchingRules matchers, String category, List<String> path)
-
typeMatcherDefined
@Deprecated(message = Use function from MatchingContext or MatchingRuleCategory) final Boolean typeMatcherDefined(String category, List<String> path, MatchingRules matchingRules)
-
compareMaps
final <T extends Any> List<BodyItemMatchResult> compareMaps(List<String> path, MatchingRule matcher, Map<String, T> expectedEntries, Map<String, T> actualEntries, MatchingContext context, Function0<String> generateDiff, Function3<List<String>, T, T, List<BodyItemMatchResult>> callback)
Compares the expected and actual maps using the provided matching rule
-
compareLists
final <T extends Any> List<BodyItemMatchResult> compareLists(List<String> path, MatchingRule matcher, List<T> expectedList, List<T> actualList, MatchingContext context, Function0<String> generateDiff, Boolean cascaded, Function4<List<String>, T, T, MatchingContext, List<BodyItemMatchResult>> callback)
-
compareListContentUnordered
final <T extends Any> List<BodyItemMatchResult> compareListContentUnordered(List<T> expectedList, List<T> actualList, List<String> path, MatchingContext context, Function0<String> generateDiff, Function4<List<String>, T, T, MatchingContext, List<BodyItemMatchResult>> callback)
Compares every permutation of actual against expected.
-
compareListContent
final <T extends Any> List<BodyItemMatchResult> compareListContent(List<T> expectedList, List<T> actualList, List<String> path, MatchingContext context, Function0<String> generateDiff, Function4<List<String>, T, T, MatchingContext, List<BodyItemMatchResult>> callback)
-
getLogger
KLogger getLogger()
-
-
-
-