- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 80 for mock (0.15 sec)
-
android/guava-tests/test/com/google/common/cache/ForwardingLoadingCacheTest.java
* the type is irrelevant at runtime. */ mock = mock(LoadingCache.class); forward = new ForwardingLoadingCache<String, Boolean>() { @Override protected LoadingCache<String, Boolean> delegate() { return mock; } }; } public void testGet() throws ExecutionException { when(mock.get("key")).thenReturn(Boolean.TRUE);
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Apr 17 12:41:04 GMT 2023 - 3.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/ForwardingCacheTest.java
* the type is irrelevant at runtime. */ mock = mock(Cache.class); forward = new ForwardingCache<String, Boolean>() { @Override protected Cache<String, Boolean> delegate() { return mock; } }; } public void testGetIfPresent() throws ExecutionException { when(mock.getIfPresent("key")).thenReturn(Boolean.TRUE);
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Apr 17 12:41:04 GMT 2023 - 3.1K bytes - Viewed (0) -
maven-core/src/test/java/org/apache/maven/toolchain/DefaultToolchainManagerPrivateTest.java
class DefaultToolchainManagerPrivateTest { // Mocks to inject into toolchainManager @Mock private Logger logger; @InjectMocks private DefaultToolchainManagerPrivate toolchainManager; @Mock private ToolchainFactory toolchainFactory_basicType; @Mock private ToolchainFactory toolchainFactory_rareType; @BeforeEach void setUp() {
Java - Registered: Sun Apr 28 03:35:10 GMT 2024 - Last Modified: Sat Apr 15 17:24:20 GMT 2023 - 5.7K bytes - Viewed (0) -
maven-core/src/test/java/org/apache/maven/toolchain/DefaultToolchainManagerTest.java
import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.slf4j.Logger; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.ArgumentMatchers.isA; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; class DefaultToolchainManagerTest { // Mocks to inject into toolchainManager @Mock
Java - Registered: Sun Apr 28 03:35:10 GMT 2024 - Last Modified: Sun Apr 16 12:54:16 GMT 2023 - 5.9K bytes - Viewed (0) -
android/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);
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Fri Oct 02 16:24:50 GMT 2020 - 5.9K 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);
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Fri Oct 02 16:24:50 GMT 2020 - 5.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/ForwardingObjectTester.java
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Thu Jan 05 19:41:03 GMT 2023 - 2.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/WrappingScheduledExecutorServiceTest.java
}; 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, TimeUnit.MINUTES); mock.assertLastMethodCalled("scheduleRunnable", 10, TimeUnit.MINUTES);
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Dec 16 19:54:45 GMT 2020 - 7.6K 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);
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 4K 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.
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 3.3K bytes - Viewed (0)