Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 151 for test_constructor (0.18 sec)

  1. src/test/java/jcifs/netbios/NbtExceptionTest.java

         */
        @Test
        @DisplayName("NbtException constructor should correctly set error class, error code, and message")
        void testConstructor() {
            int errorClass = NbtException.ERR_NAM_SRVC;
            int errorCode = NbtException.FMT_ERR;
            NbtException exception = new NbtException(errorClass, errorCode);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.9K bytes
    - Viewed (0)
  2. src/test/java/jcifs/smb1/smb1/SmbComWriteTest.java

                throw new RuntimeException("Failed to access field " + fieldName, e);
            }
        }
    
        /**
         * Test that the constructor initializes all fields correctly
         */
        @Test
        public void testConstructor() {
            // Arrange
            int fid = 0x1234;
            int offset = 100;
            int remaining = 50;
            byte[] buffer = new byte[100];
            int off = 10;
            int len = 40;
    
            // Act
    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/internal/smb1/trans2/Trans2FindFirst2ResponseTest.java

            Properties props = new Properties();
            config = new PropertyConfiguration(props);
            response = new Trans2FindFirst2Response(config);
        }
    
        @Test
        void testConstructor() {
            // Test that the constructor properly initializes the object
            assertNotNull(response);
            // The command should be SMB_COM_TRANSACTION2 (0x32 = 50)
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.4K bytes
    - Viewed (0)
  4. src/test/java/jcifs/smb1/smb1/Trans2GetDfsReferralTest.java

                    clazz = clazz.getSuperclass();
                }
            }
            throw new NoSuchFieldException(fieldName);
        }
    
        @Test
        @DisplayName("Constructor initializes fields")
        void testConstructor() throws Exception {
            Trans2GetDfsReferral cmd = new Trans2GetDfsReferral("/file");
            assertEquals("/file", getPrivateField(cmd, "path"));
            assertEquals((byte) 0x00, getPrivateField(cmd, "maxSetupCount"));
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.6K bytes
    - Viewed (0)
  5. src/test/java/jcifs/smb1/smb1/Trans2QueryPathInformationTest.java

    /**
     * Unit tests for the Trans2QueryPathInformation class.
     */
    class Trans2QueryPathInformationTest {
    
        /**
         * Tests the constructor of Trans2QueryPathInformation.
         */
        @Test
        void testConstructor() {
            // Given
            String filename = "testFile.txt";
            int informationLevel = 0x0100; // SMB_QUERY_FILE_BASIC_INFO
    
            // When
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.8K bytes
    - Viewed (0)
  6. src/test/java/jcifs/netbios/NameServiceClientImplTest.java

                    || exception.getMessage().contains("not found"), "Exception message should indicate name resolution failure");
        }
    
        @Test
        @DisplayName("Should handle constructor with context")
        void testConstructor() {
            // When
            NameServiceClientImpl client = new NameServiceClientImpl(mockContext);
    
            // Then
            assertNotNull(client, "Should create client instance");
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 11K bytes
    - Viewed (0)
  7. src/test/java/jcifs/internal/smb1/trans/TransWaitNamedPipeTest.java

        @BeforeEach
        void setUp() {
            MockitoAnnotations.openMocks(this);
        }
    
        @Test
        @DisplayName("Constructor should initialize with correct values")
        void testConstructor() {
            // Act
            transWaitNamedPipe = new TransWaitNamedPipe(mockConfig, testPipeName);
    
            // Assert
            assertNotNull(transWaitNamedPipe);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 8.8K bytes
    - Viewed (0)
  8. src/test/java/jcifs/smb1/smb1/SmbComNtTransactionTest.java

                return "ConcreteSmbComNtTransaction";
            }
        }
    
        @BeforeEach
        void setUp() {
            smbComNtTransaction = new ConcreteSmbComNtTransaction();
        }
    
        @Test
        void testConstructor() {
            // Test if the offsets are initialized correctly by the constructor.
            assertEquals(69, smbComNtTransaction.primarySetupOffset, "primarySetupOffset should be initialized to 69");
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7.9K bytes
    - Viewed (0)
  9. src/test/java/jcifs/internal/smb1/com/SmbComCloseTest.java

        }
    
        /**
         * Test method for {@link jcifs.internal.smb1.com.SmbComClose#SmbComClose(jcifs.Configuration, int, long)}.
         */
        @Test
        public void testConstructor() {
            // Given
            int fid = 123;
            long lastWriteTime = System.currentTimeMillis();
    
            // When
            SmbComClose smbComClose = new SmbComClose(config, fid, lastWriteTime);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 6.4K bytes
    - Viewed (0)
  10. src/test/java/jcifs/internal/smb2/multichannel/ChannelInfoTest.java

            remoteInterface = new NetworkInterfaceInfo(remoteAddr, 1000);
    
            channelInfo = new ChannelInfo("test-channel", mockTransport, localInterface, remoteInterface);
        }
    
        @Test
        void testConstructor() {
            assertEquals("test-channel", channelInfo.getChannelId());
            assertEquals(mockTransport, channelInfo.getTransport());
            assertEquals(localInterface, channelInfo.getLocalInterface());
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 21 11:13:46 UTC 2025
    - 7.4K bytes
    - Viewed (0)
Back to top