use of au.com.dius.pact.core.model.V4Pact in project pact-jvm by DiUS.
the class V4PactBuilderTest method messageInteraction.
@Pact(consumer = "v4_test_consumer")
V4Pact messageInteraction(PactBuilder builder) {
PactDslJsonBody body = new PactDslJsonBody();
body.stringValue("testParam1", "value1");
body.stringValue("testParam2", "value2");
Map<String, Object> metadata = new HashMap<>();
metadata.put("destination", Matchers.regexp("\\w+\\d+", "X001"));
return builder.usingLegacyMessageDsl().given("SomeProviderState").expectsToReceive("a test message").withMetadata(metadata).withContent(body).toPact();
}
Aggregations