Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for createTestData (1.03 sec)

  1. src/test/java/jcifs/internal/smb2/lock/Smb2OplockBreakNotificationTest.java

                bufferIndex += 4;
    
                // Write Reserved2 (4 bytes)
                bufferIndex += 4;
    
                // Write file ID (16 bytes)
                byte[] expectedFileId = createTestData(16);
                System.arraycopy(expectedFileId, 0, buffer, bufferIndex, 16);
    
                // Read the buffer
                int bytesRead = notification.readBytesWireFormat(buffer, 0);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 17.6K bytes
    - Viewed (0)
  2. src/test/java/jcifs/util/HexdumpTest.java

            });
        }
    
        @Test
        @DisplayName("Should convert byte array to hex string with offset and length")
        void testHexdumpWithOffset() {
            // Given
            byte[] data = createTestData(32);
    
            // When
            String result = Hexdump.toHexString(data, 0, data.length);
    
            // Then
            assertNotNull(result);
            assertFalse(result.isEmpty());
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.8K bytes
    - Viewed (0)
  3. src/test/java/jcifs/smb1/util/HexdumpTest.java

            // Capture output
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            PrintStream ps = new PrintStream(baos);
    
            // Test with 16 bytes (one complete line)
            byte[] data1 = createTestData(16);
            Hexdump.hexdump(ps, data1, 0, 16);
            String output1 = baos.toString();
    
            assertNotNull(output1);
            assertTrue(output1.contains("00000:"));
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.4K bytes
    - Viewed (0)
  4. src/test/java/jcifs/BaseTest.java

            logger.debug("Setting up test: {}", getClass().getSimpleName());
        }
    
        /**
         * Create a test byte array with specified size and pattern
         */
        protected byte[] createTestData(int size) {
            byte[] data = new byte[size];
            for (int i = 0; i < size; i++) {
                data[i] = (byte) (i % 256);
            }
            return data;
        }
    
        /**
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 1.2K bytes
    - Viewed (0)
  5. src/test/java/jcifs/internal/smb2/tree/Smb2TreeDisconnectRequestTest.java

            // Given
            Configuration mockConfig = mock(Configuration.class);
            Smb2TreeDisconnectRequest request = new Smb2TreeDisconnectRequest(mockConfig);
            byte[] buffer = createTestData(256);
    
            // When
            int bytesRead = request.readBytesWireFormat(buffer, 0);
    
            // Then
            assertEquals(0, bytesRead);
        }
    
        @ParameterizedTest
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14.1K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/smb2/session/Smb2SessionSetupRequestTest.java

        }
    
        @Test
        @DisplayName("Should always return 0 for readBytesWireFormat")
        void testReadBytesWireFormat() {
            // Given
            byte[] buffer = createTestData(256);
    
            // When
            int bytesRead = request.readBytesWireFormat(buffer, 0);
    
            // Then
            assertEquals(0, bytesRead);
        }
    
        @ParameterizedTest
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 21.2K bytes
    - Viewed (0)
  7. src/test/java/jcifs/internal/smb2/tree/Smb2TreeConnectRequestTest.java

        }
    
        @Test
        @DisplayName("Should always return 0 for readBytesWireFormat")
        void testReadBytesWireFormat() {
            // Given
            byte[] buffer = createTestData(256);
    
            // When
            int bytesRead = request.readBytesWireFormat(buffer, 0);
    
            // Then
            assertEquals(0, bytesRead);
        }
    
        @ParameterizedTest
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.6K bytes
    - Viewed (0)
Back to top