- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 87 for NPE (0.01 sec)
-
src/test/java/jcifs/internal/smb1/com/SmbComQueryInformationTest.java
} @Test @DisplayName("writeBytesWireFormat with null path returns minimal bytes") void testWriteWhenPathIsNull() { // When path is null, Strings.getOEMBytes returns empty array, not NPE when(mockConfig.getOemEncoding()).thenReturn("windows-1252"); SmbComQueryInformation nullPathCmd = new SmbComQueryInformation(mockConfig, null); byte[] buffer = new byte[50];
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 4.9K bytes - Viewed (0) -
src/test/java/jcifs/smb1/smb1/HandlerTest.java
URLConnection conn = handler.openConnection(url); // Assert assertNotNull(conn); assertTrue(conn instanceof SmbFile); } @Test @DisplayName("openConnection throws NPE for null URL") void testOpenConnectionWithNullUrl() { // Act & Assert assertThrows(NullPointerException.class, () -> handler.openConnection(null)); } @Test
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 5.4K bytes - Viewed (0) -
src/test/java/org/codelibs/fess/exception/JobProcessingExceptionTest.java
} public void test_getMessage_withComplexCause() { // Test getMessage behavior with complex cause structure final Exception innerCause = new NullPointerException("NPE occurred"); final Exception outerCause = new IllegalStateException("State error", innerCause); final JobProcessingException exception = new JobProcessingException(outerCause);
Registered: Thu Sep 04 12:52:25 UTC 2025 - Last Modified: Tue Aug 19 14:09:36 UTC 2025 - 7K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/testing/NullPointerTester.java
* package-private, I feel OK with just not testing them for NPE. * * Note that testing casValue is particularly dangerous because it uses Unsafe under some * versions of Java, and apparently Unsafe can cause SIGSEGV instead of NPE—almost as if it's * not safe. */ concat( stream(AbstractFuture.class.getDeclaredMethods()),
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Jul 14 14:44:08 UTC 2025 - 24.9K bytes - Viewed (0) -
src/test/java/org/codelibs/fess/exception/GsaConfigExceptionTest.java
} public void test_stackTrace() { // Test that stack trace is properly preserved String message = "GSA error with stack trace"; Throwable cause = new NullPointerException("NPE occurred"); GsaConfigException exception = new GsaConfigException(message, cause); assertNotNull(exception.getStackTrace()); assertTrue(exception.getStackTrace().length > 0);
Registered: Thu Sep 04 12:52:25 UTC 2025 - Last Modified: Tue Aug 19 14:09:36 UTC 2025 - 7.3K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbCopyUtilTest.java
verify(dest, times(1)).getAttributes(); verify(dest, never()).setPathInformation(anyInt(), anyLong(), anyLong(), anyLong()); } @Test @DisplayName("openCopyTargetFile throws NPE on null dest (invalid input)") void openCopyTargetFile_nullDest_throwsNPE() { // Arrange SmbFile dest = null; // Act + Assert
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 12.1K bytes - Viewed (0) -
src/test/java/org/codelibs/fess/exception/DataStoreExceptionTest.java
// Test with different types of causes DataStoreException withIOException = new DataStoreException("IO Error", new java.io.IOException("File not found")); DataStoreException withNPE = new DataStoreException("NPE Error", new NullPointerException("Null value")); DataStoreException withCustom = new DataStoreException("Custom Error", new FessSystemException("System error"));
Registered: Thu Sep 04 12:52:25 UTC 2025 - Last Modified: Tue Aug 19 14:09:36 UTC 2025 - 8.7K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb1/com/SmbComSeekResponseTest.java
class SmbComSeekResponseTest { @Mock private Configuration mockConfig; private SmbComSeekResponse response; @BeforeEach void setUp() { // Setup mock configuration to avoid NPE when(mockConfig.getPid()).thenReturn(12345); response = new SmbComSeekResponse(mockConfig); } /* ------------------------------------------------------------------ */
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 8.1K bytes - Viewed (0) -
src/test/java/jcifs/smb/SIDTest.java
assertTrue(ex.getMessage().contains("domain sid")); } @Test @DisplayName("Static toByteArray null input throws NPE") void testStaticToByteArrayNull() { assertThrows(NullPointerException.class, () -> SID.toByteArray(null)); } } @Nested @DisplayName("Tests requiring mocks")
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 15.8K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbFileTest.java
// Mock configuration methods when(mockConfig.getPid()).thenReturn(1234); when(mockCifsContext.getConfig()).thenReturn(mockConfig); // Mock credentials to prevent NPE when(mockCredentials.getUserDomain()).thenReturn("DOMAIN"); when(mockCifsContext.getCredentials()).thenReturn(mockCredentials); // Create URL handler
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 20.8K bytes - Viewed (0)