final case class ProviderInfoBuilder(name: String, protocol: String, host: String, port: Int, path: String, pactSource: PactSource, stateChangeUrl: Option[String] = None, verificationSettings: Option[VerificationSettings] = None, requestFilter: (ProviderRequest) ⇒ List[ProviderRequestFilter] = _ => Nil) extends Product with Serializable
Interface for defining the provider that consumer pacts are verified against. Internally gets converted to au.com.dius.pact.provider.ProviderInfo during verification.
- name
the name of the provider
- path
address of the mock provider server is {protocol}://{host}:{port}{path}
- pactSource
pacts to verify can come either from a file location, or from a pact broker.
- stateChangeUrl
full url of the mock provider endpoint that can be used for setting provider state before each pact with state is run. state is sent as JSON of the form {"state": "state goes here"}. Can also be set using ProviderInfoBuilder#withStateChangeEndpoint just by providing the path.
- verificationSettings
Required if verifying message pacts
- requestFilter
Apply filters to certain consumer requests. The most common use case for this is adding auth headers to requests
- See also
https://docs.pact.io/faq/#how-do-i-test-oauth-or-other-security-headers
- Alphabetic
- By Inheritance
- ProviderInfoBuilder
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
ProviderInfoBuilder(name: String, protocol: String, host: String, port: Int, path: String, pactSource: PactSource, stateChangeUrl: Option[String] = None, verificationSettings: Option[VerificationSettings] = None, requestFilter: (ProviderRequest) ⇒ List[ProviderRequestFilter] = _ => Nil)
- name
the name of the provider
- path
address of the mock provider server is {protocol}://{host}:{port}{path}
- pactSource
pacts to verify can come either from a file location, or from a pact broker.
- stateChangeUrl
full url of the mock provider endpoint that can be used for setting provider state before each pact with state is run. state is sent as JSON of the form {"state": "state goes here"}. Can also be set using ProviderInfoBuilder#withStateChangeEndpoint just by providing the path.
- verificationSettings
Required if verifying message pacts
- requestFilter
Apply filters to certain consumer requests. The most common use case for this is adding auth headers to requests
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val host: String
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val name: String
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val pactSource: PactSource
- val path: String
- val port: Int
- val protocol: String
- val requestFilter: (ProviderRequest) ⇒ List[ProviderRequestFilter]
- val stateChangeUrl: Option[String]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- val verificationSettings: Option[VerificationSettings]
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- def withHost(host: String): ProviderInfoBuilder
- def withOptionalVerificationSettings(settings: Option[VerificationSettings]): ProviderInfoBuilder
- def withPath(path: String): ProviderInfoBuilder
- def withPort(port: Int): ProviderInfoBuilder
- def withProtocol(protocol: String): ProviderInfoBuilder
- def withRequestFilter(requestFilter: (ProviderRequest) ⇒ List[ProviderRequestFilter]): ProviderInfoBuilder
- def withStateChangeEndpoint(endpoint: String): ProviderInfoBuilder
- def withStateChangeUrl(url: String): ProviderInfoBuilder
- def withVerificationSettings(settings: VerificationSettings): ProviderInfoBuilder