Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for hasCapability_throws (0.24 sec)

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

        }
    
        // Invalid input: simulate underlying SmbException when capability check fails
        @Test
        @DisplayName("hasCapability throws SmbException when underlying error occurs")
        void hasCapability_throws() throws SmbException {
            doThrow(new SmbException("capability check failed")).when(transport).hasCapability(eq(42));
            SmbException ex = assertThrows(SmbException.class, () -> transport.hasCapability(42));
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 12.1K bytes
    - Viewed (0)
  2. src/test/java/jcifs/smb/SmbTreeHandleInternalTest.java

            verify(handle, times(1)).hasCapability(captor.capture());
            assertEquals(cap, captor.getValue());
        }
    
        @Test
        @DisplayName("hasCapability(cap): propagates CIFSException on failure")
        void hasCapability_throws() throws Exception {
            // Arrange
            when(handle.hasCapability(anyInt())).thenThrow(new CIFSException("capability check failed"));
    
            // Act + Assert
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.3K bytes
    - Viewed (0)
Back to top