use of au.com.dius.pact.model.v3.messaging.MessagePact in project pact-jvm by DiUS.
the class PactVerificationsForMultipleFragmentsTest method messagePact.
@Pact(provider = MESSAGE_PROVIDER_NAME, consumer = PACT_VERIFICATIONS_CONSUMER_NAME)
public MessagePact messagePact(MessagePactBuilder builder) {
PactDslJsonBody body = new PactDslJsonBody();
body.stringValue("testParam1", "value1");
Map<String, String> metadata = new HashMap<String, String>();
metadata.put("contentType", "application/json");
return builder.given("SomeProviderState").expectsToReceive("a test message").withMetadata(metadata).withContent(body).toPact();
}
use of au.com.dius.pact.model.v3.messaging.MessagePact in project pact-jvm by DiUS.
the class PactVerificationsForMultipleFragmentsTest method otherMessagePact.
@Pact(provider = MESSAGE_PROVIDER_NAME, consumer = PACT_VERIFICATIONS_CONSUMER_NAME)
public MessagePact otherMessagePact(MessagePactBuilder builder) {
PactDslJsonBody body = new PactDslJsonBody();
body.stringValue("testParamA", "valueA");
Map<String, String> metadata = new HashMap<String, String>();
metadata.put("contentType", "application/json");
return builder.given("SomeOtherProviderState").expectsToReceive("another test message").withMetadata(metadata).withContent(body).toPact();
}
use of au.com.dius.pact.model.v3.messaging.MessagePact in project pact-jvm by DiUS.
the class PactVerificationsForMultipleHttpsAndMessagesTest method otherMessagePact.
@Pact(provider = OTHER_MESSAGE_PROVIDER_NAME, consumer = PACT_VERIFICATIONS_CONSUMER_NAME)
public MessagePact otherMessagePact(MessagePactBuilder builder) {
PactDslJsonBody body = new PactDslJsonBody();
body.stringValue("testParamA", "valueA");
Map<String, String> metadata = new HashMap<String, String>();
metadata.put("contentType", "application/json");
return builder.given("SomeOtherProviderState").expectsToReceive("another test message").withMetadata(metadata).withContent(body).toPact();
}
use of au.com.dius.pact.model.v3.messaging.MessagePact in project pact-jvm by DiUS.
the class PactVerificationsForMultipleHttpsAndMessagesTest method messagePact.
@Pact(provider = MESSAGE_PROVIDER_NAME, consumer = PACT_VERIFICATIONS_CONSUMER_NAME)
public MessagePact messagePact(MessagePactBuilder builder) {
PactDslJsonBody body = new PactDslJsonBody();
body.stringValue("testParam1", "value1");
Map<String, String> metadata = new HashMap<String, String>();
metadata.put("contentType", "application/json");
return builder.given("SomeProviderState").expectsToReceive("a test message").withMetadata(metadata).withContent(body).toPact();
}
use of au.com.dius.pact.model.v3.messaging.MessagePact in project pact-jvm by DiUS.
the class Defect371Test method createPact.
@Pact(provider = "provider1", consumer = "Defect371")
public MessagePact createPact(MessagePactBuilder builder) {
PactDslJsonBody body = new PactDslJsonBody();
body.stringValue("testParam1", "value1");
body.stringValue("testParam2", "value2");
Map<String, String> metadata = new HashMap<String, String>();
metadata.put("contentType", "application/json");
return builder.given("SomeProviderState").expectsToReceive("a test message").withMetadata(metadata).withContent(body).toPact();
}
Aggregations