Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 68 for throwing (2.01 sec)

  1. src/test/java/jcifs/internal/smb2/RequestWithFileIdTest.java

            // When & Then - should handle null gracefully (implementation dependent)
            assertDoesNotThrow(() -> request.setFileId(null), "Should handle null file ID without throwing exception");
        }
    
        @Test
        @DisplayName("Should handle empty file ID")
        void testSetEmptyFileId() {
            // Given
            RequestWithFileId request = new Smb2CloseRequest(mockConfig, testFileId);
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.9K bytes
    - Viewed (0)
  2. src/test/java/jcifs/smb/DirFileEntryEnumIteratorBaseTest.java

            // Assert
            assertFalse(it.hasNext(), "No next when opened with null initial");
            verify(tree, times(1)).release(); // closed in constructor
        }
    
        @Test
        @DisplayName("open() throwing CIFSException triggers close and rethrow")
        void constructorOpenThrows() {
            // Arrange
            stubAcquireReturnsSelf();
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14.5K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. src/test/java/jcifs/smb/DirFileEntryEnumIterator1Test.java

            verify(tree, atLeastOnce()).release();
        }
    
        @ParameterizedTest
        @ValueSource(strings = { "", " ", "*", "?" })
        @DisplayName("Supports various wildcard values without throwing (edge cases)")
        void wildcardEdgeCases(String wildcard) throws Exception {
            // minimal successful first response with a single entry
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.7K bytes
    - Viewed (0)
  10. src/test/java/jcifs/EmptyIteratorTest.java

            // This is a design choice for this specific implementation
            assertNull(emptyIterator.next(), "This implementation returns null instead of throwing");
    
            // Verify remove can be called (even though no-op)
            assertDoesNotThrow(() -> emptyIterator.remove(), "remove() should be safe to call");
    
            // Verify still empty after operations
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12K bytes
    - Viewed (0)
Back to top