本文整理汇总了Java中com.github.tomakehurst.wiremock.core.Options类的典型用法代码示例。如果您正苦于以下问题:Java Options类的具体用法?Java Options怎么用?Java Options使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Options类属于com.github.tomakehurst.wiremock.core包,在下文中一共展示了Options类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Recorder
import com.github.tomakehurst.wiremock.core.Options; //导入依赖的package包/类
Recorder(int port, String proxyTo, String pathToSave) {
this.proxyTo = proxyTo;
this.recordingPath = ROOT_PATH + pathToSave;
Options options = new WireMockConfiguration()
.port(port)
.withRootDirectory(recordingPath)
.notifier(new Slf4jNotifier(true));
this.wireMockServer = new WireMockServer(options);
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
if (wireMockServer.isRunning())
this.stop();
}));
}
示例2: options
import com.github.tomakehurst.wiremock.core.Options; //导入依赖的package包/类
@Bean Options options() {
// WireMock server needs to dump the files somewhere so we need to create this folder
new File("target", "mappings").mkdirs();
return WireMockSpring.options()
.withRootDirectory("target");
}
示例3: buildWireMock
import com.github.tomakehurst.wiremock.core.Options; //导入依赖的package包/类
protected static void buildWireMock(Options options) {
wireMockServer = new WireMockServer(options);
wireMockServer.start();
}