-
public class PactBuilder
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classPactBuilder.Companion
-
Field Summary
Fields Modifier and Type Field Description private Stringconsumerprivate Stringproviderprivate PactSpecVersionpactVersion
-
Constructor Summary
Constructors Constructor Description PactBuilder(String consumer, String provider, PactSpecVersion pactVersion)
-
Method Summary
Modifier and Type Method Description final StringgetConsumer()final UnitsetConsumer(String consumer)final StringgetProvider()final UnitsetProvider(String provider)final PactSpecVersiongetPactVersion()final UnitsetPactVersion(PactSpecVersion pactVersion)final PactDslWithProviderusingLegacyDsl()Use the old HTTP Pact DSL final MessagePactBuilderusingLegacyMessageDsl()Use the old HTTP Pact DSL final SynchronousMessagePactBuilderusingSynchronousMessageDsl()Use the Synchronous Message DSL final UnitpactSpecVersion(PactSpecVersion version)Sets the Pact specification version final PactBuilderusingPlugin(String name, String version)Enable a plugin final PactBuilderusingPlugin(String name)Enable a plugin final PactBuilderexpectsToReceive(String description, String interactionType, String key)Adds an interaction with the given description and type final PactBuilderexpectsToReceive(String description, String interactionType)Adds an interaction with the given description and type final PactBuilderwith(Map<String, Object> values)Values to configure the interaction final PactBuilderaddMetadataValue(String key, String value)Adds additional values to the metadata section of the Pact file final PactBuilderaddMetadataValue(String key, JsonValue value)Adds additional values to the metadata section of the Pact file final V4PacttoPact()-
-
Method Detail
-
getConsumer
final String getConsumer()
-
setConsumer
final Unit setConsumer(String consumer)
-
getProvider
final String getProvider()
-
setProvider
final Unit setProvider(String provider)
-
getPactVersion
final PactSpecVersion getPactVersion()
-
setPactVersion
final Unit setPactVersion(PactSpecVersion pactVersion)
-
usingLegacyDsl
final PactDslWithProvider usingLegacyDsl()
Use the old HTTP Pact DSL
-
usingLegacyMessageDsl
final MessagePactBuilder usingLegacyMessageDsl()
Use the old HTTP Pact DSL
-
usingSynchronousMessageDsl
final SynchronousMessagePactBuilder usingSynchronousMessageDsl()
Use the Synchronous Message DSL
-
pactSpecVersion
final Unit pactSpecVersion(PactSpecVersion version)
Sets the Pact specification version
-
usingPlugin
@JvmOverloads() final PactBuilder usingPlugin(String name, String version)
Enable a plugin
-
usingPlugin
@JvmOverloads() final PactBuilder usingPlugin(String name)
Enable a plugin
-
expectsToReceive
@JvmOverloads() final PactBuilder expectsToReceive(String description, String interactionType, String key)
Adds an interaction with the given description and type
-
expectsToReceive
@JvmOverloads() final PactBuilder expectsToReceive(String description, String interactionType)
Adds an interaction with the given description and type
-
with
final PactBuilder with(Map<String, Object> values)
Values to configure the interaction
-
addMetadataValue
final PactBuilder addMetadataValue(String key, String value)
Adds additional values to the metadata section of the Pact file
-
addMetadataValue
final PactBuilder addMetadataValue(String key, JsonValue value)
Adds additional values to the metadata section of the Pact file
-
toPact
final V4Pact toPact()
-
-
-
-