- Sort Score
- Result 10 results
- Languages All
Results 61 - 70 of 86 for NPE (0.02 sec)
-
src/test/java/jcifs/smb1/smb1/TestLockingTest.java
@DisplayName("run method handles null URL gracefully") void testRunWithNullUrl() { TestLocking t = new TestLocking(); t.url = null; // Null URL t.numIter = 0; // No iterations to avoid NPE // Should not throw exception assertDoesNotThrow(() -> t.run(), "run() should handle null URL gracefully"); assertEquals(1, t.numComplete, "numComplete should still be incremented"); }
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 9.9K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb1/net/NetServerEnum2Test.java
assertEquals(lastName.toUpperCase(), writtenLastName); } @Test @DisplayName("Test writeParametersWireFormat with null lastName for NET_SERVER_ENUM3 throws NPE") void testWriteParametersWireFormatNetServerEnum3NullLastName() throws Exception { String domain = "WORKGROUP"; int serverTypes = NetServerEnum2.SV_TYPE_ALL;
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 19.7K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/nego/Smb2NegotiateRequestTest.java
@Test @DisplayName("Should handle null maximum version") void testNullMaximumVersion() { // Given when(mockConfig.getMaximumVersion()).thenReturn(null); // When/Then - Should throw NPE based on actual implementation assertThrows(NullPointerException.class, () -> { new Smb2NegotiateRequest(mockConfig, 0); }); } @Test
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 20.7K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbWatchHandleImplTest.java
sut.close(); verify(handle, never()).close(anyLong()); } // Invalid input: constructing with null handle and invoking watch() NPEs @Test @DisplayName("Null handle causes NPE on watch() (invalid input)") void constructor_nullHandle_watch_throwsNPE() { SmbWatchHandleImpl sut = new SmbWatchHandleImpl(null, 0, false); assertThrows(NullPointerException.class, () -> {
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.5K bytes - Viewed (0) -
src/test/java/jcifs/dcerpc/DcerpcHandleTest.java
void testToStringWithNullBinding() { // Given: Handle with null binding TestDcerpcHandle handleWithNullBinding = new TestDcerpcHandle(mockContext); // When/Then: Should throw NPE for null binding (expected behavior) assertThrows(NullPointerException.class, () -> handleWithNullBinding.toString()); } @Test @DisplayName("Should handle session key retrieval")
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 15.3K 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) -
src/test/java/jcifs/smb/SIDCacheImplTest.java
void resolveSids_invalidInputs() throws Exception { SIDCacheImpl cache = new SIDCacheImpl(mock(CIFSContext.class)); CIFSContext ctx = mock(CIFSContext.class); // Null sids array -> NPE assertThrows(NullPointerException.class, () -> cache.resolveSids(ctx, "server", null, 0, 1)); // Bad offset/length leads to ArrayIndexOutOfBoundsException
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 14K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/lock/Smb2OplockBreakNotificationTest.java
oplockLevelField.setAccessible(true); oplockLevelField.set(notification, (byte) 0x01); // The implementation calls Hexdump.toHexString which throws NPE on null // This test verifies the actual behavior assertThrows(NullPointerException.class, () -> notification.toString()); } @ParameterizedTest
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 17.6K bytes - Viewed (0) -
src/test/java/org/codelibs/fess/util/WebApiUtilTest.java
} catch (NullPointerException e) { // Expected - WebApiException constructor cannot handle null exception assertTrue("Should get expected NPE message", e.getMessage().contains("Cannot invoke \"java.lang.Exception.getMessage()\" because \"e\" is null")); } } public void test_setError_withEmptyMessage() {
Registered: Thu Sep 04 12:52:25 UTC 2025 - Last Modified: Sat Jul 12 07:34:10 UTC 2025 - 17.1K bytes - Viewed (0)