Uses of Class
org.mockserver.client.RecordedExpectationsOptions
Packages that use RecordedExpectationsOptions
-
Uses of RecordedExpectationsOptions in org.mockserver.client
Methods in org.mockserver.client that return RecordedExpectationsOptionsModifier and TypeMethodDescriptionstatic RecordedExpectationsOptionsRecordedExpectationsOptions.recordedExpectationsOptions()RecordedExpectationsOptions.withCaptureHeaders(String... headerNames) Keep only these request headers (case-insensitive) in each recorded request matcher; no names keeps none,nullleaves the option unset.RecordedExpectationsOptions.withConsolidate(Boolean consolidate) Collapse recorded exchanges that share a request shape into one reusable, unlimited-times expectation.RecordedExpectationsOptions.withExtractBodiesLargerThan(Long thresholdBytes) Write each response body larger than this many bytes to the server's configuredrecordedBodyFilesDirectoryand reference it as a FILE body.RecordedExpectationsOptions.withParameterize(Boolean parameterize) Also generalise volatile path, query, header and body values into matchers (implies consolidate).RecordedExpectationsOptions.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.Methods in org.mockserver.client with parameters of type RecordedExpectationsOptionsModifier and TypeMethodDescriptionorg.mockserver.mock.Expectation[]MockServerClient.retrieveRecordedExpectations(org.mockserver.model.RequestDefinition requestDefinition, RecordedExpectationsOptions options) Retrieve the request-response combinations that have been recorded as a list of expectations, shaped by the given options, for example to replay a request recorded with different responses in order (withRepeatsAsScenarios(Boolean)), keep only some request headers (withCaptureHeaders(String...)) or move large bodies into files (withExtractBodiesLargerThan(Long)).MockServerClient.retrieveRecordedExpectations(org.mockserver.model.RequestDefinition requestDefinition, org.mockserver.model.Format format, RecordedExpectationsOptions options) AsMockServerClient.retrieveRecordedExpectations(RequestDefinition, RecordedExpectationsOptions), in the given format.