use of au.com.dius.pact.model.MockHttpsKeystoreProviderConfig in project pact-jvm by DiUS.
the class PactProviderHttpsKeystoreTest method testKeystoreHappyPath.
@Test
@PactVerification(value = "test_provider")
public void testKeystoreHappyPath() {
MockHttpsKeystoreProviderConfig config = (MockHttpsKeystoreProviderConfig) mockTestProvider.getConfig();
LOGGER.info("Keystore path: " + config.getKeystore());
RestAssured.given().header("testreqheader", "testreqheadervalue").trustStore(config.getKeystore(), config.getKeystorePassword()).when().options(mockTestProvider.getConfig().url() + "/second").then().statusCode(200);
RestAssured.given().header("testreqheader", "testreqheadervalue").trustStore(config.getKeystore(), config.getKeystorePassword()).when().get(mockTestProvider.getConfig().url() + "/").then().body("responsetest", Matchers.equalTo(true)).body("name", Matchers.equalTo("harry"));
}
Aggregations