Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 88 for readDataWireFormat (0.11 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. src/test/java/jcifs/smb1/smb1/TransTransactNamedPipeResponseTest.java

        }
    
        /**
         * Tests the readDataWireFormat method when the pipe's input stream is null.
         */
        @Test
        void testReadDataWireFormat_withNullPipeIn() {
            mockPipe.pipeIn = null;
            byte[] buffer = new byte[10];
            int len = 10;
            int result = response.readDataWireFormat(buffer, 0, len);
            assertEquals(len, result, "readDataWireFormat should return the length when pipeIn is null.");
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 5.3K bytes
    - Click Count (0)
  2. src/test/java/jcifs/internal/smb1/trans2/Trans2QueryPathInformationResponseTest.java

            response = new Trans2QueryPathInformationResponse(mockConfig, FileInformation.FILE_BASIC_INFO);
    
            // Simulate setting info through readDataWireFormat
            byte[] buffer = createMockFileBasicInfoBuffer();
            response.setDataCount(buffer.length);
            response.readDataWireFormat(buffer, 0, buffer.length);
    
            FileBasicInfo info = response.getInfo(FileBasicInfo.class);
            assertNotNull(info);
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 11.9K bytes
    - Click Count (0)
  3. src/test/java/jcifs/smb1/smb1/Trans2SetFileInformationResponseTest.java

        }
    
        /**
         * Test for the readDataWireFormat method.
         * It should always return 0.
         */
        @Test
        void testReadDataWireFormat() {
            byte[] buffer = new byte[10];
            // The method should not read anything and return 0
            assertEquals(0, response.readDataWireFormat(buffer, 0, 10), "readDataWireFormat should return 0.");
        }
    
        /**
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 3.8K bytes
    - Click Count (0)
  4. src/test/java/jcifs/smb1/smb1/Trans2QueryFSInformationResponseTest.java

        }
    
        /**
         * Tests the readDataWireFormat method with an unknown information level.
         */
        @Test
        void testReadDataWireFormat_UnknownInformationLevel() {
            Trans2QueryFSInformationResponse response = new Trans2QueryFSInformationResponse(999); // Unknown level
            byte[] buffer = new byte[10];
            int bytesRead = response.readDataWireFormat(buffer, 0, buffer.length);
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 8.6K bytes
    - Click Count (0)
  5. src/test/java/jcifs/internal/smb1/trans2/Trans2GetDfsReferralResponseTest.java

            void testReadDataWireFormat() {
                byte[] buffer = createValidDfsReferralBuffer();
    
                int bytesRead = response.readDataWireFormat(buffer, 0, buffer.length);
    
                assertTrue(bytesRead > 0);
                // readDataWireFormat returns bytes consumed from header, not full buffer
                assertEquals(28, bytesRead); // Header + one referral structure
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 19.4K bytes
    - Click Count (0)
  6. src/test/java/jcifs/smb1/smb1/TransWaitNamedPipeResponseTest.java

            @ValueSource(ints = { 0, 4, -4, Integer.MAX_VALUE })
            @DisplayName("readDataWireFormat returns 0 regardless of buffer and length")
            void readDataWireFormatReturnsZero(int len) {
                TransWaitNamedPipeResponse resp = new TransWaitNamedPipeResponse();
                assertEquals(0, resp.readDataWireFormat(new byte[10], 0, len), "readDataWireFormat should always return 0");
            }
        }
    
        /**
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 07:14:38 GMT 2025
    - 5.4K bytes
    - Click Count (0)
  7. src/test/java/jcifs/smb1/smb1/TransWaitNamedPipeTest.java

        }
    
        @Test
        public void testReadDataWireFormat() {
            // Test that readDataWireFormat returns 0
            TransWaitNamedPipe pipe = new TransWaitNamedPipe("\\\\pipe\\testPipe");
            byte[] buffer = new byte[100];
    
            int consumed = pipe.readDataWireFormat(buffer, 0, 10);
            assertEquals(0, consumed, "readDataWireFormat should return 0");
        }
    
        @Test
        public void testToString() {
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 5.3K bytes
    - Click Count (0)
  8. src/test/java/jcifs/internal/smb1/trans/TransWaitNamedPipeResponseTest.java

            }
        }
    
        @Test
        @DisplayName("readDataWireFormat should return 0")
        void testReadDataWireFormat() {
            // Arrange
            byte[] buffer = new byte[100];
            int bufferIndex = 0;
            int len = 100;
    
            // Act
            int result = response.readDataWireFormat(buffer, bufferIndex, len);
    
            // Assert
            assertEquals(0, result);
        }
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 14.1K bytes
    - Click Count (0)
  9. src/test/java/jcifs/internal/smb1/net/NetServerEnum2ResponseTest.java

        }
    
        @Test
        @DisplayName("Test readDataWireFormat with empty servers list")
        void testReadDataWireFormatEmptyServers() throws Exception {
            setNumEntries(response, 0);
            byte[] buffer = new byte[100];
    
            int bytesRead = response.readDataWireFormat(buffer, 0, buffer.length);
    
            assertEquals(0, bytesRead);
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 25.4K bytes
    - Click Count (0)
  10. src/test/java/jcifs/smb1/smb1/NetServerEnum2Test.java

            assertEquals(0, result);
        }
    
        /**
         * Test the readDataWireFormat method.
         */
        @Test
        void testReadDataWireFormat() {
            byte[] buffer = new byte[10];
            int result = netServerEnum2.readDataWireFormat(buffer, 0, 10);
            assertEquals(0, result);
        }
    
        /**
         * Test the toString method with SV_TYPE_ALL.
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 7.6K bytes
    - Click Count (0)
Back to Top