Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 34 for propagated (0.97 sec)

  1. src/test/java/jcifs/smb/DirFileEntryAdapterIteratorTest.java

                }
            };
    
            // When
            iterator.close();
    
            // Then
            verify(mockDelegate).close();
        }
    
        /**
         * Test close method propagates exception.
         */
        @Test
        void testCloseWithException() throws CIFSException {
            // Given
            when(mockDelegate.hasNext()).thenReturn(false);
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 14.4K bytes
    - Viewed (0)
  2. src/test/java/jcifs/AddressTest.java

            // When & Then
            assertThrows(UnknownHostException.class, () -> {
                mockAddress.toInetAddress();
            }, "Should propagate UnknownHostException");
        }
    
        @Test
        @DisplayName("firstCalledName should return valid name for session establishment")
        void testFirstCalledNameContract() {
            // Given
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.9K bytes
    - Viewed (0)
  3. src/test/java/jcifs/dcerpc/DcerpcPipeHandleTest.java

                when(mockSmbPipeHandleInternal.getSessionKey()).thenReturn(expectedKey);
                assertArrayEquals(expectedKey, handle.getSessionKey());
            }
    
            @Test
            @DisplayName("Should propagate CIFSException when getting session key")
            void testGetSessionKey_ThrowsCIFSException() throws Exception {
                DcerpcPipeHandle handle = createMockedDcerpcPipeHandle();
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 21K bytes
    - Viewed (0)
  4. src/test/java/jcifs/smb/DosFileFilterTest.java

            // Then it should be rejected because the ARCHIVE attribute is not present
            assertFalse(dosFileFilter.accept(mockFile));
        }
    
        /**
         * Tests that the accept method correctly propagates SmbException when
         * {@link SmbFile#getAttributes()} throws it.
         * @throws SmbException if an SMB error occurs.
         */
        @Test
        void testAccept_ThrowsSmbException() throws SmbException {
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 6.2K bytes
    - Viewed (0)
  5. src/test/java/jcifs/smb/SmbFilenameFilterTest.java

            boolean result = filter.accept(null, "anything");
    
            assertTrue(result, "Filter should accept when dir is null as defined");
        }
    
        /**
         * Exception flow: filter throws SmbException and it propagates to caller.
         */
        @Test
        @DisplayName("throws SmbException as declared by contract")
        void throwsSmbExceptionFromFilter() {
            SmbFilenameFilter filter = (dir, name) -> {
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7.3K bytes
    - Viewed (0)
  6. src/test/java/jcifs/smb/FileEntryAdapterIteratorTest.java

            TestIterator iterator = new TestIterator(null);
            iterator.close();
    
            verify(delegate).close();
        }
    
        @Test
        @DisplayName("Close propagates exception")
        void closeException() throws CIFSException {
            when(delegate.hasNext()).thenReturn(false);
            doThrow(new CIFSException("Close failed")).when(delegate).close();
    
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 10.6K bytes
    - Viewed (0)
  7. src/test/java/jcifs/SmbSessionTest.java

                doThrow(testException).when(mockSession).close();
    
                Exception thrownException = assertThrows(Exception.class, mockSession::close, "close() should propagate exceptions");
                assertEquals("Test close exception", thrownException.getMessage());
            }
        }
    
        @Nested
        @DisplayName("Configuration Access Tests")
        class ConfigurationAccessTest {
    
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.1K bytes
    - Viewed (0)
  8. src/test/java/jcifs/smb/SmbEnumerationUtilTest.java

                assertThrows(SmbUnsupportedOperationException.class, () -> SmbEnumerationUtil.doEnum(parent, "*", 0, null, null));
            }
    
            @Test
            @DisplayName("list propagates SmbUnsupportedOperationException from doEnum")
            void list_propagatesUnsupportedOperationException() throws Exception {
                // Arrange: same setup as above to force doEnum -> SmbUnsupportedOperationException
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 17.1K bytes
    - Viewed (0)
  9. src/test/java/jcifs/smb/SmbTreeHandleImplTest.java

            verify(treeConnection).ensureDFSResolved(resourceLoc);
        }
    
        @Test
        @DisplayName("hasCapability delegates and propagates exceptions")
        void hasCapabilityDelegates() throws Exception {
            // Happy path delegates; invalid case propagates SmbException
            when(treeConnection.hasCapability(123)).thenReturn(true);
            assertTrue(handle.hasCapability(123));
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14.4K bytes
    - Viewed (0)
  10. src/test/java/jcifs/smb/SmbTransportInternalTest.java

            verify(transport).isSigningOptional();
            verify(transport).isSigningEnforced();
        }
    
        // Error propagation: signing checks may throw SmbException
        @Test
        @DisplayName("signing checks propagate SmbException")
        void signingChecks_throw() throws Exception {
            doThrow(new SmbException("opt error")).when(transport).isSigningOptional();
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 12.1K bytes
    - Viewed (0)
Back to top