本文整理汇总了Java中com.github.tomakehurst.wiremock.client.WireMock.reset方法的典型用法代码示例。如果您正苦于以下问题:Java WireMock.reset方法的具体用法?Java WireMock.reset怎么用?Java WireMock.reset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.github.tomakehurst.wiremock.client.WireMock
的用法示例。
在下文中一共展示了WireMock.reset方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: resetWireMock
import com.github.tomakehurst.wiremock.client.WireMock; //导入方法依赖的package包/类
/**
* Reset wire mock and re-configure stubbing.
*/
private void resetWireMock() {
WireMock.reset();
// Stub to return 200 for all requests
final ResponseDefinitionBuilder responseDefBuilder = aResponse().withStatus(200);
// XML Unmarshallers expect at least one level in the XML document.
if (model.getMetadata().isXmlProtocol()) {
responseDefBuilder.withBody("<foo></foo>");
}
stubFor(any(urlMatching(".*")).willReturn(responseDefBuilder));
}
示例2: setUp
import com.github.tomakehurst.wiremock.client.WireMock; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception {
MockitoAnnotations.initMocks(this);
WireMock.reset();
when(mockRequestProducer.getUrl()).thenReturn(new URL(NAKADI_URL));
when(mockRequestProducer.getHeaders()).thenReturn(Collections.emptyMap());
rxHttpRequest = new RxHttpRequest(TimeUnit.SECONDS.toMillis(60), null);
}
示例3: resetWireMock
import com.github.tomakehurst.wiremock.client.WireMock; //导入方法依赖的package包/类
/**
* Reset wire mock and re-configure stubbing.
*/
private void resetWireMock(GivenResponse givenResponse) {
WireMock.reset();
// Stub to return given response in test definition.
stubFor(any(urlMatching(".*")).willReturn(toResponseBuilder(givenResponse)));
}
示例4: setupServer
import com.github.tomakehurst.wiremock.client.WireMock; //导入方法依赖的package包/类
@BeforeClass
public static void setupServer() {
setupWireMockConnection();
WireMock.configureFor(scheme, host, port, context);
WireMock.reset();
}
示例5: reset
import com.github.tomakehurst.wiremock.client.WireMock; //导入方法依赖的package包/类
@Before
public void reset() {
WireMock.reset();
}
示例6: setup
import com.github.tomakehurst.wiremock.client.WireMock; //导入方法依赖的package包/类
@Before
public void setup() {
WireMock.reset();
}