- Sort Score
- Result 10 results
- Languages All
Results 81 - 90 of 773 for When (0.89 sec)
-
src/test/java/jcifs/smb/SmbTransportInternalTest.java
void hasCapability_variousCaps(int cap) throws SmbException { when(transport.hasCapability(anyInt())).thenAnswer(inv -> ((int) inv.getArgument(0)) >= 0); boolean result = transport.hasCapability(cap); assertEquals(cap >= 0, result); verify(transport, times(1)).hasCapability(cap); } // Invalid input: simulate underlying SmbException when capability check fails @Test
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 12.1K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbCopyUtilTest.java
when(sh.isSMB2()).thenReturn(true); when(dh.isSMB2()).thenReturn(true); when(sh.isSameTree(dh)).thenReturn(true); // Source open returns a handle that reports size 0 SmbFileHandleImpl sfd = mock(SmbFileHandleImpl.class); when(sfd.getInitialSize()).thenReturn(0L);
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 12.1K bytes - Viewed (0) -
src/test/java/jcifs/internal/witness/WitnessClientTest.java
lenient().when(mockContext.getConfig()).thenReturn(mockConfig); lenient().when(mockConfig.getWitnessHeartbeatTimeout()).thenReturn(120000L); lenient().when(mockConfig.getWitnessRegistrationTimeout()).thenReturn(300000L); lenient().when(mockConfig.getWitnessReconnectDelay()).thenReturn(1000L); lenient().when(mockConfig.isWitnessServiceDiscovery()).thenReturn(true); }
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Sat Aug 23 09:06:40 UTC 2025 - 9.8K bytes - Viewed (0) -
src/test/java/jcifs/util/HMACT64Test.java
try (MockedStatic<Crypto> mockedCrypto = mockStatic(Crypto.class)) { mockedCrypto.when(Crypto::getMD5).thenReturn(mockMd5); byte[] innerDigest = "inner_digest".getBytes(); byte[] finalDigest = "final_digest".getBytes(); when(mockMd5.digest()).thenReturn(innerDigest); when(mockMd5.digest(any(byte[].class))).thenReturn(finalDigest);
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 14.6K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/lease/LeaseManagerTest.java
void setUp() { mockContext = mock(CIFSContext.class); mockConfig = mock(Configuration.class); when(mockContext.getConfig()).thenReturn(mockConfig); when(mockConfig.getLeaseTimeout()).thenReturn(30000); when(mockConfig.getMaxLeases()).thenReturn(1000); when(mockConfig.getLeaseBreakTimeout()).thenReturn(60); leaseManager = new LeaseManager(mockContext); } @AfterEach
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 21 00:16:17 UTC 2025 - 13.2K bytes - Viewed (0) -
src/test/java/jcifs/SidResolverTest.java
doThrow(new CIFSException("Context cannot be null")).when(sidResolver).resolveSids(eq(null), anyString(), any(SID[].class)); assertThrows(CIFSException.class, () -> sidResolver.resolveSids(null, testServerName, testSids)); } @Test void testResolveSids_WithNullServerName() throws CIFSException { doThrow(new CIFSException("Server name cannot be null")).when(sidResolver)
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 15.5K bytes - Viewed (0) -
src/test/java/jcifs/internal/dfs/DfsReferralDataInternalTest.java
DfsReferralData mockData = mock(DfsReferralData.class); when(mockData.getServer()).thenReturn("SERVER"); when(mockData.getShare()).thenReturn("share"); when(mockData.getPath()).thenReturn("path"); when(mockData.getExpiration()).thenReturn(System.currentTimeMillis() + 60000); when(mockData.getPathConsumed()).thenReturn(0); when(mockData.getDomain()).thenReturn("DOMAIN");
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 28.2K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbOperationExceptionTest.java
} @Test @DisplayName("Should create exception with error code and message") void testBasicCreation() { // When exception = new SmbOperationException(SmbOperationException.ErrorCode.FILE_NOT_FOUND, "test.txt"); // Then assertNotNull(exception); assertEquals(SmbOperationException.ErrorCode.FILE_NOT_FOUND, exception.getErrorCode());Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Sat Aug 30 05:58:03 UTC 2025 - 16.1K bytes - Viewed (0) -
src/test/java/jcifs/smb1/smb1/SmbRandomAccessFileTest.java
smbFile.tree = smbTree; smbFile.fid = 1; smbFile.tree_num = 1; when(smbFile.isFile()).thenReturn(true); when(smbFile.getUncPath()).thenReturn("\\\\server\\share\\file.txt"); when(smbFile.isOpen()).thenReturn(true); // Mock the open method to do nothing doNothing().when(smbFile).open(anyInt(), anyInt(), anyInt(), anyInt());Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 9.3K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbSessionImplTest.java
when(resp.getSessionId()).thenReturn(42L); session.setSessionSetup(resp); when(transport.isDisconnected()).thenReturn(false); when(transport.isFailed()).thenReturn(false); assertTrue(session.isConnected()); assertFalse(session.isFailed()); when(transport.isDisconnected()).thenReturn(true); when(transport.isFailed()).thenReturn(true);
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 12.5K bytes - Viewed (0)