We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have following pact and test in version 4.3.8
@Pact(consumer = "MyConsumer", provider = "MyProvider") public RequestResponsePact createPactForWiesaTest(PactDslWithProvider pactDslWithProvider) { PactDslResponse builder = pactDslWithProvider .given("Check buildId") .uponReceiving("Request to get wiesa buildId") .path("/wiesabuild") .headers(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN) .body("ala") .method("POST") .willRespondWith() .status(HttpStatus.OK.getCode()) .body("is OK", MediaType.TEXT_PLAIN); return builder.toPact(); } @Test @PactTestFor(providerName = "MyProvider", pactMethod = "createPactForWiesaTest", pactVersion = PactSpecVersion.V3) void testWiesaMultipartService(MockServer mockServer) throws MalformedURLException { String url = mockServer.getUrl(); String response; try (RxHttpClient rxHttpClient = RxHttpClient.create(new URL(url))) { response = rxHttpClient.toBlocking().retrieve( HttpRequest.POST("/wiesabuild", "ala") .contentType(MediaType.TEXT_PLAIN) .accept(MediaType.TEXT_PLAIN), String.class ); assertThat(response).as("body should be with simple is OK statement").isEqualToIgnoringWhitespace("is OK"); } }
and I have got error: class file for org.json.JSONObject not found for .body("ala") in creating pact.
Looks like dependency org.json:json is missing in au.com.dius.pact.consumer:junit5:4.3.8
The text was updated successfully, but these errors were encountered:
It's a transitive runtime dependency:
au.com.dius.pact.consumer:junit5:4.3.8 -> au.com.dius.pact.consumer:4.3.8 -> org.json:json:20210307
Are you using Maven? You might need to add that to your project if your dependency resolution is not working.
Sorry, something went wrong.
Same issue for me. I had to include in my dependencies testImplementation("org.json:json:20210307")
testImplementation("org.json:json:20210307")
No branches or pull requests
I have following pact and test in version 4.3.8
and I have got error: class file for org.json.JSONObject not found
for .body("ala") in creating pact.
Looks like dependency org.json:json is missing in au.com.dius.pact.consumer:junit5:4.3.8
The text was updated successfully, but these errors were encountered: