接口 MockRestServiceServer.MockRestServiceServerBuilder
- 所有已知实现类:
MockRestServiceServer.AbstractMockRestServiceServerBuilder,MockRestServiceServer.RestClientMockRestServiceServerBuilder,MockRestServiceServer.RestTemplateMockRestServiceServerBuilder
public static interface MockRestServiceServer.MockRestServiceServerBuilder
Builder to create a
MockRestServiceServer.-
方法概要
修饰符和类型方法说明Use theBufferingClientHttpRequestFactorywrapper to buffer the input and output streams, and for example, allow multiple reads of the response body.build()Build theMockRestServiceServerand set up the underlyingRestTemplatewith aClientHttpRequestFactorythat creates mock requests.build(RequestExpectationManager manager) An overloaded build alternative that accepts a customRequestExpectationManager.ignoreExpectOrder(boolean ignoreExpectOrder) Whether to allow expected requests to be executed in any order not necessarily matching the order of declaration.
-
方法详细资料
-
ignoreExpectOrder
Whether to allow expected requests to be executed in any order not necessarily matching the order of declaration.Effectively a shortcut for:
builder.build(new UnorderedRequestExpectationManager).By default this is set to
false- 参数:
ignoreExpectOrder- whether to ignore the order of expectations
-
bufferContent
MockRestServiceServer.MockRestServiceServerBuilder bufferContent()Use theBufferingClientHttpRequestFactorywrapper to buffer the input and output streams, and for example, allow multiple reads of the response body. -
build
MockRestServiceServer build()Build theMockRestServiceServerand set up the underlyingRestTemplatewith aClientHttpRequestFactorythat creates mock requests. -
build
An overloaded build alternative that accepts a customRequestExpectationManager.
-