当前位置: 首页>>代码示例>>Java>>正文


Java WireMock.reset方法代码示例

本文整理汇总了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));
}
 
开发者ID:aws,项目名称:aws-sdk-java-v2,代码行数:14,代码来源:MarshallingTestRunner.java

示例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);
}
 
开发者ID:zalando-nakadi,项目名称:paradox-nakadi-consumer,代码行数:9,代码来源:RxHttpRequestTest.java

示例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)));
}
 
开发者ID:aws,项目名称:aws-sdk-java-v2,代码行数:9,代码来源:UnmarshallingTestRunner.java

示例4: setupServer

import com.github.tomakehurst.wiremock.client.WireMock; //导入方法依赖的package包/类
@BeforeClass
public static void setupServer() {
    setupWireMockConnection();
    WireMock.configureFor(scheme, host, port, context);
    WireMock.reset();
}
 
开发者ID:eclipse,项目名称:microprofile-rest-client,代码行数:7,代码来源:WiremockArquillianTest.java

示例5: reset

import com.github.tomakehurst.wiremock.client.WireMock; //导入方法依赖的package包/类
@Before
public void reset() {
    WireMock.reset();
}
 
开发者ID:roothema,项目名称:deadpool,代码行数:5,代码来源:AbstractProcessorTest.java

示例6: setup

import com.github.tomakehurst.wiremock.client.WireMock; //导入方法依赖的package包/类
@Before
public void setup() {
  WireMock.reset();
}
 
开发者ID:XiaoMi,项目名称:galaxy-fds-sdk-android,代码行数:5,代码来源:TestGalaxyFDSClient.java


注:本文中的com.github.tomakehurst.wiremock.client.WireMock.reset方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。