Class: MockService

MockService

new MockService(consumer, provider, port, host)

Parameters:
Name Type Description
consumer string the consumer name
provider string the provider name
port number the mock service port, defaults to 1234
host string the mock service host, defaults to 127.0.0.1
Source:

Methods

addInteraction(interaction) → {Promise}

Adds an interaction
Parameters:
Name Type Description
interaction Interaction
Source:
Returns:
Type
Promise

putInteractions(interactions) → {Promise}

Adds a collection of interactions
Parameters:
Name Type Description
interactions Array.<Interaction>
Source:
Returns:
Type
Promise

removeInteractions() → {Promise}

Removes all interactions.
Source:
Returns:
Type
Promise

verify() → {Promise}

Verify all interactions.
Source:
Returns:
Type
Promise

verifyAndWrite() → {Promise}

Combination of verification and writing of a Pact.
Source:
See:
Returns:
Type
Promise

writePact() → {Promise}

Writes the Pact file.
Source:
Returns:
Type
Promise