- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 71 for mock2 (0.04 sec)
-
mockwebserver/README.md
awkward-to-reproduce situations like 500 errors or slow-loading responses. ### Example Use MockWebServer the same way that you use mocking frameworks like [Mockito](https://github.com/mockito/mockito): 1. Script the mocks. 2. Run application code. 3. Verify that the expected requests were made. Here's a complete example: ```java public void test() throws Exception {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Dec 17 15:34:10 UTC 2023 - 5K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/ConcurrentHashMultisetTest.java
assertEquals(0, cms.count("a")); assertTrue(cms.removeExactly("b", 2)); assertEquals(1, cms.count("b")); } public void testIteratorRemove_actualMap() { // Override to avoid using mocks. multiset = ConcurrentHashMultiset.create(); multiset.add(KEY); multiset.add(KEY + "_2"); multiset.add(KEY); int mutations = 0;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 14.2K bytes - Viewed (0) -
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) -
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) -
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/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/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/collect/ConcurrentHashMultisetTest.java
assertEquals(0, cms.count("a")); assertTrue(cms.removeExactly("b", 2)); assertEquals(1, cms.count("b")); } public void testIteratorRemove_actualMap() { // Override to avoid using mocks. multiset = ConcurrentHashMultiset.create(); multiset.add(KEY); multiset.add(KEY + "_2"); multiset.add(KEY); int mutations = 0;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 14.2K bytes - Viewed (0)