Class MockHttpServerStepDefinitions
-
- All Implemented Interfaces:
public final class MockHttpServerStepDefinitions
-
-
Constructor Summary
Constructors Constructor Description MockHttpServerStepDefinitions()
-
Method Summary
Modifier and Type Method Description final UnittargetRequest(DataTable data)final UnitsetJsonRequestBodyCondition(DataTable data)final UnitsetRequestParameterCondition(DataTable data)final UnitsetPartialJsonMatchCondition(String rawExpected)final UnitconfigureResponse(String response)final UnitconfigureResponseWithCode(Integer code, String response)final UnitrestrictLastResponseByCount(Integer count)final UnitdelayLastResponse(Long delayMs)final UnitverifyRequestReceived(String httpMethod, String path, String expectedRawJson)final UnitverifyJsonRequestWithoutSpecificDataIsReceived(String httpMethod, String path, String expectedRawJson)final UnitverifyNoCallIsMade(String method, String path)final UnitverifyNumberOfCalls(String method, String path, Integer expectedCallsNumber)final UnitverifyMinNumberOfCalls(String method, String path, Integer expectedMinCallsNumber)-
-
Method Detail
-
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)
-
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)
-
-
-
-