Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 48 for mock (0.24 sec)

  1. 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)
  2. guava-testlib/src/com/google/common/util/concurrent/testing/MockFutureListener.java

    import com.google.common.util.concurrent.ListenableFuture;
    import java.util.concurrent.CountDownLatch;
    import java.util.concurrent.ExecutionException;
    import junit.framework.Assert;
    
    /**
     * A simple mock implementation of {@code Runnable} that can be used for testing ListenableFutures.
     *
     * @author Nishant Thakkar
     * @since 10.0
     */
    @GwtIncompatible
    public class MockFutureListener implements Runnable {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri May 12 18:12:42 GMT 2023
    - 3K bytes
    - Viewed (0)
  3. android/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 May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 14.2K bytes
    - Viewed (0)
  4. 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)
  5. android/guava-testlib/src/com/google/common/util/concurrent/testing/MockFutureListener.java

    import com.google.common.util.concurrent.ListenableFuture;
    import java.util.concurrent.CountDownLatch;
    import java.util.concurrent.ExecutionException;
    import junit.framework.Assert;
    
    /**
     * A simple mock implementation of {@code Runnable} that can be used for testing ListenableFutures.
     *
     * @author Nishant Thakkar
     * @since 10.0
     */
    @GwtIncompatible
    public class MockFutureListener implements Runnable {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri May 12 18:12:42 GMT 2023
    - 3K bytes
    - Viewed (0)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top