java.lang.Object
org.mockserver.client.RecordedExpectationsOptions
Options that shape the expectations returned by
MockServerClient.retrieveRecordedExpectations(org.mockserver.model.RequestDefinition, RecordedExpectationsOptions).
Each option is off unless set, so an empty options object returns the recorded expectations unchanged.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RecordedExpectationsOptionswithCaptureHeaders(String... headerNames) Keep only these request headers (case-insensitive) in each recorded request matcher; no names keeps none,nullleaves the option unset.withConsolidate(Boolean consolidate) Collapse recorded exchanges that share a request shape into one reusable, unlimited-times expectation.withExtractBodiesLargerThan(Long thresholdBytes) Write each response body larger than this many bytes to the server's configuredrecordedBodyFilesDirectoryand reference it as a FILE body.withParameterize(Boolean parameterize) Also generalise volatile path, query, header and body values into matchers (implies consolidate).withRepeatsAsScenarios(Boolean repeatsAsScenarios) When the same request was recorded several times with different responses, return one expectation that replays those responses in the recorded order and then keeps returning the last one.
-
Constructor Details
-
RecordedExpectationsOptions
public RecordedExpectationsOptions()
-
-
Method Details
-
recordedExpectationsOptions
-
withConsolidate
Collapse recorded exchanges that share a request shape into one reusable, unlimited-times expectation. -
withParameterize
Also generalise volatile path, query, header and body values into matchers (implies consolidate). -
withRepeatsAsScenarios
When the same request was recorded several times with different responses, return one expectation that replays those responses in the recorded order and then keeps returning the last one. -
withCaptureHeaders
Keep only these request headers (case-insensitive) in each recorded request matcher; no names keeps none,nullleaves the option unset. -
withExtractBodiesLargerThan
Write each response body larger than this many bytes to the server's configuredrecordedBodyFilesDirectoryand reference it as a FILE body. -
getConsolidate
-
getParameterize
-
getRepeatsAsScenarios
-
getCaptureHeaders
-
getExtractBodiesLargerThan
-