Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 173 for fake (0.14 sec)

  1. guava-tests/test/com/google/common/eventbus/AsyncEventBusTest.java

    /**
     * Test case for {@link AsyncEventBus}.
     *
     * @author Cliff Biffle
     */
    public class AsyncEventBusTest extends TestCase {
      private static final String EVENT = "Hello";
    
      /** The executor we use to fake asynchronicity. */
      private FakeExecutor executor;
    
      private AsyncEventBus bus;
    
      @Override
      protected void setUp() throws Exception {
        super.setUp();
        executor = new FakeExecutor();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.3K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/cache/CacheBuilderTest.java

                int behavior = random.nextInt(4);
                if (behavior == 0) { // throw an exception
                  exceptionCount.incrementAndGet();
                  throw new RuntimeException("fake exception for test");
                } else if (behavior == 1) { // return null
                  computeNullCount.incrementAndGet();
                  return null;
                } else if (behavior == 2) { // slight delay before returning
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Oct 03 20:10:02 GMT 2023
    - 23.2K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/eventbus/AsyncEventBusTest.java

    /**
     * Test case for {@link AsyncEventBus}.
     *
     * @author Cliff Biffle
     */
    public class AsyncEventBusTest extends TestCase {
      private static final String EVENT = "Hello";
    
      /** The executor we use to fake asynchronicity. */
      private FakeExecutor executor;
    
      private AsyncEventBus bus;
    
      @Override
      protected void setUp() throws Exception {
        super.setUp();
        executor = new FakeExecutor();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue May 15 20:25:06 GMT 2018
    - 2.3K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/io/MoreFilesTest.java

        MoreFiles.touch(temp);
        assertThat(Files.getLastModifiedTime(temp).toMillis()).isNotEqualTo(0);
      }
    
      public void testCreateParentDirectories_root() throws IOException {
        // We use a fake filesystem to sidestep flaky problems with Windows (b/136041958).
        try (FileSystem fs = Jimfs.newFileSystem(Configuration.unix())) {
          Path root = fs.getRootDirectories().iterator().next();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Jan 29 22:57:05 GMT 2024
    - 27.2K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java

        Runnable runMe =
            new Runnable() {
              @Override
              public void run() {
                numCalls.incrementAndGet();
                throw new RuntimeException("FAKE EXCEPTION!");
              }
            };
    
        e.execute(runMe);
        e.execute(runMe);
        fakePool.runAll();
    
        assertEquals(2, numCalls.get());
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 11.4K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/RegularImmutableList.java

        return size;
      }
    
      @Override
      int copyIntoArray(@Nullable Object[] dst, int dstOff) {
        System.arraycopy(array, 0, dst, dstOff, size);
        return dstOff + size;
      }
    
      // The fake cast to E is safe because the creation methods only allow E's
      @Override
      @SuppressWarnings("unchecked")
      public E get(int index) {
        checkElementIndex(index, size);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Nov 30 21:54:06 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  7. guava/src/com/google/common/base/Stopwatch.java

     * that is already in the desired state.
     *
     * <p>When testing code that uses this class, use {@link #createUnstarted(Ticker)} or {@link
     * #createStarted(Ticker)} to supply a fake or mock ticker. This allows you to simulate any valid
     * behavior of the stopwatch.
     *
     * <p><b>Note:</b> This class is not thread-safe.
     *
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 23 15:09:35 GMT 2023
    - 9.2K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/cache/CacheBuilderTest.java

                int behavior = random.nextInt(4);
                if (behavior == 0) { // throw an exception
                  exceptionCount.incrementAndGet();
                  throw new RuntimeException("fake exception for test");
                } else if (behavior == 1) { // return null
                  computeNullCount.incrementAndGet();
                  return null;
                } else if (behavior == 2) { // slight delay before returning
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Oct 03 20:10:02 GMT 2023
    - 25.5K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java

        Runnable runMe =
            new Runnable() {
              @Override
              public void run() {
                numCalls.incrementAndGet();
                throw new RuntimeException("FAKE EXCEPTION!");
              }
            };
    
        e.execute(runMe);
        e.execute(runMe);
        fakePool.runAll();
    
        assertEquals(2, numCalls.get());
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 11.4K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/base/Stopwatch.java

     * that is already in the desired state.
     *
     * <p>When testing code that uses this class, use {@link #createUnstarted(Ticker)} or {@link
     * #createStarted(Ticker)} to supply a fake or mock ticker. This allows you to simulate any valid
     * behavior of the stopwatch.
     *
     * <p><b>Note:</b> This class is not thread-safe.
     *
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Nov 15 21:38:09 GMT 2022
    - 8.5K bytes
    - Viewed (0)
Back to top