Slackbot
07/19/2023, 6:52 PMEric Deandrea
07/19/2023, 7:29 PMEric Deandrea
07/19/2023, 7:29 PMprivate final WireMockContainer wireMockContainer =
new WireMockContainer(DockerImageName.parse("wiremock/wiremock:2.35.0-1"))
.withClasspathResourceMapping("wiremock", "/home/wiremock", BindMode.READ_ONLY);Eric Deandrea
07/19/2023, 7:30 PM.withMappingLee Turner
07/19/2023, 8:40 PM.withMapping(name, json) method means you need to pass the contents of the json file as a String rather than the path to the json file ?Eric Deandrea
07/19/2023, 8:40 PMEric Deandrea
07/19/2023, 8:42 PMLee Turner
07/19/2023, 8:43 PM.withMapping method is different from the one you are using though I think ?Eric Deandrea
07/19/2023, 8:44 PMprivate final WireMockContainer wireMockContainer =
new WireMockContainer(DockerImageName.parse("wiremock/wiremock:2.35.0-1"))
.withMapping("twitter", "wiremock/mappings/twitter.com-current-stubs.json");Eric Deandrea
07/19/2023, 8:44 PMEric Deandrea
07/19/2023, 8:44 PMprivate final WireMockContainer wireMockContainer =
new WireMockContainer(DockerImageName.parse("wiremock/wiremock:2.35.0-1"))
.withClasspathResourceMapping("wiremock", "/home/wiremock", BindMode.READ_ONLY);Eric Deandrea
07/19/2023, 8:44 PMEric Deandrea
07/19/2023, 8:44 PMLee Turner
07/19/2023, 8:45 PMpublic WireMockContainer withMapping(String name, Class<?> resource, String resourceJson).Lee Turner
07/19/2023, 8:46 PMpublic WireMockContainer withMapping(String name, String json)Eric Deandrea
07/19/2023, 8:46 PMClassLee Turner
07/19/2023, 8:47 PMClass in the repo here - https://github.com/wiremock/wiremock-testcontainers-java/blob/main/src/test/java/org/wiremock/integrations/testcontainers/WireMockContainerTest.java#L33Lee Turner
07/19/2023, 8:47 PMEric Deandrea
07/19/2023, 8:48 PMLee Turner
07/19/2023, 8:48 PMEric Deandrea
07/19/2023, 8:50 PMEric Deandrea
07/19/2023, 8:50 PMcom/acme/todo/WIremockResourceTestLifecycleManagerEric Deandrea
07/19/2023, 8:51 PM.withMapping that doesn’t take a class. maybe it expects the actual jsonEric Deandrea
07/19/2023, 8:51 PMLee Turner
07/19/2023, 8:51 PMwithMapping(String name, String json)Lee Turner
07/19/2023, 8:53 PMEric Deandrea
07/19/2023, 8:58 PMFiles & Paths classes 🙂 Which doesn’t work if it want to set it up as a class-level attribute 🙂Eric Deandrea
07/19/2023, 8:58 PMLee Turner
07/19/2023, 8:58 PMEric Deandrea
07/19/2023, 8:59 PMEric Deandrea
07/19/2023, 8:59 PMLee Turner
07/19/2023, 8:59 PMEric Deandrea
07/19/2023, 8:59 PMEric Deandrea
07/19/2023, 8:59 PMLee Turner
07/19/2023, 8:59 PMEric Deandrea
07/19/2023, 9:00 PMLee Turner
07/19/2023, 9:00 PMLee Turner
07/19/2023, 9:01 PMEric Deandrea
07/19/2023, 9:01 PMLee Turner
07/19/2023, 9:01 PMOleg Nenashev
07/20/2023, 7:58 AMOleg Nenashev
07/20/2023, 8:01 AM