Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for testException (0.49 sec)

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

            @Test
            @DisplayName("Should handle exception")
            void testException() {
                Exception testException = new Exception("Test exception");
    
                assertFalse(echoResponse.isError());
                assertFalse(echoResponse.isReceived());
                assertNull(echoResponse.getException());
    
                echoResponse.exception(testException);
    
                assertTrue(echoResponse.isError());
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.1K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/smb1/ServerMessageBlockTest.java

            @Test
            @DisplayName("Test exception state")
            void testExceptionState() {
                Exception testException = new RuntimeException("Test error");
    
                assertNull(testBlock.getException());
    
                testBlock.exception(testException);
                assertEquals(testException, testBlock.getException());
            }
    
            @Test
            @DisplayName("Test error state")
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 36.2K bytes
    - Viewed (0)
  3. src/test/java/jcifs/internal/smb2/ServerMessageBlock2ResponseTest.java

            @Test
            @DisplayName("Should handle exception")
            void testException() {
                Exception testException = new Exception("Test exception");
    
                response.exception(testException);
    
                assertTrue(response.isError());
                assertTrue(response.isReceived());
                assertSame(testException, response.getException());
            }
    
            @Test
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 19.3K bytes
    - Viewed (0)
  4. src/test/java/jcifs/config/DelegatingConfigurationTest.java

            // Given
            RuntimeException testException = new RuntimeException("Test exception");
            when(mockDelegate.getResponseTimeout()).thenThrow(testException);
    
            // When & Then
            RuntimeException thrownException = assertThrows(RuntimeException.class, () -> {
                delegatingConfig.getResponseTimeout();
            });
    
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.7K bytes
    - Viewed (0)
  5. src/test/java/jcifs/SmbSessionTest.java

            void shouldHandleCloseExceptionGracefully() throws Exception {
                SmbSession mockSession = mock(SmbSession.class);
                Exception testException = new Exception("Test close exception");
                doThrow(testException).when(mockSession).close();
    
                Exception thrownException = assertThrows(Exception.class, mockSession::close, "close() should propagate exceptions");
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.1K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/CommonServerMessageBlockResponseTest.java

            // Then
            assertEquals(expectedException, actualException);
            verify(response).getException();
        }
    
        @Test
        @DisplayName("Test Response interface methods - exception")
        void testException() {
            // Given
            Exception ex = new RuntimeException("Runtime error");
            doNothing().when(response).exception(ex);
    
            // When
            response.exception(ex);
    
            // Then
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.3K bytes
    - Viewed (0)
Back to top