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);
}
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);
}
Aggregations