1/* 2 * Copyright (c) 2007 Mockito contributors 3 * This program is made available under the terms of the MIT License. 4 */ 5 6package org.mockito.verification; 7 8import org.mockito.Mockito; 9import org.mockito.internal.verification.api.VerificationData; 10 11/** 12 * Allows verifying that certain behavior happened at least once / exact number 13 * of times / never. E.g: 14 * 15 * <pre class="code"><code class="java"> 16 * verify(mock, times(5)).someMethod("was called five times"); 17 * 18 * verify(mock, never()).someMethod("was never called"); 19 * 20 * verify(mock, atLeastOnce()).someMethod("was called at least once"); 21 * 22 * verify(mock, atLeast(2)).someMethod("was called at least twice"); 23 * 24 * verify(mock, atMost(3)).someMethod("was called at most 3 times"); 25 * 26 * </code></pre> 27 * 28 * <b>times(1) is the default</b> and can be omitted 29 * <p> 30 * See examples in javadoc for {@link Mockito#verify(Object, VerificationMode)} 31 */ 32public interface VerificationMode { 33 34 void verify(VerificationData data); 35 36}