Interface for defining the provider that consumer pacts are verified against. Internally gets converted to au.com.dius.pact.provider.ProviderInfo during verification.
Use the apply methods in the companion object to construct.
Attributes
- host
mock provider host
- name
the name of the provider
- pactSource
pacts to verify can come either from a file location, or from a pact broker.
- path
address of the mock provider server is {protocol}://{host}:{port}{path}
- port
mock provider port
- protocol
e.g. http or https
- requestFilter
Apply filters to certain consumer requests. The most common use case for this is adding auth headers to requests
- stateManagement
Used for the setting of provider state before each interaction with state is run. Can be either: (1) the url of a endpoint on the mock provider that can configure internal state. Can be set using a full url with ProviderInfoBuilder#withStateChangeUrl or simply by providing the endpoint with ProviderInfoBuilder#withStateChangeEndpoint. State is sent as a json of the form {"state": "state name", "params": {"param1" : "paramValue"}}. Decoders for ProviderState can be found in the json-modules, or defined by the user. (2) a partial function => Unit provided by ProviderInfoBuilder#withStateChangeFunction which will be applied before each interaction is run. This works by using a mock internal server, the host of which can be configured using ProviderInfoBuilder#withStateChangeFunctionConfigOverrides
- verificationSettings
Required if verifying message pacts using the old java-y annotated method search. Not needed if using the response factory method.
- See also:
- Companion:
- object
- Graph
- Supertypes
- class Objecttrait Matchableclass Any