Search in sources :

Example 1 with FindServeEventsResult

use of com.github.tomakehurst.wiremock.verification.FindServeEventsResult in project wiremock by wiremock.

the class RemoveServeEventsByRequestPatternTask method execute.

@Override
public ResponseDefinition execute(Admin admin, Request request, PathParams pathParams) {
    RequestPattern requestPattern = Json.read(request.getBodyAsString(), RequestPattern.class);
    FindServeEventsResult findServeEventsResult = admin.removeServeEventsMatching(requestPattern);
    return ResponseDefinition.okForJson(findServeEventsResult);
}
Also used : FindServeEventsResult(com.github.tomakehurst.wiremock.verification.FindServeEventsResult) RequestPattern(com.github.tomakehurst.wiremock.matching.RequestPattern)

Example 2 with FindServeEventsResult

use of com.github.tomakehurst.wiremock.verification.FindServeEventsResult in project wiremock by wiremock.

the class RemoveServeEventsByStubMetadataTask method execute.

@Override
public ResponseDefinition execute(Admin admin, Request request, PathParams pathParams) {
    StringValuePattern metadataPattern = Json.read(request.getBodyAsString(), StringValuePattern.class);
    FindServeEventsResult findServeEventsResult = admin.removeServeEventsForStubsMatchingMetadata(metadataPattern);
    return ResponseDefinition.okForJson(findServeEventsResult);
}
Also used : FindServeEventsResult(com.github.tomakehurst.wiremock.verification.FindServeEventsResult) StringValuePattern(com.github.tomakehurst.wiremock.matching.StringValuePattern)

Aggregations

FindServeEventsResult (com.github.tomakehurst.wiremock.verification.FindServeEventsResult)2 RequestPattern (com.github.tomakehurst.wiremock.matching.RequestPattern)1 StringValuePattern (com.github.tomakehurst.wiremock.matching.StringValuePattern)1