Search in sources :

Example 1 with FindNearMissesResult

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

the class FindNearMissesForRequestPatternTask method execute.

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

Example 2 with FindNearMissesResult

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

the class FindNearMissesForRequestTask method execute.

@Override
public ResponseDefinition execute(Admin admin, Request request, PathParams pathParams) {
    LoggedRequest loggedRequest = Json.read(request.getBodyAsString(), LoggedRequest.class);
    FindNearMissesResult nearMissesResult = admin.findTopNearMissesFor(loggedRequest);
    return ResponseDefinition.okForJson(nearMissesResult);
}
Also used : LoggedRequest(com.github.tomakehurst.wiremock.verification.LoggedRequest) FindNearMissesResult(com.github.tomakehurst.wiremock.verification.FindNearMissesResult)

Aggregations

FindNearMissesResult (com.github.tomakehurst.wiremock.verification.FindNearMissesResult)2 RequestPattern (com.github.tomakehurst.wiremock.matching.RequestPattern)1 LoggedRequest (com.github.tomakehurst.wiremock.verification.LoggedRequest)1