- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 2,390 for when (0.02 sec)
-
src/test/java/jcifs/config/PropertyConfigurationTest.java
void testEmptyProperties() throws CIFSException { // Given Properties emptyProps = new Properties(); // When PropertyConfiguration emptyConfig = new PropertyConfiguration(emptyProps); // Then assertNotNull(emptyConfig); // Hostname may be null when not provided in properties // This is expected behavior } @Test
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.3K bytes - Viewed (0) -
src/test/java/jcifs/smb/DosFileFilterTest.java
when(mockFile.getAttributes()).thenReturn(SmbFile.ATTR_READONLY | SmbFile.ATTR_HIDDEN | SmbFile.ATTR_SYSTEM); // When calling accept // Then it should be accepted because the READONLY attribute is present assertTrue(dosFileFilter.accept(mockFile)); } /** * Tests that the accept method returns false when the file attributes do not
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 6.2K bytes - Viewed (0) -
src/test/java/jcifs/internal/fscc/BasicFileInformationTest.java
void testInterfaceMock() { // Given when(mockBasicFileInfo.getAttributes()).thenReturn(TEST_ATTRIBUTES); when(mockBasicFileInfo.getCreateTime()).thenReturn(TEST_CREATE_TIME); when(mockBasicFileInfo.getLastWriteTime()).thenReturn(TEST_LAST_WRITE_TIME); when(mockBasicFileInfo.getLastAccessTime()).thenReturn(TEST_LAST_ACCESS_TIME); when(mockBasicFileInfo.getSize()).thenReturn(1024L);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 13K bytes - Viewed (0) -
src/test/java/jcifs/dcerpc/msrpc/samrTest.java
samr.SamrSamEntry entry = new samr.SamrSamEntry(); when(mockNdrBuffer.dec_ndr_long()).thenReturn(1, 100); // idx, _name_bufferp when(mockNdrBuffer.dec_ndr_short()).thenReturn(4, 6); // length, maximum_length when(mockDeferredBuffer.dec_ndr_long()).thenReturn(-1); // Invalid _name_buffers // When/Then: Should throw exception
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 33.7K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbPipeHandleImplTest.java
when(pipe.ensureTreeConnected()).thenReturn(tree); when(tree.acquire()).thenReturn(tree); when(tree.isSMB2()).thenReturn(true); when(pipe.openUnshared(anyString(), anyInt(), anyInt(), anyInt(), anyInt(), anyInt())).thenReturn(fileHandle); when(fileHandle.acquire()).thenReturn(fileHandle); when(fileHandle.getTree()).thenReturn(tree);
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/SmbSessionInternalTest.java
} // Error propagation: connect to logon share throws SmbException @Test @DisplayName("treeConnectLogon throws SmbException when underlying call fails") void treeConnectLogon_throws() throws SmbException { doThrow(new SmbException("logon failed")).when(session).treeConnectLogon(); SmbException ex = assertThrows(SmbException.class, () -> session.treeConnectLogon());Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 6.8K bytes - Viewed (0) -
src/test/java/jcifs/dcerpc/ndr/NdrObjectTest.java
*/ @Test void testDecode() throws NdrException { // When ndrObject.decode(mockBuffer); // Then // Verify that our mock buffer had the expected method called. verify(mockBuffer).dec_ndr_long(); } /** * Test case for the encode method when it throws an NdrException. * Verifies that the exception is correctly propagated. */Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 3.4K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbFileTest.java
doReturn(mockTreeHandle).when(dest).ensureTreeConnected(); doReturn(true).when(smbFile).exists(); doReturn(false).when(dest).exists(); when(mockTreeHandle.isSMB2()).thenReturn(false); when(mockTreeHandle.isSameTree(mockTreeHandle)).thenReturn(true);
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/SmbExceptionTest.java
void testSmbExceptionWithNTStatus() { // Given int ntStatus = NtStatus.NT_STATUS_ACCESS_DENIED; // When SmbException exception = new SmbException(ntStatus, false); // Then assertNotNull(exception); assertEquals(ntStatus, exception.getNtStatus()); assertTrue(exception.getMessage().contains("Access is denied")); }
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 7.9K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/Smb3KeyDerivationTest.java
void testDeriveSigningKey_SMB300() { // Given int dialect = Smb2Constants.SMB2_DIALECT_0300; // When byte[] signingKey = Smb3KeyDerivation.deriveSigningKey(dialect, sessionKey, preauthIntegrity); // Then assertNotNull(signingKey, "Signing key should not be null"); assertEquals(16, signingKey.length, "Signing key should be 16 bytes");
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 17.5K bytes - Viewed (0)