pact4s.provider

Type members

Classlikes

sealed trait Authentication

Auth for accessing a pact-broker. Used in PactSource.PactBroker

Auth for accessing a pact-broker. Used in PactSource.PactBroker

Companion:
object
Companion:
class
final case class Branch(branch: String)
Companion:
object
object Branch
Companion:
class

Consumer version selectors. See https://docs.pact.io/pact_broker/advanced_topics/selectors

Companion:
object
sealed trait PactSource
Companion:
object
object PactSource
Companion:
class

Interface for defining the provider that consumer pacts are verified against. Internally gets converted to au.com.dius.pact.provider.ProviderInfo during verification.

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.

Value parameters:
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
Companion:
class
final class ProviderRequest

A simplified interface for managing the requests sent by pact-jvm to the mock provider service. Used in conjunction with ProviderRequestFilter in ProviderInfoBuilder.withRequestFiltering

A simplified interface for managing the requests sent by pact-jvm to the mock provider service. Used in conjunction with ProviderRequestFilter in ProviderInfoBuilder.withRequestFiltering

Companion:
object
Companion:
class

pact-jvm uses apache-http as its http implementation. A ProviderRequestFilter applies a transformation to a org.apache.http.HttpRequest before passing it to the mock provider server. Its called a "filter" here as this is what its called in other pact implementations. It doesn't filter in the sense of stopping certain requests from reaching the mock server.

pact-jvm uses apache-http as its http implementation. A ProviderRequestFilter applies a transformation to a org.apache.http.HttpRequest before passing it to the mock provider server. Its called a "filter" here as this is what its called in other pact implementations. It doesn't filter in the sense of stopping certain requests from reaching the mock server.

Companion:
object
final case class ProviderState(state: String, params: Map[String, String])

Entity passed to the mock provider state setup endpoint by pact-jvm before running consumer pacts with state. Decoders are provided in each JSON library module (circe or play-json).

Entity passed to the mock provider state setup endpoint by pact-jvm before running consumer pacts with state. Decoders are provided in each JSON library module (circe or play-json).

final case class ProviderTags(head: String, tail: List[String])
Companion:
object
Companion:
class
sealed abstract class ProviderVerificationOption(val key: String)
Companion:
object
Companion:
object
sealed trait ResponseBuilder
Companion:
object
Companion:
class
sealed trait StateManagement
Companion:
object
Companion:
class
Companion:
object
Companion:
class
final class WipPactsSince
Companion:
object
Companion:
class