Skip to content

Fix broken Java JUnit 4 quickstart HTTP client example#417

Draft
Chandu0501 wants to merge 1 commit into
wiremock:mainfrom
Chandu0501:fix/docs-java-junit-quickstart-307
Draft

Fix broken Java JUnit 4 quickstart HTTP client example#417
Chandu0501 wants to merge 1 commit into
wiremock:mainfrom
Chandu0501:fix/docs-java-junit-quickstart-307

Conversation

@Chandu0501

Copy link
Copy Markdown

Summary

  • fix the Java/JUnit 4 quickstart snippet to use wireMockRule.url(...) instead of the undefined wiremockServern- make the Java 11+ HTTP client example compile by using URI.create(...), hrows Exception, and HttpRequest.BodyPublishers.noBody()n
    Closes Issue on Quick Start: API Mocking with Java and JUnit 4 #307.

Verification

  • pnpm build generated /docs/quickstart/java-junit/index.html, then failed in the repo's existing copy-static-homepage build hook with ENOENT while copying src/static/index.html to an invalid C:\C:... destination
  • mvn -q test passed in a throwaway verification project that exercises the corrected JUnit 4 snippet against WireMock 3.13.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue on Quick Start: API Mocking with Java and JUnit 4

1 participant