public static class WireMockPactGenerator.Builder extends Object
| Modifier and Type | Method and Description |
|---|---|
WireMockPactGenerator |
build()
Build a WireMockPactGenerator request listener for WireMock with the provided settings.
|
WireMockPactGenerator.Builder |
withIncludeNotConfiguredResponses(boolean includeNotConfiguredResponses)
When a request does not match any stubbing in WireMock a default 404 response is generated.
|
WireMockPactGenerator.Builder |
withRequestHeaderIncludeList(String... httpHeaders)
Specify what request headers should be recorded in the pact interaction (all headers if unset).
|
WireMockPactGenerator.Builder |
withRequestHeaderWhitelist(String... httpHeaders)
Deprecated.
method was renamed, use
withRequestHeaderIncludeList(String...) instead. |
WireMockPactGenerator.Builder |
withRequestPathBlacklist(String... regexPatterns)
Deprecated.
method was renamed, use
withRequestPathExcludeList(String...) instead. |
WireMockPactGenerator.Builder |
withRequestPathExcludeList(String... regexPatterns)
Specify path patterns of requests that should not be recorded as pact interactions.
|
WireMockPactGenerator.Builder |
withRequestPathIncludeList(String... regexPatterns)
Specify path patterns of requests that should be recorded as pact interactions (everything if unset).
|
WireMockPactGenerator.Builder |
withRequestPathWhitelist(String... regexPatterns)
Deprecated.
method was renamed, use
withRequestPathIncludeList(String...) instead. |
WireMockPactGenerator.Builder |
withResponseHeaderIncludeList(String... httpHeaders)
Specify what response headers should be recorded in the pact interaction (all headers if unset).
|
WireMockPactGenerator.Builder |
withResponseHeaderWhitelist(String... httpHeaders)
Deprecated.
method was renamed, use
withResponseHeaderIncludeList(String...) instead. |
WireMockPactGenerator.Builder |
withStrictApplicationJson(boolean strictApplicationJson)
According to [RFC-4627](https://tools.ietf.org/html/rfc4627) Section 2.
|
WireMockPactGenerator.Builder |
withUnexpectedErrorHandler(Consumer<RuntimeException> unexpectedErrorHandler)
There's no mechanism to instruct WireMock to fail when an unexpected error occurs in WireMockPactGenerator
for that reason the default behaviour is to terminate the Java process which might be too intrusive.
|
public WireMockPactGenerator.Builder withRequestPathIncludeList(String... regexPatterns)
regexPatterns - List of regex path patterns to match request that should be captured.public WireMockPactGenerator.Builder withRequestPathExcludeList(String... regexPatterns)
regexPatterns - List of regex patterns of request paths that should be omitted.public WireMockPactGenerator.Builder withStrictApplicationJson(boolean strictApplicationJson)
strictApplicationJson - enable/disable strict application/json mode (default: true).public WireMockPactGenerator.Builder withRequestHeaderIncludeList(String... httpHeaders)
httpHeaders - List of request headers to be captured (case insensitive).public WireMockPactGenerator.Builder withResponseHeaderIncludeList(String... httpHeaders)
httpHeaders - List of response headers to be captured (case insensitive).public WireMockPactGenerator.Builder withUnexpectedErrorHandler(Consumer<RuntimeException> unexpectedErrorHandler)
unexpectedErrorHandler - function to handle unexpected errors occurring in WireMockPactGenerator.public WireMockPactGenerator build()
public WireMockPactGenerator.Builder withIncludeNotConfiguredResponses(boolean includeNotConfiguredResponses)
includeNotConfiguredResponses - false to prevent capturing interactions for responses not configured
in WireMock (defaults to true if unset)@Deprecated public WireMockPactGenerator.Builder withRequestPathWhitelist(String... regexPatterns)
withRequestPathIncludeList(String...) instead.regexPatterns - List of regex path patterns to match request that should be captured.@Deprecated public WireMockPactGenerator.Builder withRequestPathBlacklist(String... regexPatterns)
withRequestPathExcludeList(String...) instead.regexPatterns - List of regex patterns of request paths that should be omitted.@Deprecated public WireMockPactGenerator.Builder withRequestHeaderWhitelist(String... httpHeaders)
withRequestHeaderIncludeList(String...) instead.httpHeaders - List of request headers to be captured (case insensitive).@Deprecated public WireMockPactGenerator.Builder withResponseHeaderWhitelist(String... httpHeaders)
withResponseHeaderIncludeList(String...) instead.httpHeaders - List of response headers to be captured (case insensitive).Copyright © 2017–2022 Atlassian. All rights reserved.