本文整理了Java中com.github.tomakehurst.wiremock.client.WireMock.headRequestedFor()
方法的一些代码示例,展示了WireMock.headRequestedFor()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WireMock.headRequestedFor()
方法的具体详情如下:
包路径:com.github.tomakehurst.wiremock.client.WireMock
类名称:WireMock
方法名:headRequestedFor
暂无
代码示例来源:origin: georocket/georocket
/**
* Check if {@link ElasticsearchClient#isRunning()} returns true
* if it is running
* @param context the test context
*/
@Test
public void isRunning(TestContext context) {
wireMockRule1.stubFor(head(urlEqualTo("/"))
.willReturn(aResponse()
.withStatus(200)));
Async async = context.async();
client.isRunning().subscribe(r -> {
context.assertTrue(r);
wireMockRule1.verify(headRequestedFor(urlEqualTo("/")));
async.complete();
}, context::fail);
}
代码示例来源:origin: biezhi/java-library-examples
pf.fetchPage(url).fetchContent(new Page(url), 47);
WireMock.verify(1, WireMock.headRequestedFor(WireMock.urlEqualTo("/some/index.html")));
WireMock.verify(1, WireMock.getRequestedFor(WireMock.urlEqualTo("/some/index.html")));
pf.fetchPage(url).fetchContent(new Page(url), 4);
WireMock.verify(1, WireMock.headRequestedFor(WireMock.urlEqualTo("/some/invoice.pdf")));
WireMock.verify(0, WireMock.getRequestedFor(WireMock.urlEqualTo("/some/invoice.pdf")));
内容来源于网络,如有侵权,请联系作者删除!