Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 24 for mock (0.2 sec)

  1. 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)
  2. 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)
  3. android/guava-tests/test/com/google/common/collect/PeekingIteratorTest.java

    import java.util.List;
    import java.util.NoSuchElementException;
    import junit.framework.TestCase;
    import org.checkerframework.checker.nullness.qual.Nullable;
    
    /**
     * Unit test for {@link PeekingIterator}.
     *
     * @author Mick Killianey
     */
    @SuppressWarnings("serial") // No serialization is used in this test
    @GwtCompatible(emulated = true)
    @ElementTypesAreNonnullByDefault
    public class PeekingIteratorTest extends TestCase {
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 9K bytes
    - Viewed (0)
  4. 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)
  5. android/guava-tests/test/com/google/common/util/concurrent/AbstractClosingFutureTest.java

      final Waiter waiter = new Waiter();
      final CountDownLatch futureCancelled = new CountDownLatch(1);
      final Exception exception = new Exception();
      final Closeable mockCloseable = Mockito.mock(Closeable.class);
    
      @Override
      protected void tearDown() throws Exception {
        assertNoExpectedFailures();
        super.tearDown();
      }
    
      public void testFrom() throws Exception {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 74.7K bytes
    - Viewed (0)
  6. guava/src/com/google/common/cache/CacheBuilder.java

       * value, you should always choose it explicitly.
       *
       * <p>The current implementation uses the concurrency level to create a fixed number of hashtable
       * segments, each governed by its own write lock. The segment lock is taken once for each explicit
       * write, and twice for each cache loading computation (once prior to loading the new value, and
       * once after loading completes). Much internal cache management is performed at the segment
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 51.3K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/util/concurrent/AbstractFuture.java

              //
              // addListener has thrown an exception! SetFuture.run can't throw any exceptions so this
              // must have been caused by addListener itself. The most likely explanation is a
              // misconfigured mock. Try to switch to Failure.
              Failure failure;
              try {
                failure = new Failure(t);
              } catch (Exception | Error oomMostLikely) { // sneaky checked exception
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 22 21:17:24 GMT 2024
    - 63K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/AbstractClosingFutureTest.java

      final Waiter waiter = new Waiter();
      final CountDownLatch futureCancelled = new CountDownLatch(1);
      final Exception exception = new Exception();
      final Closeable mockCloseable = Mockito.mock(Closeable.class);
    
      @Override
      protected void tearDown() throws Exception {
        assertNoExpectedFailures();
        super.tearDown();
      }
    
      public void testFrom() throws Exception {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 75.3K bytes
    - Viewed (0)
  9. 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 Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 23K bytes
    - Viewed (1)
  10. android/guava-tests/test/com/google/common/cache/CacheTesting.java

          for (Segment<?, ?> segment : map.segments) {
            drainRecencyQueue(segment);
          }
        }
      }
    
      static void drainRecencyQueue(Segment<?, ?> segment) {
        segment.lock();
        try {
          segment.cleanUp();
        } finally {
          segment.unlock();
        }
      }
    
      static void drainReferenceQueues(Cache<?, ?> cache) {
        if (hasLocalCache(cache)) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 16.7K bytes
    - Viewed (0)
Back to top