Java Code Examples for org.mockito.mockito#times()

The following examples show how to use org.mockito.mockito#times() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WithMockito.java    From mockito-java8 with Apache License 2.0 4 votes vote down vote up
/**
 * Delegates call to {@link Mockito#times(int)}.
 */
default VerificationMode times(int wantedNumberOfInvocations) {
    return Mockito.times(wantedNumberOfInvocations);
}
 
Example 2
Source File: RestClientMockHelper.java    From ods-provisioning-app with Apache License 2.0 3 votes vote down vote up
/**
 * Verifies that execute is called exactly one time with a argument that matches the specified
 * matcher.
 *
 * @param wantedArgument a {@link RestClientCallArgumentMatcher} to specify the expected argument
 * @param wantedNumberOfInvocations expected number of invocations
 * @throws IOException
 */
public void verifyExecute(
    RestClientCallArgumentMatcher wantedArgument, int wantedNumberOfInvocations)
    throws IOException {
  VerificationMode times = Mockito.times(wantedNumberOfInvocations);
  verifyExecute(wantedArgument, times);
}