Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 11 - 20 of 128 for SMBProtocolDecodingException (0.31 seconds)

  1. src/test/java/jcifs/internal/smb2/tree/Smb2TreeDisconnectResponseTest.java

            SMBUtil.writeInt2(0, buffer, 0);
    
            SMBProtocolDecodingException ex1 = assertThrows(SMBProtocolDecodingException.class, () -> response.readBytesWireFormat(buffer, 0));
            assertEquals("Structure size != 4", ex1.getMessage());
    
            // Test maximum 2-byte value (65535)
            SMBUtil.writeInt2(65535, buffer, 0);
    
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 14.1K bytes
    - Click Count (0)
  2. src/test/java/jcifs/internal/smb2/nego/Smb2NegotiateResponseInputValidationTest.java

            byte[] malformedBuffer = createBasicNegotiateResponseBuffer();
            // Set incorrect structure size (should be 65)
            SMBUtil.writeInt2(64, malformedBuffer, 0);
    
            SMBProtocolDecodingException exception = assertThrows(SMBProtocolDecodingException.class, () -> {
                response.readBytesWireFormat(malformedBuffer, 0);
            });
    
            assertTrue(exception.getMessage().contains("Structure size is not 65"));
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sun Aug 31 08:00:57 GMT 2025
    - 15.8K bytes
    - Click Count (0)
  3. src/test/java/jcifs/internal/smb2/ioctl/SrvRequestResumeKeyResponseTest.java

        void testDecodeThrowsExceptionWhenLengthTooShort() {
            byte[] buffer = new byte[28];
    
            // Test with len = 23 (one byte too short)
            SMBProtocolDecodingException exception = assertThrows(SMBProtocolDecodingException.class, () -> response.decode(buffer, 0, 23),
                    "Should throw exception when length < 24");
    
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 8.9K bytes
    - Click Count (0)
  4. src/test/java/jcifs/internal/smb2/info/Smb2SetInfoResponseTest.java

            // Set structure size to 4 (invalid, should be 2)
            SMBUtil.writeInt2(4, buffer, bufferIndex);
    
            SMBProtocolDecodingException exception =
                    assertThrows(SMBProtocolDecodingException.class, () -> response.readBytesWireFormat(buffer, bufferIndex),
                            "Should throw SMBProtocolDecodingException for invalid structure size");
    
            assertEquals("Expected structureSize = 2", exception.getMessage());
        }
    
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 10.3K bytes
    - Click Count (0)
  5. src/test/java/jcifs/internal/fscc/FileBothDirectoryInfoTest.java

    import org.junit.jupiter.api.Test;
    import org.mockito.Mock;
    import org.mockito.MockitoAnnotations;
    
    import jcifs.Configuration;
    import jcifs.SmbConstants;
    import jcifs.internal.SMBProtocolDecodingException;
    import jcifs.internal.util.SMBUtil;
    import jcifs.util.Strings;
    
    /**
     * Test class for FileBothDirectoryInfo
     */
    class FileBothDirectoryInfoTest {
    
        @Mock
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 20.9K bytes
    - Click Count (0)
  6. src/test/java/jcifs/internal/fscc/FileInternalInfoTest.java

    import static org.junit.jupiter.api.Assertions.assertTrue;
    
    import org.junit.jupiter.api.BeforeEach;
    import org.junit.jupiter.api.DisplayName;
    import org.junit.jupiter.api.Test;
    
    import jcifs.internal.SMBProtocolDecodingException;
    import jcifs.internal.util.SMBUtil;
    
    /**
     * Test class for FileInternalInfo
     */
    class FileInternalInfoTest {
    
        private FileInternalInfo fileInternalInfo;
    
        @BeforeEach
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 13.1K bytes
    - Click Count (0)
  7. src/test/java/jcifs/internal/smb2/io/Smb2FlushResponseTest.java

                int bufferIndex = 0;
                SMBUtil.writeInt2(5, buffer, bufferIndex); // Invalid structure size
    
                // When & Then
                SMBProtocolDecodingException exception =
                        assertThrows(SMBProtocolDecodingException.class, () -> response.readBytesWireFormat(buffer, bufferIndex));
                assertEquals("Expected structureSize = 4", exception.getMessage());
            }
    
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 10.3K bytes
    - Click Count (0)
  8. src/test/java/jcifs/internal/smb1/trans/nt/FileNotifyInformationImplTest.java

            assertThrows(SMBProtocolDecodingException.class, () -> {
                notifyInfo.decode(buffer, 0, buffer.length);
            });
        }
    
        @Test
        @DisplayName("Test decode with maximum file name length")
        void testDecodeMaxFileNameLength() throws SMBProtocolDecodingException {
            // Create a very long filename (but within reasonable bounds)
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 13.1K bytes
    - Click Count (0)
  9. src/test/java/jcifs/internal/smb2/lock/Smb2LockResponseTest.java

                int bufferIndex = 0;
                SMBUtil.writeInt2(5, buffer, bufferIndex); // Invalid structure size
    
                // When & Then
                SMBProtocolDecodingException exception =
                        assertThrows(SMBProtocolDecodingException.class, () -> response.readBytesWireFormat(buffer, bufferIndex));
                assertEquals("Expected structureSize = 4", exception.getMessage());
            }
    
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 17.1K bytes
    - Click Count (0)
  10. src/test/java/jcifs/internal/fscc/FileRenameInformation2Test.java

    import java.nio.charset.StandardCharsets;
    
    import org.junit.jupiter.api.BeforeEach;
    import org.junit.jupiter.api.DisplayName;
    import org.junit.jupiter.api.Test;
    
    import jcifs.internal.SMBProtocolDecodingException;
    import jcifs.internal.util.SMBUtil;
    
    /**
     * Test class for FileRenameInformation2
     */
    @DisplayName("FileRenameInformation2 Tests")
    class FileRenameInformation2Test {
    
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 11.3K bytes
    - Click Count (0)
Back to Top