Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 102 for writeDataWireFormat (0.09 sec)

  1. src/test/java/jcifs/internal/smb1/trans/TransCallNamedPipeTest.java

        }
    
        @Test
        @DisplayName("Test writeDataWireFormat copies data correctly")
        void testWriteDataWireFormat() {
            // Given
            transCallNamedPipe = new TransCallNamedPipe(mockConfig, TEST_PIPE_NAME, TEST_DATA, 0, TEST_DATA.length);
            byte[] dst = new byte[100];
    
            // When
            int bytesWritten = transCallNamedPipe.writeDataWireFormat(dst, 0);
    
            // Then
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 10.8K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/smb1/trans/TransWaitNamedPipeResponseTest.java

            // Assert
            assertEquals(0, result);
        }
    
        @Test
        @DisplayName("writeDataWireFormat should return 0")
        void testWriteDataWireFormat() {
            // Arrange
            byte[] dst = new byte[100];
            int dstIndex = 0;
    
            // Act
            int result = response.writeDataWireFormat(dst, dstIndex);
    
            // Assert
            assertEquals(0, result);
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14.1K bytes
    - Viewed (0)
  3. src/test/java/jcifs/smb1/smb1/Trans2SetFileInformationResponseTest.java

        }
    
        /**
         * Test for the writeDataWireFormat method.
         * It should always return 0.
         */
        @Test
        void testWriteDataWireFormat() {
            byte[] dst = new byte[10];
            // The method should not write anything and return 0
            assertEquals(0, response.writeDataWireFormat(dst, 0), "writeDataWireFormat should return 0.");
        }
    
        /**
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 3.8K bytes
    - Viewed (0)
  4. src/test/java/jcifs/smb1/smb1/TransWaitNamedPipeResponseTest.java

            @ValueSource(ints = { 0, 2, -2, Integer.MAX_VALUE })
            @DisplayName("writeDataWireFormat returns 0 for all indices")
            void writeDataWireFormatReturnsZero(int index) {
                TransWaitNamedPipeResponse resp = new TransWaitNamedPipeResponse();
                assertEquals(0, resp.writeDataWireFormat(new byte[10], index), "writeDataWireFormat should always return 0");
            }
    
            @ParameterizedTest
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 5.4K bytes
    - Viewed (0)
  5. src/test/java/jcifs/internal/smb1/trans/TransTransactNamedPipeTest.java

        @DisplayName("Test writeDataWireFormat with insufficient buffer")
        void testWriteDataWireFormatInsufficientBuffer() {
            // Arrange
            TransTransactNamedPipe trans = new TransTransactNamedPipe(mockConfig, TEST_FID, TEST_DATA, TEST_OFFSET, TEST_LENGTH);
            byte[] dst = new byte[5]; // Buffer too small
            int dstIndex = 0;
    
            // Act
            int bytesWritten = trans.writeDataWireFormat(dst, dstIndex);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.7K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/smb1/trans2/Trans2SetFileInformationResponseTest.java

        }
    
        @Test
        @DisplayName("Test writeDataWireFormat returns 0")
        void testWriteDataWireFormat() {
            // Test that writeDataWireFormat always returns 0
            byte[] buffer = new byte[100];
            int result = response.writeDataWireFormat(buffer, 0);
            assertEquals(0, result);
    
            // Test with different offset
            result = response.writeDataWireFormat(buffer, 75);
            assertEquals(0, result);
        }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.9K bytes
    - Viewed (0)
  7. src/test/java/jcifs/smb1/smb1/TransTransactNamedPipeResponseTest.java

        }
    
        /**
         * Tests the writeDataWireFormat method.
         */
        @Test
        void testWriteDataWireFormat() {
            byte[] dst = new byte[10];
            int result = response.writeDataWireFormat(dst, 0);
            assertEquals(0, result, "writeDataWireFormat should always return 0.");
        }
    
        /**
         * Tests the readSetupWireFormat method.
         */
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.3K bytes
    - Viewed (0)
  8. src/test/java/jcifs/internal/smb1/trans2/Trans2GetDfsReferralResponseTest.java

            }
    
            @Test
            @DisplayName("Should return 0 for writeDataWireFormat")
            void testWriteDataWireFormat() {
                byte[] dst = new byte[100];
                int result = response.writeDataWireFormat(dst, 0);
    
                assertEquals(0, result);
            }
    
            @Test
            @DisplayName("Should return 0 for writeDataWireFormat with offset")
            void testWriteDataWireFormatWithOffset() {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 19.4K bytes
    - Viewed (0)
  9. src/test/java/jcifs/smb1/smb1/Trans2QueryPathInformationTest.java

        }
    
        /**
         * Tests the writeDataWireFormat method.
         */
        @Test
        void testWriteDataWireFormat() {
            // Given
            Trans2QueryPathInformation trans = new Trans2QueryPathInformation("anyfile.txt", 0);
            byte[] dst = new byte[10];
    
            // When
            int bytesWritten = trans.writeDataWireFormat(dst, 0);
    
            // Then
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.8K bytes
    - Viewed (0)
  10. src/test/java/jcifs/internal/smb1/trans2/Trans2SetFileInformationTest.java

            // Check FID is written correctly
            int actualFid = SMBUtil.readInt2(buffer, 0);
            assertEquals(fid & 0xFFFF, actualFid);
        }
    
        @Test
        @DisplayName("Test writeDataWireFormat")
        void testWriteDataWireFormat() {
            // Setup mock to return encoded size
            when(mockFileInfo.encode(any(byte[].class), anyInt())).thenReturn(40);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 17.8K bytes
    - Viewed (0)
Back to top