/** * @return a new {@link Spy} instance with an expectation initialized * @see #spy() * @see Spy#expectAtLeast(int, Threads) * @since 2.0 */ @Deprecated public static Spy expectAtLeast(int allowedStatements, Threads threadMatcher) { return spy().expectAtLeast(allowedStatements, threadMatcher); }
/** * @return a new {@link Spy} instance with an expectation initialized * @see #spy() * @see Spy#expectAtLeast(int, Threads) * @since 2.0 */ @Deprecated public static Spy expectAtLeast(int allowedStatements, Threads threadMatcher) { return spy().expectAtLeast(allowedStatements, threadMatcher); }
/** * @return a new {@link Spy} instance with an expectation initialized * @see #spy() * @see Spy#expectAtLeast(int, Threads, Query) * @since 2.2 */ @Deprecated public static Spy expectAtLeast(int allowedStatements, Query query, Threads threadMatcher) { return spy().expectAtLeast(allowedStatements, query, threadMatcher); }
/** * @return a new {@link Spy} instance with an expectation initialized * @see #spy() * @see Spy#expectAtLeast(int, Query) * @since 2.2 */ @Deprecated public static Spy expectAtLeast(int allowedStatements, Query query) { return spy().expectAtLeast(allowedStatements, query); }
/** * @return a new {@link Spy} instance with an expectation initialized * @see #spy() * @see Spy#expectAtLeast(int, Query) * @since 2.2 */ @Deprecated public static Spy expectAtLeast(int allowedStatements, Query query) { return spy().expectAtLeast(allowedStatements, query); }
/** * @return a new {@link Spy} instance with an expectation initialized * @see #spy() * @see Spy#expectAtLeast(int, Threads, Query) * @since 2.2 */ @Deprecated public static Spy expectAtLeast(int allowedStatements, Threads threadMatcher, Query query) { return spy().expectAtLeast(allowedStatements, threadMatcher, query); }
/** * @return a new {@link Spy} instance with an expectation initialized * @see #spy() * @see Spy#expectAtLeast(int) * @since 2.0 */ @Deprecated public static Spy expectAtLeast(int allowedStatements) { return spy().expectAtLeast(allowedStatements); }
/** * @return a new {@link Spy} instance with an expectation initialized * @see #spy() * @see Spy#expectAtLeast(int, Threads, Query) * @since 2.2 */ @Deprecated public static Spy expectAtLeast(int allowedStatements, Threads threadMatcher, Query query) { return spy().expectAtLeast(allowedStatements, threadMatcher, query); }
/** * @return a new {@link Spy} instance with an expectation initialized * @see #spy() * @see Spy#expectAtLeast(int, Threads, Query) * @since 2.2 */ @Deprecated public static Spy expectAtLeast(int allowedStatements, Query query, Threads threadMatcher) { return spy().expectAtLeast(allowedStatements, query, threadMatcher); }
/** * @return a new {@link Spy} instance with an expectation initialized * @see #spy() * @see Spy#expectAtLeast(int) * @since 2.0 */ @Deprecated public static Spy expectAtLeast(int allowedStatements) { return spy().expectAtLeast(allowedStatements); }
@Test public void testVerifyMultipleFailures() throws Exception { try { Sniffer.expectAtLeast(1, Threads.CURRENT).expectAtLeast(1, Threads.OTHERS).verify(); } catch (WrongNumberOfQueriesError e) { assertNotNull(e); assertNotNull(e.getCause()); assertTrue(WrongNumberOfQueriesError.class.isAssignableFrom(e.getCause().getClass())); assertNull(e.getCause().getCause()); } }