- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for getRootCause (0.05 sec)
-
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) -
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) -
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) -
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) -
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) -
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) -
src/main/java/jcifs/util/transport/TransportException.java
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 16 01:32:48 UTC 2025 - 2.1K bytes - Viewed (0) -
src/main/java/jcifs/smb1/util/transport/TransportException.java
this.rootCause = rootCause; } /** * Returns the root cause of this exception. * * @return the root cause or null if none was set */ public Throwable getRootCause() { return rootCause; } @Override public String toString() { if (rootCause != null) { final StringWriter sw = new StringWriter();
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 16 01:32:48 UTC 2025 - 1.8K bytes - Viewed (0) -
src/main/java/jcifs/smb1/dcerpc/DcerpcException.java
*/ public int getErrorCode() { return error; } /** * Returns the root cause of this exception * * @return the root cause throwable */ public Throwable getRootCause() { return rootCause; } @Override public String toString() { if (rootCause != null) { final StringWriter sw = new StringWriter();
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 16 01:32:48 UTC 2025 - 3.2K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbEndOfFileExceptionTest.java
assertEquals(NtStatus.NT_STATUS_UNSUCCESSFUL, ex.getNtStatus(), "Default NT status should be UNSUCCESSFUL"); assertNull(ex.getCause(), "Cause should be null by default"); assertNull(ex.getRootCause(), "Root cause should be null by default"); assertTrue(ex instanceof SmbException, "Should be an SmbException subtype"); } /**
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 2.4K bytes - Viewed (0)