VerificationAfterDelay
Date: 2015-09-18

org.mockito.verification

## Interface VerificationAfterDelay

- All Superinterfaces:
    VerificationMode
  All Known Implementing Classes:
    After

      public interface VerificationAfterDelay
      extends VerificationMode

  VerificationAfterDelay is a `VerificationMode` that allows combining existing verification modes with an initial delay, e.g.

       verify(mock, after(100).atMost(5)).foo();

       verify(mock, after(100).never()).bar();

       verify(mock, after(200).atLeastOnce()).baz();

  This is similar to `timeout()` except the assertion will not terminate until either the condition is definitively failed, or the full time has elapsed (whereas timeout() will also stop if the conditions is true at any point, as is typically the case with never() etc initially).

  See examples in javadoc for `Mockito.verify(Object, VerificationMode)`

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `VerificationMode` | `atLeast(int minNumberOfInvocations)` Verifies that there is are least N invocations during the given period.
    `VerificationMode` | `atLeastOnce()` Verifies that there is at least 1 invocation during the given period.
    `VerificationMode` | `atMost(int maxNumberOfInvocations)` Verifies that there is are most N invocations during the given period.
    `VerificationMode` | `never()` Allows verification that there are no invocations at any point during the given period.
    `VerificationMode` | `only()` Verifies that there the given method is invoked and is the only method invoked.
    `VerificationMode` | `times(int wantedNumberOfInvocations)` Verifies that there are exactly N invocations during the given period.

    - ### Methods inherited from interface org.mockito.verification.VerificationMode

      `verify`

- - ### Method Detail

    - #### times

          VerificationMode times(int wantedNumberOfInvocations)

      Verifies that there are exactly N invocations during the given period. This will wait the full period given.

    - #### never

          VerificationMode never()

      Allows verification that there are no invocations at any point during the given period. This will wait the full period given, unless an invocation occurs (in which case there will be immediate failure)

    - #### atLeastOnce

          VerificationMode atLeastOnce()

      Verifies that there is at least 1 invocation during the given period. This will wait the full period given.

    - #### atLeast

          VerificationMode atLeast(int minNumberOfInvocations)

      Verifies that there is are least N invocations during the given period. This will wait the full period given.

    - #### atMost

          VerificationMode atMost(int maxNumberOfInvocations)

      Verifies that there is are most N invocations during the given period. This will wait the full period given, unless too many invocations occur (in which case there will be an immediate failure)

    - #### only

          VerificationMode only()

      Verifies that there the given method is invoked and is the only method invoked. This will wait the full period given, unless another method is invoked (in which case there will be an immediate failure)