Package org.mockserver.matchers
Class MatchDifference
java.lang.Object
org.mockserver.matchers.MatchDifference
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionMatchDifference(boolean detailedMatchFailures, RequestDefinition httpRequest) -
Method Summary
Modifier and TypeMethodDescriptionaddDifference(String messageFormat, Object... arguments) addDifference(MockServerLogger mockServerLogger, String messageFormat, Object... arguments) addDifference(MockServerLogger mockServerLogger, Throwable throwable, String messageFormat, Object... arguments) addDifference(MatchDifference.Field fieldName, String messageFormat, Object... arguments) voidaddDifferences(Map<MatchDifference.Field, List<String>> differences) Ask matchers to evaluate every field instead of stopping at the first non-matching one, so this context collects the complete set of differing fields.protected MatchDifferencecurrentField(MatchDifference.Field fieldName) getDifferences(MatchDifference.Field fieldName) booleanbooleanMark this difference context as diagnostic-only: matchers must compute differences without logging EXPECTATION_MATCHED / EXPECTATION_NOT_MATCHED events.
-
Constructor Details
-
MatchDifference
-
-
Method Details
-
suppressMatchResultLogging
Mark this difference context as diagnostic-only: matchers must compute differences without logging EXPECTATION_MATCHED / EXPECTATION_NOT_MATCHED events. Used by read-only endpoints (explainUnmatched, debugMismatch) so they do not write side-effect entries into the event log. -
isSuppressMatchResultLogging
public boolean isSuppressMatchResultLogging() -
collectAllDifferences
Ask matchers to evaluate every field instead of stopping at the first non-matching one, so this context collects the complete set of differing fields.Only for read-only diagnostics that need to know how much of a request matched (notably
debugMismatch, which ranks expectations by closeness). It is scoped to this one evaluation and never touches the shared matcher configuration, so it cannot slow or alter matching for any other request. -
isCollectAllDifferences
public boolean isCollectAllDifferences() -
addDifference
public MatchDifference addDifference(MockServerLogger mockServerLogger, Throwable throwable, String messageFormat, Object... arguments) -
addDifference
public MatchDifference addDifference(MockServerLogger mockServerLogger, String messageFormat, Object... arguments) -
addDifference
public MatchDifference addDifference(MatchDifference.Field fieldName, String messageFormat, Object... arguments) -
addDifference
-
getHttpRequest
-
getLogCorrelationId
-
currentField
-
getDifferences
-
getAllDifferences
-
addDifferences
-