- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 45 for mock (0.39 sec)
-
guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java
} } @AndroidIncompatible // Mockito loses its ability to mock doGetRate as of Android 21 public void testMockingMockito() throws Exception { RateLimiter mock = Mockito.mock(RateLimiter.class); for (Method method : RateLimiter.class.getMethods()) { if (!isStatic(method.getModifiers()) && !NOT_WORKING_ON_MOCKS.contains(method.getName()) && !method.getDeclaringClass().equals(Object.class)) {
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 21.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java
} @AndroidIncompatible // Mocking ExecutorService is forbidden there. TODO(b/218700094): Don't mock. public void testGetExitingExecutorService_executorDelegatesToOriginal() { TestApplication application = new TestApplication(); ThreadPoolExecutor executor = mock(ThreadPoolExecutor.class); ThreadFactory threadFactory = mock(ThreadFactory.class); when(executor.getThreadFactory()).thenReturn(threadFactory);
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 28.2K bytes - Viewed (3) -
android/guava/src/com/google/common/util/concurrent/ListenableFuture.java
* SettableFuture} or one of the methods in the {@link Futures#immediateFuture Futures.immediate*} * family. <b>Avoid</b> creating a mock or stub {@code Future}. Mock and stub implementations are * fragile because they assume that only certain methods will be called and because they often * implement subtleties of the API improperly. *
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Jun 26 21:13:41 GMT 2023 - 8K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java
} } @AndroidIncompatible // Mockito loses its ability to mock doGetRate as of Android 21 public void testMockingMockito() throws Exception { RateLimiter mock = Mockito.mock(RateLimiter.class); for (Method method : RateLimiter.class.getMethods()) { if (!isStatic(method.getModifiers()) && !NOT_WORKING_ON_MOCKS.contains(method.getName()) && !method.getDeclaringClass().equals(Object.class)) {
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 21.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/ImmutableSortedMultisetTest.java
import static com.google.common.truth.Truth.assertThat; import static java.util.Arrays.asList; import static org.junit.Assert.assertThrows; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import com.google.common.collect.Multiset.Entry; import com.google.common.collect.testing.ListTestSuiteBuilder; import com.google.common.collect.testing.MinimalCollection;
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Thu Feb 22 20:09:59 GMT 2024 - 22.6K bytes - Viewed (0) -
futures/listenablefuture1/src/com/google/common/util/concurrent/ListenableFuture.java
* SettableFuture} or one of the methods in the {@link Futures#immediateFuture Futures.immediate*} * family. <b>Avoid</b> creating a mock or stub {@code Future}. Mock and stub implementations are * fragile because they assume that only certain methods will be called and because they often * implement subtleties of the API improperly. *
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Jun 26 21:13:41 GMT 2023 - 8K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/ConcurrentHashMultisetTest.java
import static java.util.Arrays.asList; import static org.junit.Assert.assertThrows; import static org.mockito.ArgumentMatchers.isA; import static org.mockito.Mockito.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import com.google.common.base.Equivalence; import com.google.common.collect.testing.features.CollectionFeature; import com.google.common.collect.testing.features.CollectionSize;
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 14.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java
} @AndroidIncompatible // Mocking ExecutorService is forbidden there. TODO(b/218700094): Don't mock. public void testGetExitingExecutorService_executorDelegatesToOriginal() { TestApplication application = new TestApplication(); ThreadPoolExecutor executor = mock(ThreadPoolExecutor.class); ThreadFactory threadFactory = mock(ThreadFactory.class); when(executor.getThreadFactory()).thenReturn(threadFactory);
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 28.2K bytes - Viewed (0) -
android/guava/src/com/google/common/base/Converter.java
* com.google.common.collect.Maps#asConverter Maps.asConverter}. For example, use this to * create a "fake" converter for a unit test. It is unnecessary (and confusing) to <i>mock</i> * the {@code Converter} type using a mocking framework. * <li>Extend this class and implement its {@link #doForward} and {@link #doBackward} methods.
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Thu Feb 15 16:12:13 GMT 2024 - 23K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Ordering.java
@Override public String toString() { return "Ordering.arbitrary()"; } /* * We need to be able to mock identityHashCode() calls for tests, because it * can take 1-10 seconds to find colliding objects. Mocking frameworks that * can do magic to mock static method calls still can't do so for a system * class, so we need the indirection. In production, Hotspot should still
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Apr 24 19:38:27 GMT 2024 - 39.4K bytes - Viewed (0)