Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for testInvalidStructureSize (0.87 sec)

  1. src/test/java/jcifs/internal/smb2/io/Smb2WriteResponseTest.java

                assertEquals(512, response.getRemaining());
            }
    
            @Test
            @DisplayName("Should throw exception for invalid structure size")
            void testInvalidStructureSize() {
                byte[] buffer = new byte[64];
                SMBUtil.writeInt2(16, buffer, 0); // Wrong structure size (should be 17)
    
                assertThrows(SMBProtocolDecodingException.class, () -> {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.9K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/smb2/notify/Smb2ChangeNotifyResponseTest.java

        }
    
        @DisplayName("Should throw exception for invalid structure size")
        @ParameterizedTest
        @ValueSource(ints = { 0, 1, 2, 4, 8, 10, 16, 32, 255 })
        void testInvalidStructureSize(int structureSize) {
            // Given
            byte[] buffer = new byte[256];
            SMBUtil.writeInt2(structureSize, buffer, 0);
    
            // When & Then
            SMBProtocolDecodingException exception =
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 18.8K bytes
    - Viewed (0)
Back to top