本文整理汇总了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());
}
}
示例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);
}
示例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);
}
}
}