本文整理了Java中com.github.tomakehurst.wiremock.client.WireMock.absent()
方法的一些代码示例,展示了WireMock.absent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WireMock.absent()
方法的具体详情如下:
包路径:com.github.tomakehurst.wiremock.client.WireMock
类名称:WireMock
方法名:absent
暂无
代码示例来源:origin: com.github.tomakehurst/wiremock-jre8
public static MultiValuePattern absent() {
return new MultiValuePattern(WireMock.absent());
}
代码示例来源:origin: georocket/georocket
/**
* Make sure request bodies that are too small are not compressed
*/
@Test
public void compressRequestBodiesMessageTooSmall(TestContext ctx) {
client.close();
client = new LoadBalancingHttpClient(rule.vertx(), true);
Buffer body = Buffer.buffer("Hello World");
wireMockRule1.stubFor(post(urlEqualTo("/"))
.withHeader("Content-Encoding", absent())
.withRequestBody(binaryEqualTo(body.getBytes()))
.willReturn(aResponse()
.withBody(expected1.encode())));
client.setHosts(Collections.singletonList(
URI.create("http://localhost:" + wireMockRule1.port())));
Async async = ctx.async();
client.performRequest(HttpMethod.POST, "/", body)
.doOnSuccess(o -> ctx.assertEquals(expected1, o))
.subscribe(o -> async.complete());
}
}
内容来源于网络,如有侵权,请联系作者删除!