Search Options

Results per page
Sort
Preferred Languages
Advance

Results 111 - 120 of 2,390 for when (0.02 sec)

  1. src/test/java/jcifs/smb/SSPContextTest.java

                // Arrange
                when(mockCtx.getSigningKey()).thenReturn(new byte[] { 7 });
                when(mockCtx.isEstablished()).thenReturn(true);
                when(mockCtx.initSecContext(any(byte[].class), anyInt(), anyInt())).thenReturn(new byte[] { 9 });
                when(mockCtx.getNetbiosName()).thenReturn("NB");
                when(mockCtx.isSupported(any())).thenReturn(true);
                when(mockCtx.isPreferredMech(any())).thenReturn(false);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.2K bytes
    - Viewed (0)
  2. src/test/java/jcifs/smb/SmbSessionImplSecurityTest.java

            Mockito.when(mockContext.getConfig()).thenReturn(mockConfig);
            Mockito.when(mockContext.getCredentials()).thenReturn(mockCredentials);
            Mockito.when(mockCredentials.unwrap(Mockito.any())).thenReturn(mockCredentialsInternal);
            Mockito.when(mockCredentialsInternal.clone()).thenReturn(mockCredentialsInternal);
            Mockito.when(mockTransport.acquire()).thenReturn(mockTransport);
        }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 11K bytes
    - Viewed (0)
  3. src/test/java/jcifs/smb1/https/HandlerTest.java

            void testGetDefaultPort() {
                // When
                int port = handler.getDefaultPort();
    
                // Then
                assertEquals(443, port);
                assertEquals(Handler.DEFAULT_HTTPS_PORT, port);
            }
    
            @Test
            @DisplayName("Should override parent HTTP port")
            void testPortOverride() {
                // When
                int httpsPort = handler.getDefaultPort();
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 6.2K bytes
    - Viewed (0)
  4. src/test/java/jcifs/internal/smb2/io/Smb2FlushResponseTest.java

        }
    
        @Test
        @DisplayName("Constructor should initialize with Configuration")
        void testConstructor() {
            // Given & When
            Smb2FlushResponse flushResponse = new Smb2FlushResponse(mockConfig);
    
            // Then
            assertNotNull(flushResponse);
            // Cannot test getConfig() as it's protected
        }
    
        @Nested
        @DisplayName("writeBytesWireFormat tests")
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 10.3K bytes
    - Viewed (0)
  5. src/test/java/jcifs/smb/SmbTreeHandleInternalTest.java

            verifyNoMoreInteractions(handle);
        }
    
        @Test
        @DisplayName("ensureDFSResolved(): throws CIFSException when underlying call fails")
        void ensureDFSResolved_throws() throws Exception {
            // Arrange: configure the mock to throw
            doThrow(new CIFSException("DFS resolution failed")).when(handle).ensureDFSResolved();
    
            // Act + Assert: exception is propagated with message
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.3K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/NotifyResponseTest.java

            // Setup mock notify information
            when(mockNotifyInfo1.getAction()).thenReturn(FileNotifyInformation.FILE_ACTION_ADDED);
            when(mockNotifyInfo1.getFileName()).thenReturn("test1.txt");
    
            when(mockNotifyInfo2.getAction()).thenReturn(FileNotifyInformation.FILE_ACTION_MODIFIED);
            when(mockNotifyInfo2.getFileName()).thenReturn("test2.txt");
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 21.2K bytes
    - Viewed (0)
  7. src/test/java/jcifs/netbios/SessionRequestPacketTest.java

        void testConstructorWithNetbiosNames() {
            when(mockCalledName.getName()).thenReturn("SERVER");
            when(mockCalledName.getNameType()).thenReturn(0x20);
            when(mockCalledName.getScope()).thenReturn(null);
    
            when(mockCallingName.getName()).thenReturn("CLIENT");
            when(mockCallingName.getNameType()).thenReturn(0x00);
            when(mockCallingName.getScope()).thenReturn(null);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.5K bytes
    - Viewed (0)
  8. src/test/java/jcifs/internal/smb2/create/Smb2CloseResponseTest.java

            @Test
            @DisplayName("Constructor should initialize with config, fileId and fileName")
            void testConstructorWithAllParameters() {
                // When
                Smb2CloseResponse closeResponse = new Smb2CloseResponse(mockConfig, testFileId, testFileName);
    
                // Then
                assertNotNull(closeResponse);
                assertArrayEquals(testFileId, closeResponse.getFileId());
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 26.9K bytes
    - Viewed (0)
  9. src/test/java/jcifs/smb/NtStatusTest.java

            // When/Then
            assertEquals((int) 0x80000005L, infoStatus);
            // Should be an informational/warning status (0x8 prefix)
            assertTrue((infoStatus & (int) 0x80000000L) == (int) 0x80000000L);
        }
    
        @Test
        @DisplayName("Should handle pending status")
        void testPendingStatus() {
            // Given
            int pendingStatus = NtStatus.NT_STATUS_PENDING;
    
            // When/Then
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.6K bytes
    - Viewed (0)
  10. src/test/java/jcifs/netbios/UniAddressTest.java

                when(mockNbtAddress.firstCalledName()).thenReturn("NBT_NAME");
                assertEquals("NBT_NAME", uniAddress.firstCalledName());
                verify(mockNbtAddress, times(1)).firstCalledName();
            }
    
            @Test
            void shouldReturnSmbServerNameWhenInetAddressIsDotQuadIP() throws UnknownHostException {
                when(mockInetAddress.getHostName()).thenReturn("192.168.1.100");
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 16.4K bytes
    - Viewed (0)
Back to top