- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 96 for mock2 (0.19 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) -
android/guava-tests/test/com/google/common/io/FlushablesTest.java
// 'swallowException' when the mock does not throw an exception. setupFlushable(false); doFlush(mockFlushable, false, false); setupFlushable(false); doFlush(mockFlushable, true, false); } public void testFlush_flushableWithEatenException() throws IOException { // make sure that no exception is thrown if 'swallowException' is true // when the mock does throw an exception on flush.
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 3.3K 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/io/CloseablesTest.java
// 'swallowException' when the mock does not throw an exception. setupCloseable(false); doClose(mockCloseable, false, false); setupCloseable(false); doClose(mockCloseable, true, false); } public void testClose_closeableWithEatenException() throws IOException { // make sure that no exception is thrown if 'swallowException' is true // when the mock does throw an exception. setupCloseable(true);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 4K 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)