Class Verification


public class Verification extends ObjectWithJsonToString
Author:
jamesdbloom
  • Constructor Details

    • Verification

      public Verification()
  • Method Details

    • verification

      public static Verification verification()
    • withRequest

      public Verification withRequest(RequestDefinition requestDefinition)
    • getHttpRequest

      public RequestDefinition getHttpRequest()
    • withResponse

      public Verification withResponse(HttpResponse httpResponse)
    • getHttpResponse

      public HttpResponse getHttpResponse()
    • withExpectationId

      public Verification withExpectationId(ExpectationId expectationId)
    • getExpectationId

      public ExpectationId getExpectationId()
    • withTimes

      public Verification withTimes(VerificationTimes times)
    • getTimes

      public VerificationTimes getTimes()
    • getMaximumNumberOfRequestToReturnInVerificationFailure

      public Integer getMaximumNumberOfRequestToReturnInVerificationFailure()
    • withMaximumNumberOfRequestToReturnInVerificationFailure

      public Verification withMaximumNumberOfRequestToReturnInVerificationFailure(Integer maximumNumberOfRequestToReturnInVerificationFailure)
    • getDisposition

      public Disposition getDisposition()
    • withDisposition

      public Verification withDisposition(Disposition disposition)
      Narrow this verification to count only requests that were handled with the given Dispositionforwarded/proxied or mocked. 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, or null for no filter
      Returns:
      this verification for chaining
    • getTimeout

      public Long getTimeout()
    • withTimeout

      public Verification 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. The server returns success as soon as the verification is satisfied, or the last failure message when the timeout elapses. null, absent, or 0 preserves the original single-shot behaviour. The accepted value is capped server-side (see MockServerEventLog.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, or null/0 for the original single-shot behaviour
      Returns:
      this verification for chaining