本文整理汇总了Java中com.github.tomakehurst.wiremock.common.ConsoleNotifier类的典型用法代码示例。如果您正苦于以下问题:Java ConsoleNotifier类的具体用法?Java ConsoleNotifier怎么用?Java ConsoleNotifier使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ConsoleNotifier类属于com.github.tomakehurst.wiremock.common包,在下文中一共展示了ConsoleNotifier类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: startServers
import com.github.tomakehurst.wiremock.common.ConsoleNotifier; //导入依赖的package包/类
@PostConstruct
public void startServers() throws IOException {
WireMockConfiguration eurekaServerConfig = wireMockConfig()
.notifier(new ConsoleNotifier(true))
.port(HTTP_PORT)
.fileSource(new SingleRootFileSource("src/test/resources/mocks/default/eureka"));
eurekaServer = new WireMockServer(eurekaServerConfig);
eurekaServer.start();
WireMockConfiguration secureConfig = wireMockConfig()
.notifier(new ConsoleNotifier(true))
.httpsPort(HTTPS_PORT)
.fileSource(new SingleRootFileSource("src/test/resources/mocks/default/secure"));
secureServer = new WireMockServer(secureConfig);
secureServer.start();
}
开发者ID:ordina-jworks,项目名称:microservices-dashboard-server,代码行数:18,代码来源:InMemoryDefaultWireMock.java
示例2: main
import com.github.tomakehurst.wiremock.common.ConsoleNotifier; //导入依赖的package包/类
public static void main(String[] args){
try {
int port = 8099;
WireMockServer server = new WireMockServer(
wireMockConfig().port(port).notifier(new ConsoleNotifier(true))
);
Path m = Paths.get("target/wiremock/mappings");
Path f = Paths.get("target/wiremock/files");
Files.createDirectories(m);
Files.createDirectories(f);
FileSource mappings = new SingleRootFileSource(m.toFile().getAbsolutePath());
FileSource files = new SingleRootFileSource(m.toFile().getAbsolutePath());
server.enableRecordMappings(mappings,files);
server.start();
NASDAQQuotesSoap soap = WsProvider.getNASDAQQuotesSoap("localhost:" + port);
server.stubFor(post(urlMatching(".*")).
willReturn(aResponse().proxiedFrom("http://" + WsProvider.NASDAQ_ADDRESS)));
for (MarketCenter mc : soap.listMarketCenters().getMarketCenter()) {
System.out.println(mc.getName());
}
server.stop();
} catch (Exception e){
e.printStackTrace();
} finally {
System.exit(0);
}
}
开发者ID:arcuri82,项目名称:pg6100,代码行数:34,代码来源:WsRecorder.java
注:本文中的com.github.tomakehurst.wiremock.common.ConsoleNotifier类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论