Home | History | Annotate | Download | only in mockito

Lines Matching refs:Timeout

36 import org.mockito.verification.Timeout;
79 * <a href="#22">22. Verification with timeout (Since 1.8.5) </a><br/>
868 * <h3 id="22">22. <a class="meaningful_link" href="#verification_timeout" name="verification_timeout">Verification with timeout</a> (Since 1.8.5)</h3>
870 * Allows verifying with timeout. It causes a verify to wait for a specified period of time for a desired
882 * verify(mock, timeout(100)).someMethod();
884 * verify(mock, timeout(100).times(1)).someMethod();
887 * verify(mock, timeout(100).times(2)).someMethod();
890 * verify(mock, timeout(100).atLeast(2)).someMethod();
894 * verify(mock, new Timeout(100, yourOwnVerificationMode)).someMethod();
2717 * Allows verifying with timeout. It causes a verify to wait for a specified period of time for a desired
2722 * the final test result is known early (e.g. if a never() fails), whereas timeout() will stop early as soon
2724 * and then later fail. In that case, timeout would pass as soon as times(2) passes, whereas after would run until
2730 * verify(mock, timeout(100)).someMethod();
2732 * verify(mock, timeout(100).times(1)).someMethod();
2734 * //passes as soon as someMethod() has been called 2 times before the given timeout
2735 * verify(mock, timeout(100).times(2)).someMethod();
2737 * //equivalent: this also passes as soon as someMethod() has been called 2 times before the given timeout
2738 * verify(mock, timeout(100).atLeast(2)).someMethod();
2742 * verify(mock, new Timeout(100, yourOwnVerificationMode)).someMethod();
2751 public static VerificationWithTimeout timeout(long millis) {
2752 return new Timeout(millis, VerificationModeFactory.times(1));
2760 * This differs from {@link Mockito#timeout timeout()} in that after() will wait the full period, whereas timeout()
2762 * which can pass and then later fail. In that case, timeout would pass as soon as times(2) passes, whereas after would