Wiremock Documentation states that the location of the file specified in withBodyFile should be in src/test/resources/__files. I would like to have file in src/test/resources/Testing_ABC/Testcase2/myfile.xml.
Is there any way I can achieve this ? I tried following, but it does not seem to work !
stubFor(get(urlPathEqualTo("/abc")).willReturn
(aResponse().withHeader("Content-Type",
"text/xml; charset=utf-8").withHeader
("Content-Encoding",
"gzip")
.withBodyFile
("src/test/resources/Testing_ABC/Testcase2/myfile.xml)));
However, when I put my file in src/test/resources/__files/myfile.xml and change the path accordingly, it works fine.
I am just wondering if I can make wiremock look in some other directory in resources other than __files just in order to have nice resource structure in project.