- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 436 for Mock (0.03 sec)
-
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) -
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) -
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) -
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) -
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) -
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) -
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) -
guava-tests/test/com/google/common/hash/FunnelsTest.java
PrimitiveSink primitiveSink = mock(PrimitiveSink.class); Funnels.byteArrayFunnel().funnel(new byte[] {4, 3, 2, 1}, primitiveSink); verify(primitiveSink).putBytes(new byte[] {4, 3, 2, 1}); } public void testForBytes_null() { assertNullsThrowException(Funnels.byteArrayFunnel()); } public void testForStrings() { PrimitiveSink primitiveSink = mock(PrimitiveSink.class);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 5.9K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/ForwardingObjectTester.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Jan 05 19:41:03 UTC 2023 - 2.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/UncaughtExceptionHandlersTest.java
import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import com.google.common.util.concurrent.UncaughtExceptionHandlers.Exiter; import junit.framework.TestCase; /** @author Gregory Kick */ public class UncaughtExceptionHandlersTest extends TestCase { private Runtime runtimeMock; @Override protected void setUp() { runtimeMock = mock(Runtime.class); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Feb 09 22:57:07 UTC 2022 - 1.2K bytes - Viewed (0)