Package org.mockserver.verify
Class Verification
java.lang.Object
org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
org.mockserver.model.ObjectWithJsonToString
org.mockserver.verify.Verification
- Author:
- jamesdbloom
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetTimes()static VerificationwithDisposition(Disposition disposition) Narrow this verification to count only requests that were handled with the givenDisposition—forwarded/proxiedormocked.withExpectationId(ExpectationId expectationId) withMaximumNumberOfRequestToReturnInVerificationFailure(Integer maximumNumberOfRequestToReturnInVerificationFailure) withRequest(RequestDefinition requestDefinition) withResponse(HttpResponse httpResponse) withTimeout(Long timeout) Enable server-side eventual verification: when set to a positive number of milliseconds the server waits (asynchronously) and re-evaluates this verification until it passes or the timeout elapses, rather than evaluating the event log once and immediately accepting/rejecting.withTimes(VerificationTimes times) Methods inherited from class org.mockserver.model.ObjectWithJsonToString
toStringMethods inherited from class org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
equals, fieldsExcludedFromEqualsAndHashCode, hashCode
-
Constructor Details
-
Verification
public Verification()
-
-
Method Details
-
verification
-
withRequest
-
getHttpRequest
-
withResponse
-
getHttpResponse
-
withExpectationId
-
getExpectationId
-
withTimes
-
getTimes
-
getMaximumNumberOfRequestToReturnInVerificationFailure
-
withMaximumNumberOfRequestToReturnInVerificationFailure
public Verification withMaximumNumberOfRequestToReturnInVerificationFailure(Integer maximumNumberOfRequestToReturnInVerificationFailure) -
getDisposition
-
withDisposition
Narrow this verification to count only requests that were handled with the givenDisposition—forwarded/proxiedormocked. When unset, all received requests are counted regardless of how they were handled (the original behaviour).- Parameters:
disposition- the request handling outcome to filter by, ornullfor no filter- Returns:
- this verification for chaining
-
getTimeout
-
withTimeout
Enable server-side eventual verification: when set to a positive number of milliseconds the server waits (asynchronously) and re-evaluates this verification until it passes or the timeout elapses, rather than evaluating the event log once and immediately accepting/rejecting. The server returns success as soon as the verification is satisfied, or the last failure message when the timeout elapses.null, absent, or0preserves the original single-shot behaviour. The accepted value is capped server-side (seeMockServerEventLog.MAX_VERIFY_TIMEOUT_MILLIS) so a client cannot tie up server resources indefinitely. The wait is fully asynchronous and never holds a Netty I/O thread.- Parameters:
timeout- the maximum time, in milliseconds, to wait for the verification to pass, ornull/0for the original single-shot behaviour- Returns:
- this verification for chaining
-