Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for getRootCause (0.42 sec)

  1. src/test/java/jcifs/smb1/util/transport/TransportExceptionTest.java

                assertEquals(rootCause, exception.getRootCause());
            }
    
            @Test
            @DisplayName("Should handle null root cause")
            void testConstructorWithNullRootCause() {
                TransportException exception = new TransportException((Throwable) null);
    
                assertNotNull(exception);
                assertNull(exception.getRootCause());
            }
    
            @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.5K bytes
    - Viewed (0)
  2. src/test/java/jcifs/util/transport/TransportExceptionTest.java

        @Test
        @DisplayName("Test deprecated getRootCause method returns the same as getCause")
        @SuppressWarnings("deprecation")
        public void testGetRootCause() {
            // Test with no cause
            TransportException noCauseException = new TransportException("No cause");
            assertNull(noCauseException.getRootCause());
            assertEquals(noCauseException.getCause(), noCauseException.getRootCause());
    
            // Test with cause
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7.4K bytes
    - Viewed (0)
  3. src/test/java/jcifs/smb/SmbAuthExceptionTest.java

            assertEquals(expectedStatus, ex.getNtStatus(), "status should map based on code");
            assertNull(ex.getCause(), "cause must be null for int constructor");
            assertNull(ex.getRootCause(), "rootCause must be null for int constructor");
        }
    
        /**
         * Validate message-only constructor with both null and empty messages.
         */
        @ParameterizedTest
        @MethodSource("messageProvider")
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.3K bytes
    - Viewed (0)
  4. src/test/java/jcifs/dcerpc/DcerpcExceptionTest.java

        }
    
        /**
         * Test getRootCause() method (deprecated).
         */
        @Test
        void testGetRootCause() {
            Throwable cause = new IllegalArgumentException("Invalid argument.");
            DcerpcException exception = new DcerpcException("Error with cause.", cause);
            assertEquals(cause, exception.getRootCause(), "getRootCause() should return the original cause.");
        }
    
        /**
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.8K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/base/ThrowablesTest.java

        SomeCheckedException exception = new SomeCheckedException();
        assertSame(exception, getRootCause(exception));
      }
    
      public void testGetRootCause_singleWrapped() {
        SomeCheckedException cause = new SomeCheckedException();
        SomeChainingException exception = new SomeChainingException(cause);
        assertSame(cause, getRootCause(exception));
      }
    
      public void testGetRootCause_doubleWrapped() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 14.9K bytes
    - Viewed (0)
  6. src/test/java/jcifs/smb1/smb1/SmbExceptionTest.java

    import org.mockito.junit.jupiter.MockitoExtension;
    
    /**
     * Unit tests for {@link SmbException}.
     *
     * The tests exercise the public API: constructors, {@link #getNtStatus()},
     * {@link #getRootCause()}, and {@link #toString()}.
     */
    @ExtendWith(MockitoExtension.class)
    class SmbExceptionTest {
    
        /**
         * Happy path – constructor with a valid NT status code (0).
         */
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.5K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/base/ThrowablesTest.java

        SomeCheckedException exception = new SomeCheckedException();
        assertSame(exception, getRootCause(exception));
      }
    
      public void testGetRootCause_singleWrapped() {
        SomeCheckedException cause = new SomeCheckedException();
        SomeChainingException exception = new SomeChainingException(cause);
        assertSame(cause, getRootCause(exception));
      }
    
      public void testGetRootCause_doubleWrapped() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 14.9K bytes
    - Viewed (0)
  8. src/test/java/jcifs/smb/SMBSignatureValidationExceptionTest.java

                assertEquals(msg, ex.getMessage(), "Message should be stored as provided");
            }
            assertSame(cause, ex.getCause(), "Cause should be stored and retrievable");
            assertSame(cause, ex.getRootCause(), "Deprecated getRootCause should match getCause");
            assertEquals(NtStatus.NT_STATUS_UNSUCCESSFUL, ex.getNtStatus(), "Status should default to unsuccessful for message+cause ctor");
        }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.3K bytes
    - Viewed (0)
  9. src/main/java/jcifs/dcerpc/DcerpcException.java

        public int getErrorCode() {
            return this.error;
        }
    
        /**
         *
         * @return the root cause
         * @deprecated use {@link #getCause()}
         */
        @Deprecated
        public Throwable getRootCause() {
            return getCause();
        }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 2.9K bytes
    - Viewed (0)
  10. src/main/java/jcifs/util/transport/TransportException.java

            super(msg, rootCause);
        }
    
        /**
         * Gets the root cause of this exception.
         * @return root cause of this exception
         */
        @Deprecated
        public Throwable getRootCause() {
            return getCause();
        }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 2.1K bytes
    - Viewed (0)
Back to top