@NotThreadSafe public abstract class AbstractSequencePlanBuilder extends AbstractTestPlanBuilder<SequencePlan>
SequencePlan.DEFAULT_REQUESTS_NUMBER| Constructor and Description |
|---|
AbstractSequencePlanBuilder() |
| Modifier and Type | Method and Description |
|---|---|
SequencePlan |
build()
Builds new test plan.
|
abstract void |
compose()
Composes the test plan.
|
void |
expect(int times,
RequestExpectationBuilder requestExpectationBuilder)
Expect the same request multiple times in sequence.
|
void |
expect(RequestExpectationBuilder requestExpectationBuilder)
Expect a request.
|
equalTo, equalToIgnoreCase, equalToJson, equalToXml, matching, request, responsepublic void expect(RequestExpectationBuilder requestExpectationBuilder)
The method adds new request expectation as specified by the argument. Also the method adds the response for the actual request.
The method adds new request expectation as specified by the argument to the end of expectations list. Also the method adds the response for the actual request to the end of responses list.
requestExpectationBuilder - Request expectation builder.NullPointerException - requestExpectationBuilder is null.public void expect(int times,
RequestExpectationBuilder requestExpectationBuilder)
A convenience method instead of calling
expect(RequestExpectationBuilder) multiple times.
times - Number of sequential requests with the same expectation.requestExpectationBuilder - Request expectation builder.NullPointerException - requestExpectationBuilder is null.IllegalArgumentException - times is not positive.public SequencePlan build()
TestPlanBuilderbuild in interface TestPlanBuilderbuild in class AbstractTestPlanBuilder<SequencePlan>public abstract void compose()
User has to implement this method when preparing a test plan. User can
invoke expect(com.github.tashoyan.httpspy.RequestExpectationBuilder) inside his implementation of this method to
specify request expectations.
Copyright © 2016. All rights reserved.