use of au.com.dius.pact.model.MockHttpsProviderConfig in project pact-jvm by DiUS.
the class PactProviderHttpsTest method runTest.
@Test
@PactVerification(value = "test_provider")
public void runTest() throws IOException {
LOGGER.info("Config: " + mockTestProvider.getConfig());
MockHttpsProviderConfig config = (MockHttpsProviderConfig) mockTestProvider.getConfig();
LOGGER.info("Config Cert: " + config.getHttpsCertificate().certificate());
Assert.assertEquals(new ConsumerHttpsClient(mockTestProvider.getConfig().url()).options("/second"), 200);
Map expectedResponse = new HashMap();
expectedResponse.put("responsetest", true);
expectedResponse.put("name", "harry");
assertEquals(new ConsumerHttpsClient(mockTestProvider.getConfig().url()).getAsMap("/", ""), expectedResponse);
}
Aggregations