- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 60 for NullPointerException (0.1 sec)
-
src/test/java/jcifs/internal/smb2/info/Smb2QueryInfoResponseTest.java
@Test @DisplayName("Test getInfo with class when info is null throws NullPointerException") void testGetInfoWithClassWhenInfoIsNull() { response = new Smb2QueryInfoResponse(mockConfig, (byte) 1, (byte) 2); assertThrows(NullPointerException.class, () -> response.getInfo(FileInternalInfo.class), "Should throw NullPointerException when info is null"); } @TestRegistered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 24.5K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/Smb2EncryptionContextTest.java
@DisplayName("Should throw exception for null encryption key") void testNullEncryptionKey() { // When/Then assertThrows(NullPointerException.class, () -> { new Smb2EncryptionContext(1, DialectVersion.SMB311, null, testDecryptionKey); }, "Should throw NullPointerException for null encryption key"); } @Test @DisplayName("Should throw exception for null decryption key")Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 44.1K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/create/Smb2CloseRequestTest.java
Smb2CloseRequest requestWithNull = new Smb2CloseRequest(mockConfig, null, testFileName); byte[] buffer = new byte[256]; // Should throw NullPointerException when trying to copy null array assertThrows(NullPointerException.class, () -> { requestWithNull.writeBytesWireFormat(buffer, 0); }); } @Test @DisplayName("readBytesWireFormat should return 0")
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 20.5K bytes - Viewed (0) -
src/test/java/jcifs/internal/dtyp/ACETest.java
ace.allow = true; ace.access = 0x001200A9; ace.flags = 0x00; ace.sid = null; // This should throw NullPointerException as the current implementation doesn't handle null SID assertThrows(NullPointerException.class, () -> ace.toString()); } @Test @DisplayName("Test decode creates new SID instance") void testDecodeCreatesNewSID() {Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 13.6K bytes - Viewed (0) -
src/test/java/jcifs/internal/SmbBasicFileInfoTest.java
// Arrange SmbBasicFileInfo info = null; // Act & Assert: attempting to call any method on null should throw NPE Assertions.assertThrows(NullPointerException.class, () -> { // Intentionally dereference null to validate exception behavior // This checks that callers must handle null references defensively info.getSize(); });Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 5.8K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/lock/Smb2LockRequestTest.java
@DisplayName("Should handle null file ID during write") void testWriteWithNullFileId() { request.setFileId(null); byte[] buffer = new byte[256]; assertThrows(NullPointerException.class, () -> request.writeBytesWireFormat(buffer, 0)); } @Test @DisplayName("Should handle file ID of different sizes") void testWriteWithDifferentFileIdSizes() {Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 25.3K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb1/net/NetShareEnumTest.java
void testMethodsWithNullBuffers() { netShareEnum = new NetShareEnum(realConfig); // Write methods return 0 when buffer is null (no NullPointerException thrown) assertEquals(0, netShareEnum.writeSetupWireFormat(null, 0)); assertThrows(NullPointerException.class, () -> { netShareEnum.writeParametersWireFormat(null, 0); });
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 15.8K bytes - Viewed (0) -
src/test/java/jcifs/http/HandlerTest.java
// This test verifies that when the system property is null, the handler // falls back to using default handlers without throwing NullPointerException. System.clearProperty("java.protocol.handler.pkgs"); setupMockProtocolHandlers(); URL url = new URL("http://example.com/resource");Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.1K bytes - Viewed (0) -
src/test/java/jcifs/netbios/SessionRequestPacketTest.java
@BeforeEach void setUp() { MockitoAnnotations.openMocks(this); when(mockConfig.getNetbiosScope()).thenReturn(null); // Configure OEM encoding to avoid NullPointerException when(mockConfig.getOemEncoding()).thenReturn("UTF-8"); } @Test @DisplayName("Constructor with Configuration only should create empty Name instances") void testConstructorWithConfigOnly() {Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.5K bytes - Viewed (0) -
src/test/java/jcifs/netbios/UniAddressTest.java
assertTrue(UniAddress.isDotQuadIP("999.999.999.999")); } @Test void shouldThrowExceptionForNullInput() { assertThrows(NullPointerException.class, () -> UniAddress.isDotQuadIP(null)); } @Test void shouldThrowExceptionForEmptyInput() { assertThrows(StringIndexOutOfBoundsException.class, () -> UniAddress.isDotQuadIP(""));
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 16.4K bytes - Viewed (0)