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


Java Expectation.getHttpRequest方法代码示例

本文整理汇总了Java中org.mockserver.mock.Expectation.getHttpRequest方法的典型用法代码示例。如果您正苦于以下问题:Java Expectation.getHttpRequest方法的具体用法?Java Expectation.getHttpRequest怎么用?Java Expectation.getHttpRequest使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.mockserver.mock.Expectation的用法示例。


在下文中一共展示了Expectation.getHttpRequest方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: HttpRequestMatcher

import org.mockserver.mock.Expectation; //导入方法依赖的package包/类
public HttpRequestMatcher(Expectation expectation, MockServerLogger mockServerLogger) {
    this.expectation = expectation;
    this.httpRequest = expectation.getHttpRequest();
    this.mockServerLogger = mockServerLogger;
    if (httpRequest != null) {
        withMethod(httpRequest.getMethod());
        withPath(httpRequest.getPath());
        withQueryStringParameters(httpRequest.getQueryStringParameters());
        withBody(httpRequest.getBody());
        withHeaders(httpRequest.getHeaders());
        withCookies(httpRequest.getCookies());
        withKeepAlive(httpRequest.isKeepAlive());
        withSsl(httpRequest.isSecure());
    }
}
 
开发者ID:jamesdbloom,项目名称:mockserver,代码行数:16,代码来源:HttpRequestMatcher.java

示例2: ApiExpectation

import org.mockserver.mock.Expectation; //导入方法依赖的package包/类
public ApiExpectation(ApiSpecification specification, Expectation expectation) {
    this.specification = specification;
    this.request = expectation.getHttpRequest();
    this.response = expectation.getHttpResponse(false);
}
 
开发者ID:ozwolf-software,项目名称:raml-mock-server,代码行数:6,代码来源:ApiExpectation.java

示例3: ExpectationDTO

import org.mockserver.mock.Expectation; //导入方法依赖的package包/类
public ExpectationDTO(Expectation expectation) {
    if (expectation != null) {
        HttpRequest httpRequest = expectation.getHttpRequest();
        if (httpRequest != null) {
            this.httpRequest = new HttpRequestDTO(httpRequest, httpRequest.getNot());
        }
        HttpResponse httpResponse = expectation.getHttpResponse();
        if (httpResponse != null) {
            this.httpResponse = new HttpResponseDTO(httpResponse);
        }
        HttpTemplate httpResponseTemplate = expectation.getHttpResponseTemplate();
        if (httpResponseTemplate != null) {
            this.httpResponseTemplate = new HttpTemplateDTO(httpResponseTemplate);
        }
        HttpClassCallback httpResponseClassCallback = expectation.getHttpResponseClassCallback();
        if (httpResponseClassCallback != null) {
            this.httpResponseClassCallback = new HttpClassCallbackDTO(httpResponseClassCallback);
        }
        HttpObjectCallback httpResponseObjectCallback = expectation.getHttpResponseObjectCallback();
        if (httpResponseObjectCallback != null) {
            this.httpResponseObjectCallback = new HttpObjectCallbackDTO(httpResponseObjectCallback);
        }
        HttpForward httpForward = expectation.getHttpForward();
        if (httpForward != null) {
            this.httpForward = new HttpForwardDTO(httpForward);
        }
        HttpTemplate httpForwardTemplate = expectation.getHttpForwardTemplate();
        if (httpForwardTemplate != null) {
            this.httpForwardTemplate = new HttpTemplateDTO(httpForwardTemplate);
        }
        HttpClassCallback httpForwardClassCallback = expectation.getHttpForwardClassCallback();
        if (httpForwardClassCallback != null) {
            this.httpForwardClassCallback = new HttpClassCallbackDTO(httpForwardClassCallback);
        }
        HttpObjectCallback httpForwardObjectCallback = expectation.getHttpForwardObjectCallback();
        if (httpForwardObjectCallback != null) {
            this.httpForwardObjectCallback = new HttpObjectCallbackDTO(httpForwardObjectCallback);
        }
        HttpOverrideForwardedRequest httpOverrideForwardedRequest = expectation.getHttpOverrideForwardedRequest();
        if (httpOverrideForwardedRequest != null) {
            this.httpOverrideForwardedRequest = new HttpOverrideForwardedRequestDTO(httpOverrideForwardedRequest);
        }
        HttpError httpError = expectation.getHttpError();
        if (httpError != null) {
            this.httpError = new HttpErrorDTO(httpError);
        }
        Times times = expectation.getTimes();
        if (times != null) {
            this.times = new org.mockserver.client.serialization.model.TimesDTO(times);
        }
        TimeToLive timeToLive = expectation.getTimeToLive();
        if (timeToLive != null) {
            this.timeToLive = new TimeToLiveDTO(timeToLive);
        }
    }
}
 
开发者ID:jamesdbloom,项目名称:mockserver,代码行数:57,代码来源:ExpectationDTO.java


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