- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 502 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/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) -
build-logic/documentation/src/test/groovy/gradlebuild/docs/dsl/source/model/PropertyMetaDataTest.groovy
} def usesSetterToLocateOverriddenPropertyWhenGetterDoesNotOverrideAnything() { MethodMetaData getter = Mock() MethodMetaData setter = Mock() MethodMetaData overriddenSetter = Mock() ClassMetaData overriddenClass = Mock() PropertyMetaData overriddenProperty = Mock() propertyMetaData.getter = getter propertyMetaData.setter = setter when:
Registered: Wed Nov 06 11:36:14 UTC 2024 - Last Modified: Wed Dec 09 08:14:05 UTC 2020 - 4.1K bytes - Viewed (0) -
build-logic/documentation/src/test/groovy/gradlebuild/docs/dsl/source/model/MethodMetaDataTest.groovy
} def locatesOverriddenMethodInAncestorClass() { ClassMetaData superClassMetaData = Mock() ClassMetaData ancestorClassMetaData = Mock() MethodMetaData overriddenMethod = Mock() when: def m = method.overriddenMethod then: m == overriddenMethod _ * owner.superClass >> superClassMetaData
Registered: Wed Nov 06 11:36:14 UTC 2024 - Last Modified: Wed Dec 09 08:14:05 UTC 2020 - 5.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)