Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 38 for mock2 (0.05 sec)

  1. android/guava-tests/test/com/google/common/util/concurrent/WrappingScheduledExecutorServiceTest.java

            public void run() {}
          };
    
      public void testSchedule() {
        MockExecutor mock = new MockExecutor();
        TestExecutor testExecutor = new TestExecutor(mock);
    
        @SuppressWarnings("unused") // https://errorprone.info/bugpattern/FutureReturnValueIgnored
        Future<?> possiblyIgnoredError = testExecutor.schedule(DO_NOTHING, 10, MINUTES);
        mock.assertLastMethodCalled("scheduleRunnable", 10, MINUTES);
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/WrappingExecutorServiceTest.java

        MockExecutor mock = new MockExecutor();
        TestExecutor testExecutor = new TestExecutor(mock);
        assertFalse(testExecutor.awaitTermination(10, MILLISECONDS));
        mock.assertLastMethodCalled("awaitTermination");
        assertFalse(testExecutor.isTerminated());
        mock.assertLastMethodCalled("isTerminated");
        assertFalse(testExecutor.isShutdown());
        mock.assertLastMethodCalled("isShutdown");
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/WrappingExecutorServiceTest.java

        MockExecutor mock = new MockExecutor();
        TestExecutor testExecutor = new TestExecutor(mock);
        assertFalse(testExecutor.awaitTermination(10, MILLISECONDS));
        mock.assertLastMethodCalled("awaitTermination");
        assertFalse(testExecutor.isTerminated());
        mock.assertLastMethodCalled("isTerminated");
        assertFalse(testExecutor.isShutdown());
        mock.assertLastMethodCalled("isShutdown");
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  4. 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);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  5. 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);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  6. compat/maven-embedder/src/test/java/org/apache/maven/cli/event/ExecutionEventLoggerTest.java

        }
    
        @Test
        void testTerminalWidth() {
            // prepare
            Logger logger = mock(Logger.class);
            when(logger.isInfoEnabled()).thenReturn(true);
    
            ExecutionEvent event = mock(ExecutionEvent.class);
            MavenProject project = mock(MavenProject.class);
            when(project.getGroupId()).thenReturn("org.apache.maven.plugins.overflow");
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/hash/HashingOutputStreamTest.java

      private final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
    
      @SuppressWarnings("DoNotMock")
      @Override
      protected void setUp() throws Exception {
        super.setUp();
        hasher = mock(Hasher.class);
        hashFunction = mock(HashFunction.class);
    
        when(hashFunction.newHasher()).thenReturn(hasher);
      }
    
      public void testWrite_putSingleByte() throws Exception {
        int b = 'q';
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 11 22:00:03 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  8. compat/maven-compat/src/test/java/org/apache/maven/artifact/installer/ArtifactInstallerTest.java

    import org.apache.maven.session.scope.internal.SessionScope;
    import org.junit.jupiter.api.Test;
    
    import static org.codehaus.plexus.testing.PlexusExtension.getBasedir;
    import static org.mockito.Mockito.mock;
    
    /**
     */
    @Deprecated
    class ArtifactInstallerTest extends AbstractArtifactComponentTestCase {
        @Inject
        private ArtifactInstaller artifactInstaller;
    
        @Inject
        private SessionScope sessionScope;
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/CycleDetectingLockFactoryTest.java

        lock1.lock();
        lock3.lock();
        lock3.unlock();
        lock2.lock();
        lock3.lock();
      }
    
      public void testExplicitOrdering_violations() {
        lock3.lock();
        PotentialDeadlockException expected =
            assertThrows(PotentialDeadlockException.class, () -> lock2.lock());
        checkMessage(expected, "MyOrder.THIRD -> MyOrder.SECOND");
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 16.1K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/util/concurrent/CycleDetectingLockFactoryTest.java

        lock1.lock();
        lock3.lock();
        lock3.unlock();
        lock2.lock();
        lock3.lock();
      }
    
      public void testExplicitOrdering_violations() {
        lock3.lock();
        PotentialDeadlockException expected =
            assertThrows(PotentialDeadlockException.class, () -> lock2.lock());
        checkMessage(expected, "MyOrder.THIRD -> MyOrder.SECOND");
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 16.1K bytes
    - Viewed (0)
Back to top