Utku K
03/20/2024, 11:09 AMfun stubXXX(statusCode: Int, accountId: Int, responseSample: Sample): StubMapping {
return stubFor(
get(urlEqualTo("/accounts/$accountId/eligibility"))
.willReturn(
aResponse()
.withStatus(statusCode)
.withHeader(CONTENT_TYPE, APPLICATION_JSON)
.withBody(getReadSampleText(responseSample))
)
)
}
Language: kotlinBas Dijkstra
03/20/2024, 1:10 PMUtku K
03/20/2024, 1:38 PMBas Dijkstra
03/20/2024, 2:21 PM<http://wiremock.server/API1/endpoint>
and <http://wiremock.server/API2/endpoint>
instead of having them both call <http://wiremock.server/endpoint>
• See if you can have the application inject a header that allows you to differentiate between the two (but that might involve duplicating all your mocks)