Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for testDecodeWithOffset (0.35 sec)

  1. src/test/java/jcifs/internal/smb2/nego/EncryptionNegotiateContextTest.java

                assertNotNull(context.getCiphers());
                assertEquals(0, context.getCiphers().length);
            }
    
            @Test
            @DisplayName("Should decode at non-zero offset")
            void testDecodeWithOffset() throws SMBProtocolDecodingException {
                int offset = 50;
                SMBUtil.writeInt2(1, buffer, offset);
                SMBUtil.writeInt2(EncryptionNegotiateContext.CIPHER_AES128_GCM, buffer, offset + 2);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.5K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/smb2/ioctl/SrvRequestResumeKeyResponseTest.java

                assertEquals((byte) (i + 1), resumeKey[i], "Resume key byte " + i + " should match");
            }
        }
    
        @Test
        @DisplayName("Test decode with non-zero buffer offset")
        void testDecodeWithOffset() throws SMBProtocolDecodingException {
            // Prepare test data with offset
            byte[] buffer = new byte[100];
            int offset = 50;
    
            // Fill resume key at offset with test pattern
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 8.9K bytes
    - Viewed (0)
  3. src/test/java/jcifs/internal/smb2/nego/NegotiateContextResponseTest.java

                // Assert
                assertEquals(4 + (2 * hashAlgoCount) + 16, size);
            }
    
            @Test
            @DisplayName("Should handle offset in decode")
            void testDecodeWithOffset() throws SMBProtocolDecodingException {
                // Arrange
                context = new PreauthIntegrityNegotiateContext();
                byte[] buffer = new byte[] { (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, // Padding
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 19.4K bytes
    - Viewed (0)
  4. src/test/java/jcifs/internal/dtyp/ACETest.java

            ace.sid = testSid;
    
            assertSame(testSid, ace.getSID());
        }
    
        @Test
        @DisplayName("Test decode with offset")
        void testDecodeWithOffset() {
            // Prepare test data with offset
            testBuffer = new byte[150];
            int offset = 50;
    
            testBuffer[offset] = 0x00; // Allow ACE
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 13.6K bytes
    - Viewed (0)
  5. src/test/java/jcifs/internal/fscc/FileEndOfFileInformationTest.java

            // Verify decoded value through toString
            assertTrue(fileInfo.toString().contains("endOfFile=" + expectedValue));
        }
    
        @Test
        @DisplayName("Test decode with offset")
        void testDecodeWithOffset() throws SMBProtocolDecodingException {
            // Prepare buffer with offset
            long expectedValue = 0xAAAABBBBCCCCDDDDL;
            byte[] buffer = new byte[20];
            int offset = 7;
    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/smb2/ioctl/SrvCopyChunkCopyResponseTest.java

                assertEquals(327680, response.getTotalBytesWritten());
            }
    
            @Test
            @DisplayName("Should decode at different buffer offset")
            void testDecodeWithOffset() throws SMBProtocolDecodingException {
                byte[] buffer = new byte[256];
                int offset = 100;
                byte[] responseData = createValidCopyChunkResponse(10, 131072, 1310720);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 19.8K bytes
    - Viewed (0)
  7. src/test/java/jcifs/internal/fscc/SmbInfoAllocationTest.java

            long expectedFree = free * sectPerAlloc * bytesPerSect;
            assertEquals(expectedFree, smbInfoAllocation.getFree());
        }
    
        @Test
        @DisplayName("Test decode with offset")
        void testDecodeWithOffset() throws SMBProtocolDecodingException {
            // Prepare test data with offset
            byte[] buffer = new byte[30];
            int bufferIndex = 5; // Start at offset 5
            int idFileSystem = 0xFFFFFFFF;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14.2K bytes
    - Viewed (0)
  8. src/test/java/jcifs/internal/dtyp/SecurityDescriptorTest.java

            assertNull(securityDescriptor.getOwnerGroupSid());
            assertNull(securityDescriptor.getAces());
        }
    
        @Test
        @DisplayName("Test decode with offset")
        void testDecodeWithOffset() throws SMBProtocolDecodingException {
            int offset = 100;
            prepareMinimalSecurityDescriptorBuffer(testBuffer, offset, true, true, false);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.6K bytes
    - Viewed (0)
  9. src/test/java/jcifs/internal/dfs/DfsReferralResponseBufferTest.java

                assertEquals(tflagsValue, buffer.getTflags());
            }
    
            @Test
            @DisplayName("Should decode with non-zero buffer offset")
            void testDecodeWithOffset() {
                byte[] testBuffer = new byte[20];
                int offset = 5;
                ByteBuffer bb = ByteBuffer.wrap(testBuffer).order(ByteOrder.LITTLE_ENDIAN);
    
                // Add padding before actual data
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.4K bytes
    - Viewed (0)
  10. src/test/java/jcifs/internal/fscc/FileSystemInformationTest.java

                assertTrue(fileFsSizeInfo.getFree() > 0);
            }
    
            @Test
            @DisplayName("Should handle buffer offset correctly")
            void testDecodeWithOffset() throws SMBProtocolDecodingException {
                byte[] buffer = new byte[100];
                int offset = 50;
    
                // Set data at offset
                buffer[offset + 16] = 0x04; // sectPerAlloc
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.1K bytes
    - Viewed (0)
Back to top