- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for doReturn (0.07 sec)
-
src/test/java/jcifs/smb/SmbFileTest.java
// Arrange doReturn(true).when(smbFile).isFile(); // Act & Assert assertTrue(smbFile.isFile()); } @Test void testCanRead() throws SmbException { // Arrange doReturn(false).when(smbFile).isDirectory(); doReturn(true).when(smbFile).exists(); // Act & Assert
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 20.8K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbTransportPoolImplTest.java
when(trans1.acquire()).thenReturn(trans1); doNothing().when(trans1).close(); // Return mocked transports doReturn(trans1).when(poolSpy).getSmbTransport(eq(ctx), eq(addr1), anyInt(), anyBoolean(), anyBoolean()); doReturn(trans2).when(poolSpy).getSmbTransport(eq(ctx), eq(addr2), anyInt(), anyBoolean(), anyBoolean()); // When: Get transport by name
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 19.2K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbPipeHandleImplTest.java
import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.Mockito.atLeastOnce; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify;
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.7K bytes - Viewed (0) -
src/test/java/jcifs/smb/JAASAuthenticatorTest.java
import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertSame; import static org.junit.jupiter.api.Assertions.fail; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import java.util.HashMap;
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 30 05:58:03 UTC 2025 - 9.9K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbPipeHandleInternalTest.java
SmbPipeOutputStream mockOut = mock(SmbPipeOutputStream.class); // Create spy and override getInput/getOutput SmbPipeHandleImpl spyHandle = spy(handle); doReturn(mockIn).when(spyHandle).getInput(); doReturn(mockOut).when(spyHandle).getOutput(); // Setup mock behavior when(mockIn.read(any(byte[].class))).thenReturn(7); // Act byte[] buf = new byte[16];
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 16.7K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbRandomAccessFileTest.java
doReturn(-1).when(raf).read(any(byte[].class), anyInt(), eq(1)); assertEquals(-1, raf.read()); } @Test @DisplayName("readFully(): throws SmbEndOfFileException on premature EOF") void readFully_throws_onEOF() throws Exception { SmbRandomAccessFile raf = spy(newInstance("r", false, false, false));
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 18.1K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbSessionImplTest.java
import static org.mockito.ArgumentMatchers.eq; import static org.mockito.ArgumentMatchers.isNull; import static org.mockito.Mockito.clearInvocations; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify;
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 12.5K bytes - Viewed (0) -
src/test/java/jcifs/netbios/NodeStatusRequestTest.java
import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.lenient; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.verify; import java.lang.reflect.Field;
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 13.9K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/AbstractScheduledService.java
// to currentFuture doesn't race with itself so that currentFuture is assigned in the // correct order. Throwable scheduleFailure = null; Cancellable toReturn; lock.lock(); try { toReturn = initializeOrUpdateCancellationDelegate(schedule); } catch (Throwable e) { // Any Exception is either a RuntimeException or sneaky checked exception. //
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 27.8K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/AbstractScheduledService.java
// to currentFuture doesn't race with itself so that currentFuture is assigned in the // correct order. Throwable scheduleFailure = null; Cancellable toReturn; lock.lock(); try { toReturn = initializeOrUpdateCancellationDelegate(schedule); } catch (Throwable e) { // Any Exception is either a RuntimeException or sneaky checked exception. //
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 27.7K bytes - Viewed (0)