Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for testReadBytesWireFormatBufferTooSmall (0.35 sec)

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

            // Then
            assertEquals(4, bytesRead);
        }
    
        @Test
        @DisplayName("Should throw exception when buffer too small for reading")
        void testReadBytesWireFormatBufferTooSmall() {
            // Given
            byte[] buffer = new byte[1]; // Too small to read structure size
    
            // When & Then
            assertThrows(ArrayIndexOutOfBoundsException.class, () -> {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14.1K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/smb2/io/Smb2ReadResponseTest.java

            assertArrayEquals(testData, copiedData);
        }
    
        @Test
        @DisplayName("Should throw exception when output buffer too small")
        void testReadBytesWireFormatBufferTooSmall() throws Exception {
            // Given
            byte[] smallOutputBuffer = new byte[10];
            Smb2ReadResponse smallBufferResponse = new Smb2ReadResponse(mockConfig, smallOutputBuffer, 0);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 22.1K bytes
    - Viewed (0)
Back to top