Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for testEncodeWithOffset (0.11 sec)

  1. src/test/java/jcifs/util/ByteEncodableTest.java

            // Verify content
            assertArrayEquals(new byte[] { 0x02, 0x03, 0x04, 0x00, 0x00 }, dest, "Encoded bytes should match the expected subset");
        }
    
        @Test
        void testEncodeWithOffset() {
            // Test encoding with a destination offset
            byte[] data = { 0x01, 0x02, 0x03, 0x04, 0x05 };
            ByteEncodable encodable = new ByteEncodable(data, 0, 3);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.5K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/smb2/nego/EncryptionNegotiateContextTest.java

                assertEquals(2, bytesWritten);
                assertEquals(0, SMBUtil.readInt2(buffer, 0));
            }
    
            @Test
            @DisplayName("Should encode at non-zero offset")
            void testEncodeWithOffset() {
                int offset = 100;
                int[] ciphers = { EncryptionNegotiateContext.CIPHER_AES128_GCM };
                EncryptionNegotiateContext context = new EncryptionNegotiateContext(mockConfig, ciphers);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.5K bytes
    - Viewed (0)
  3. src/test/java/jcifs/internal/smb2/ioctl/ValidateNegotiateInfoRequestTest.java

                assertEquals(defaultDialects[i], SMBUtil.readInt2(buffer, dialectOffset + i * 2));
            }
        }
    
        @Test
        @DisplayName("Test encode with offset")
        void testEncodeWithOffset() {
            ValidateNegotiateInfoRequest request =
                    new ValidateNegotiateInfoRequest(DEFAULT_CAPABILITIES, defaultClientGuid, DEFAULT_SECURITY_MODE, defaultDialects);
    
            int offset = 100;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.7K bytes
    - Viewed (0)
  4. src/test/java/jcifs/internal/fscc/FileBasicInfoTest.java

            assertEquals(TEST_ATTRIBUTES, fileBasicInfo.getAttributes());
        }
    
        @Test
        @DisplayName("Test encode with offset")
        void testEncodeWithOffset() throws SMBProtocolDecodingException {
            FileBasicInfo info =
                    new FileBasicInfo(TEST_CREATE_TIME, TEST_LAST_ACCESS_TIME, TEST_LAST_WRITE_TIME, TEST_CHANGE_TIME, TEST_ATTRIBUTES);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.5K bytes
    - Viewed (0)
  5. src/test/java/jcifs/internal/fscc/FileEndOfFileInformationTest.java

            // Verify encoded value
            long decodedValue = SMBUtil.readInt8(buffer, 0);
            assertEquals(endOfFile, decodedValue);
        }
    
        @Test
        @DisplayName("Test encode with offset")
        void testEncodeWithOffset() {
            long endOfFile = 0xFEDCBA9876543210L;
            FileEndOfFileInformation info = new FileEndOfFileInformation(endOfFile);
    
            // Create buffer with offset
            byte[] buffer = new byte[20];
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.9K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/fscc/FsctlPipeWaitRequestTest.java

            System.arraycopy(buffer, 14, encodedName, 0, nameBytes.length);
            assertArrayEquals(nameBytes, encodedName);
        }
    
        @Test
        @DisplayName("Test encode with offset")
        void testEncodeWithOffset() {
            // Setup
            String pipeName = "TestPipe";
            long timeout = 5000L;
            FsctlPipeWaitRequest request = new FsctlPipeWaitRequest(pipeName, timeout);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 13.1K bytes
    - Viewed (0)
  7. src/test/java/jcifs/internal/dfs/DfsReferralRequestBufferTest.java

                // Verify null terminator
                assertEquals(0, bb.getShort());
            }
    
            @Test
            @DisplayName("Should encode with offset correctly")
            void testEncodeWithOffset() {
                String path = "\\\\test";
                int maxReferralLevel = 5;
                buffer = new DfsReferralRequestBuffer(path, maxReferralLevel);
    
                int offset = 10;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 17.5K bytes
    - Viewed (0)
  8. src/test/java/jcifs/internal/smb2/nego/NegotiateContextResponseTest.java

                        Arguments.of(new int[] { 1, 2, 3, 4, 5 }, 4 + 10) // size() returns 4 + 2*5
                );
            }
    
            @Test
            @DisplayName("Should handle offset in encode")
            void testEncodeWithOffset() {
                // Arrange
                context = new EncryptionNegotiateContext(mockConfig, new int[] { 1 });
                byte[] buffer = new byte[100];
                Arrays.fill(buffer, (byte) 0xFF);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 19.4K bytes
    - Viewed (0)
  9. src/test/java/jcifs/internal/smb2/nego/PreauthIntegrityNegotiateContextTest.java

                assertEquals(0, SMBUtil.readInt2(buffer, 2));
            }
    
            @Test
            @DisplayName("Should encode at non-zero offset")
            void testEncodeWithOffset() {
                int offset = 100;
                int[] hashAlgos = { PreauthIntegrityNegotiateContext.HASH_ALGO_SHA512 };
                byte[] salt = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 };
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 34K bytes
    - Viewed (0)
Back to top