org.mockito.Mockito#times ( )源码实例Demo

下面列出了org.mockito.Mockito#times ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: mockito-java8   文件: WithMockito.java
/**
 * Delegates call to {@link Mockito#times(int)}.
 */
default VerificationMode times(int wantedNumberOfInvocations) {
    return Mockito.times(wantedNumberOfInvocations);
}
 
/**
 * 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);
}