use of com.github.tomakehurst.wiremock.matching.UrlPathPattern in project cos-fleetshard by bf2fc6cc711aee1a0c2a.
the class WireMockServer method stubMatching.
public void stubMatching(RequestMethod method, String pattern, Supplier<ResponseDefinitionBuilder> supplier) {
UrlPathPattern matcher = WireMock.urlPathMatching(pattern);
MappingBuilder request = WireMock.request(method.getName(), matcher);
ResponseDefinitionBuilder response = supplier.get();
stubFor(request.willReturn(response));
}
use of com.github.tomakehurst.wiremock.matching.UrlPathPattern in project cos-fleetshard by bf2fc6cc711aee1a0c2a.
the class WireMockServer method stubMatching.
public void stubMatching(RequestMethod method, String pattern, Consumer<ResponseDefinitionBuilder> consumer) {
UrlPathPattern matcher = WireMock.urlPathMatching(pattern);
MappingBuilder request = WireMock.request(method.getName(), matcher);
ResponseDefinitionBuilder response = WireMock.aResponse();
consumer.accept(response);
stubFor(request.willReturn(response));
}
use of com.github.tomakehurst.wiremock.matching.UrlPathPattern in project cos-fleetshard by bf2fc6cc711aee1a0c2a.
the class WireMockServer method stubMatching.
public void stubMatching(RequestMethod method, String pattern, StringValuePattern bodyPatter, Consumer<ResponseDefinitionBuilder> consumer) {
UrlPathPattern matcher = WireMock.urlPathMatching(pattern);
MappingBuilder request = WireMock.request(method.getName(), matcher).withRequestBody(bodyPatter);
ResponseDefinitionBuilder response = WireMock.aResponse();
consumer.accept(response);
stubFor(request.willReturn(response));
}
use of com.github.tomakehurst.wiremock.matching.UrlPathPattern in project cos-fleetshard by bf2fc6cc711aee1a0c2a.
the class WireMockServer method stubMatching.
public void stubMatching(RequestMethod method, String pattern, ContentPattern<?> content, Supplier<ResponseDefinitionBuilder> supplier) {
UrlPathPattern matcher = WireMock.urlPathMatching(pattern);
MappingBuilder request = WireMock.request(method.getName(), matcher).withRequestBody(content);
ResponseDefinitionBuilder response = supplier.get();
stubFor(request.willReturn(response));
}
use of com.github.tomakehurst.wiremock.matching.UrlPathPattern in project cos-fleetshard by bf2fc6cc711aee1a0c2a.
the class WireMockServer method stubMatching.
public void stubMatching(RequestMethod method, String pattern, StringValuePattern bodyPatter, Supplier<ResponseDefinitionBuilder> supplier) {
UrlPathPattern matcher = WireMock.urlPathMatching(pattern);
MappingBuilder request = WireMock.request(method.getName(), matcher).withRequestBody(bodyPatter);
ResponseDefinitionBuilder response = supplier.get();
stubFor(request.willReturn(response));
}
Aggregations