- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 202 for throwing (0.25 sec)
-
src/test/java/jcifs/spnego/SpnegoExceptionTest.java
// Then assertNotNull(ex); assertEquals(message, ex.getMessage()); assertEquals(cause, ex.getCause()); } @Test @DisplayName("Should handle null message and/or cause without throwing") void testNullInputs() { assertDoesNotThrow(() -> { SpnegoException ex1 = new SpnegoException((String) null); assertNotNull(ex1); assertNull(ex1.getMessage());Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 4.9K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb1/trans2/Trans2SetFileInformationResponseTest.java
} @Test @DisplayName("Test all write methods with null buffer") void testWriteMethodsWithNullBuffer() { // Even with null buffer, methods should return 0 without throwing exception int result = response.writeSetupWireFormat(null, 0); assertEquals(0, result); result = response.writeParametersWireFormat(null, 0); assertEquals(0, result);Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 15.9K bytes - Viewed (0) -
src/test/java/jcifs/internal/SMBProtocolDecodingExceptionTest.java
// Assert throwing/catching behavior with assertThrows SMBProtocolDecodingException thrown = assertThrows(SMBProtocolDecodingException.class, () -> { throw new SMBProtocolDecodingException(); }, "Should be throwable via assertThrows"); assertTrue(thrown instanceof CIFSException, "Thrown instance should also be CIFSException subtype"); }Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 5.1K bytes - Viewed (0) -
src/test/java/jcifs/SmbTreeTest.java
assertEquals(null, result, "Should return null when type cannot be unwrapped"); verify(smbTree).unwrap(CustomSmbTree.class); } /** * Test for unwrap() method throwing exception. * Verifies that unwrap can throw exceptions when appropriate. */ @Test void testUnwrap_throwsException() {Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 9.2K bytes - Viewed (0) -
src/test/java/jcifs/SmbWatchHandleTest.java
} /** * Test watch() method throwing CIFSException */ @Test void testWatchThrowsCIFSException() throws CIFSException { // Setup mock behavior CIFSException expectedException = new CIFSException("Watch operation failed"); when(watchHandle.watch()).thenThrow(expectedException); // Execute and verify CIFSException thrown = assertThrows(CIFSException.class, () -> {Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 13.2K bytes - Viewed (1) -
src/test/java/jcifs/smb/FileEntryAdapterIteratorTest.java
// Both resources should be closed verify(filter, times(2)).accept(resource); verify(resource, times(2)).close(); } @Test @DisplayName("Iterator with filter throwing exception") void iteratorWithFilterException() throws Exception { // Setup: first attempt throws, second succeeds FileEntry entry1 = mock(FileEntry.class);Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 10.6K bytes - Viewed (0) -
src/test/java/jcifs/smb/NetServerEnumIteratorTest.java
// Mock response when(treeHandle.send(any(), any(), (RequestParam[]) any())).thenAnswer(invocation -> { return invocation.getArgument(1); }); // When: Create iterator with throwing filter NetServerEnumIterator iterator = new NetServerEnumIterator(parent, treeHandle, "*", 0, nameFilter); // Then: Iterator should skip the entry (log error and continue)Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 9.8K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/session/Smb2LogoffResponseTest.java
assertArrayEquals(original, buffer, "Buffer must remain unchanged"); } @Test @DisplayName("Handles null destination without throwing and returns 0") void allowsNullBuffer() { // Arrange Smb2LogoffResponse resp = newResponse(); // Act & Assert
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 4.7K bytes - Viewed (0) -
src/test/java/jcifs/http/HandlerTest.java
void testOpenConnection_NullSystemProperty_UsesDefaultHandlers() throws Exception { // This test verifies that when the system property is null, the handler // falls back to using default handlers without throwing NullPointerException. System.clearProperty("java.protocol.handler.pkgs"); setupMockProtocolHandlers(); URL url = new URL("http://example.com/resource");
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.1K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb1/trans/nt/NtTransQuerySecurityDescTest.java
int securityInfo = OWNER_SECURITY_INFORMATION; querySecurityDesc = new NtTransQuerySecurityDesc(mockConfig, fid, securityInfo); // Constructor should initialize the object without throwing exceptions assertNotNull(querySecurityDesc); // Test toString contains the expected values to verify field initialization String str = querySecurityDesc.toString();Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 13.9K bytes - Viewed (0)