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

protocol

e.g. http or https

host

mock provider host

port

mock provider port

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

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ProviderInfoBuilder
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. 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

    protocol

    e.g. http or https

    host

    mock provider host

    port

    mock provider port

    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

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @IntrinsicCandidate()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  8. val host: String
  9. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  10. val name: String
  11. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  14. val pactSource: PactSource
  15. val path: String
  16. val port: Int
  17. val protocol: String
  18. val requestFilter: (ProviderRequest) ⇒ List[ProviderRequestFilter]
  19. val stateChangeUrl: Option[String]
  20. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  21. val verificationSettings: Option[VerificationSettings]
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. def withHost(host: String): ProviderInfoBuilder
  26. def withOptionalVerificationSettings(settings: Option[VerificationSettings]): ProviderInfoBuilder
  27. def withPath(path: String): ProviderInfoBuilder
  28. def withPort(port: Int): ProviderInfoBuilder
  29. def withProtocol(protocol: String): ProviderInfoBuilder
  30. def withRequestFilter(requestFilter: (ProviderRequest) ⇒ List[ProviderRequestFilter]): ProviderInfoBuilder
  31. def withStateChangeEndpoint(endpoint: String): ProviderInfoBuilder
  32. def withStateChangeUrl(url: String): ProviderInfoBuilder
  33. def withVerificationSettings(settings: VerificationSettings): ProviderInfoBuilder

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped