-
- All Implemented Interfaces:
public final class MockHttpServerStepDefinitions
-
-
Constructor Summary
Constructors Constructor Description MockHttpServerStepDefinitions()
-
Method Summary
-
-
Method Detail
-
startIfNecessary
final Unit startIfNecessary()
-
cleanExpectations
final Unit cleanExpectations()
-
targetRequest
@Given(value = "^the following HTTP request is received by mock server:$") final Unit targetRequest(DataTable data)
-
setJsonRequestBodyCondition
@Given(value = "^mock HTTP request body is a JSON with the following values:$") final Unit setJsonRequestBodyCondition(DataTable data)
-
setRequestParameterCondition
@Given(value = "^mock HTTP request has the following query parameters?:$") final Unit setRequestParameterCondition(DataTable data)
-
setPartialJsonMatchCondition
@Given(value = "^mock HTTP request body is a JSON with at least the following data:$") final Unit setPartialJsonMatchCondition(String rawExpected)
-
configureResponse
@Given(value = "^the following mock HTTP response is returned:$") final Unit configureResponse(String response)
-
configureResponseWithCode
@Given(value = "^the following mock HTTP response with code (\d+) is returned:$") final Unit configureResponseWithCode(Integer code, String response)
-
restrictLastResponseByCount
@Given(value = "^the last mock HTTP response is provided (\d+) times?$") final Unit restrictLastResponseByCount(Integer count)
-
delayLastResponse
@Given(value = "^the last mock HTTP response is delayed by (\d+) ms$") final Unit delayLastResponse(Long delayMs)
-
expectVerificationFailure
@Given(value = "HTTP server test verification failure is expected") final Unit expectVerificationFailure()
-
verifyRequestReceived
@Then(value = "^the following HTTP ([^\s]+) request for path ([^\s]+) with at least this JSON data is received:$") final Unit verifyRequestReceived(String httpMethod, String path, String expectedRawJson)
-
verifyJsonRequestWithoutSpecificDataIsReceived
@Then(value = "^the following JSON HTTP ([^^\s]+) request for path ([^\s]+) without the following data is received:$") final Unit verifyJsonRequestWithoutSpecificDataIsReceived(String httpMethod, String path, String expectedRawJson)
-
verifyNoCallIsMade
@Then(value = "^no HTTP ([^\s]+) call to ([^\s]+) is made$") final Unit verifyNoCallIsMade(String method, String path)
-
verifyNumberOfCalls
@Then(value = "^HTTP ([^\s]+) call to ([^\s]+) is made (\d+) times?$") final Unit verifyNumberOfCalls(String method, String path, Integer expectedCallsNumber)
-
verifyMinNumberOfCalls
@Then(value = "^HTTP ([^\s]+) call to ([^\s]+) is made at least (\d+) times?$") final Unit verifyMinNumberOfCalls(String method, String path, Integer expectedMinCallsNumber)
-
-
-
-