Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 529 for Given (0.2 sec)

  1. src/test/java/jcifs/CIFSContextTest.java

                mockContext.renewCredentials("hint", new Exception());
            });
        }
    
        @Test
        @DisplayName("Should get SmbResource")
        void testGet() throws CIFSException {
            // Given
            String url = "smb://server/share/file";
            SmbResource mockResource = mock(SmbResource.class);
            when(mockContext.get(url)).thenReturn(mockResource);
    
            // When
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 8.8K bytes
    - Viewed (0)
  2. src/test/java/jcifs/NetbiosNameTest.java

        void testVariousNameTypes(int nameType) {
            // Given
            when(mockNetbiosName.getNameType()).thenReturn(nameType);
    
            // When
            int result = mockNetbiosName.getNameType();
    
            // Then
            assertEquals(nameType, result);
        }
    
        @Test
        @DisplayName("Should handle null name")
        void testNullName() {
            // Given
            when(mockNetbiosName.getName()).thenReturn(null);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 8K bytes
    - Viewed (0)
  3. src/test/java/jcifs/internal/SmbNegotiationRequestTest.java

        void testInterfaceCanBeMocked() {
            // Given
            SmbNegotiationRequest mockRequest = mock(SmbNegotiationRequest.class);
    
            // Then
            assertNotNull(mockRequest, "Mock should be created successfully");
        }
    
        @Test
        @DisplayName("Test default behavior of mock without stubbing")
        void testDefaultBehaviorOfMock() {
            // Given
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 6.4K bytes
    - Viewed (0)
  4. src/test/java/jcifs/internal/smb2/nego/Smb2NegotiateResponseTest.java

            // Given
            setPrivateField(response, "dialectRevision", 0x0311);
    
            // When
            int dialect = response.getDialectRevision();
    
            // Then
            assertEquals(0x0311, dialect);
        }
    
        @Test
        @DisplayName("Should return server GUID")
        void testGetServerGuid() throws Exception {
            // Given
            byte[] guid = new byte[16];
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 32.5K bytes
    - Viewed (0)
  5. src/test/java/jcifs/internal/smb1/trans2/Trans2GetDfsReferralTest.java

        void setUp() {
            MockitoAnnotations.openMocks(this);
        }
    
        @Test
        @DisplayName("Constructor should initialize with correct values")
        void testConstructor() throws Exception {
            // Given
            String filename = "\\\\server\\share\\file.txt";
    
            // When
            trans2GetDfsReferral = new Trans2GetDfsReferral(mockConfig, filename);
    
            // Then
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/smb2/ioctl/SrvCopychunkCopyTest.java

        class ConstructorTests {
    
            @Test
            @DisplayName("Should create instance with source key and single chunk")
            void testConstructorWithSingleChunk() {
                // Given
                byte[] sourceKey = new byte[SOURCE_KEY_SIZE];
                Arrays.fill(sourceKey, (byte) 0xAB);
                SrvCopychunk chunk = new SrvCopychunk(100, 200, 300);
    
                // When
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 23.1K bytes
    - Viewed (0)
  7. src/test/java/jcifs/internal/smb1/com/SmbComWriteAndXResponseTest.java

            config = new PropertyConfiguration(new Properties());
        }
    
        /**
         * Test of readParameterWordsWireFormat method
         */
        @Test
        public void testReadParameterWordsWireFormat() {
            // Given
            byte[] buffer = new byte[] { (byte) 0xff, (byte) 0xff, 0, 0, 0, 0, 0, 0 };
            SmbComWriteAndXResponse instance = new SmbComWriteAndXResponse(config);
    
            // When
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 3.2K bytes
    - Viewed (0)
  8. src/test/java/jcifs/internal/smb1/com/SmbComRenameTest.java

        /**
         * Test constructor initialization with valid parameters
         */
        @Test
        @DisplayName("Test constructor initializes fields correctly")
        public void testConstructor() throws Exception {
            // Given
            String oldFileName = "oldFile.txt";
            String newFileName = "newFile.txt";
    
            // When
            smbComRename = new SmbComRename(config, oldFileName, newFileName);
    
            // Then
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.5K bytes
    - Viewed (0)
  9. src/test/java/jcifs/util/CryptoTest.java

     */
    @DisplayName("Crypto Utility Tests")
    class CryptoTest extends BaseTest {
    
        @Test
        @DisplayName("Should calculate MD4 hash correctly")
        void testMD4Hash() {
            // Given
            String input = "Hello World";
            byte[] data = input.getBytes();
    
            // When
            MessageDigest md4 = Crypto.getMD4();
            byte[] hash = md4.digest(data);
    
            // Then
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7.4K bytes
    - Viewed (0)
  10. src/test/java/jcifs/internal/smb2/tree/Smb2TreeConnectRequestTest.java

        }
    
        @Test
        @DisplayName("Should create request with correct command type and path")
        void testConstructorSetsCorrectCommandAndPath() throws Exception {
            // Given & When
            String path = "\\\\testserver\\testshare";
            Smb2TreeConnectRequest req = new Smb2TreeConnectRequest(mockConfig, path);
    
            // Then - verify command is set correctly using reflection
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.6K bytes
    - Viewed (0)
Back to top