use of au.com.dius.pact.consumer.junit.exampleclients.ConsumerClient in project pact-jvm by DiUS.
the class PactProviderWithMultipleFragmentsTest method runTestWithFragment2.
@Test
@PactVerification(value = "test_provider2", fragment = "createFragment2")
public void runTestWithFragment2() throws IOException {
Map expectedResponse = new HashMap();
expectedResponse.put("responsetest", true);
expectedResponse.put("name", "fred");
assertEquals(new ConsumerClient(mockTestProvider2.getUrl()).getAsMap("/", ""), expectedResponse);
}
use of au.com.dius.pact.consumer.junit.exampleclients.ConsumerClient in project pact-jvm by DiUS.
the class ExampleJavaConsumerPactRuleTest method runTest.
@Test
@PactVerification("test_provider")
public void runTest() throws IOException {
Assert.assertEquals(new ConsumerClient(provider.getUrl()).options("/second"), 200);
Map expectedResponse = new HashMap();
expectedResponse.put("responsetest", true);
expectedResponse.put("name", "harry");
assertEquals(new ConsumerClient(provider.getUrl()).getAsMap("/", ""), expectedResponse);
}
use of au.com.dius.pact.consumer.junit.exampleclients.ConsumerClient in project pact-jvm by DiUS.
the class V3ConsumerPactTest method runTest.
@Override
protected void runTest(MockServer mockServer, PactTestExecutionContext context) throws IOException {
Map expectedResponse = new HashMap();
expectedResponse.put("responsetest", true);
expectedResponse.put("version", "v3");
assertEquals(new ConsumerClient(mockServer.getUrl()).getAsMap("/", ""), expectedResponse);
}
use of au.com.dius.pact.consumer.junit.exampleclients.ConsumerClient in project pact-jvm by DiUS.
the class V3PactProviderTest method runTest.
@Test
@PactVerification
public void runTest() throws IOException {
Map expectedResponse = new HashMap();
expectedResponse.put("responsetest", true);
expectedResponse.put("version", "v3");
assertEquals(new ConsumerClient(mockTestProvider.getUrl()).getAsMap("/", ""), expectedResponse);
}
use of au.com.dius.pact.consumer.junit.exampleclients.ConsumerClient in project pact-jvm by DiUS.
the class V4HttpPactTest method runTest.
@Test
@PactVerification
public void runTest() throws IOException {
Map expectedResponse = Map.of("responsetest", true, "version", "v3");
assertEquals(new ConsumerClient(mockTestProvider.getUrl()).getAsMap("/", ""), expectedResponse);
}
Aggregations