Search Options

Results per page
Sort
Preferred Languages
Advance

Results 131 - 140 of 239 for thenReturn (0.05 sec)

  1. src/test/java/jcifs/internal/smb2/multichannel/ChannelManagerTest.java

            when(mockContext.getConfig()).thenReturn(mockConfig);
            when(mockConfig.isUseMultiChannel()).thenReturn(true);
            when(mockConfig.getMaxChannels()).thenReturn(4);
            when(mockConfig.getChannelBindingPolicy()).thenReturn(1); // preferred
            when(mockConfig.getLoadBalancingStrategy()).thenReturn("adaptive");
            when(mockConfig.getChannelHealthCheckInterval()).thenReturn(10);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 21 11:13:46 UTC 2025
    - 7.6K bytes
    - Viewed (0)
  2. src/test/java/jcifs/smb/SmbFileFilterTest.java

            // negative size -> reject
            when(smbFile.length()).thenReturn(-1L);
            assertFalse(filter.accept(smbFile), "Negative size should be rejected");
            verify(smbFile, times(1)).length();
    
            // zero size -> reject
            reset(smbFile);
            when(smbFile.length()).thenReturn(0L);
            assertFalse(filter.accept(smbFile), "Zero size should be rejected");
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.4K bytes
    - Viewed (0)
  3. src/test/java/jcifs/internal/smb1/ServerMessageBlockTest.java

            public int getWordCount() {
                return wordCount;
            }
        }
    
        @BeforeEach
        void setUp() {
            MockitoAnnotations.openMocks(this);
            when(mockConfig.getPid()).thenReturn(12345);
        }
    
        @Nested
        @DisplayName("Constructor Tests")
        class ConstructorTests {
    
            @Test
            @DisplayName("Test constructor with config only")
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 36.2K bytes
    - Viewed (0)
  4. src/test/java/jcifs/CredentialsTest.java

            });
        }
    
        @Test
        @DisplayName("Should unwrap to correct type")
        void testUnwrap() {
            // Given
            when(mockCredentials.unwrap(Credentials.class)).thenReturn(mockCredentials);
    
            // When
            Credentials unwrapped = mockCredentials.unwrap(Credentials.class);
    
            // Then
            assertSame(mockCredentials, unwrapped);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 2.5K bytes
    - Viewed (0)
  5. src/test/java/jcifs/smb/Kerb5AuthenticatorTest.java

        void createContext_forceFallback_triggersNtlmAndFailsOnNonNtlmToken() throws CIFSException {
            when(tc.getConfig()).thenReturn(config);
            when(config.isAllowNTLMFallback()).thenReturn(true);
            when(config.isUseRawNTLM()).thenReturn(false);
    
            // Enable NTLM fallback by providing NTLM creds in constructor
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 10.9K bytes
    - Viewed (0)
  6. src/test/java/jcifs/smb/FileEntryTest.java

            when(mockEntry.getName()).thenReturn("file.txt");
            when(mockEntry.getType()).thenReturn(1);
            when(mockEntry.getAttributes()).thenReturn(0x20);
            when(mockEntry.createTime()).thenReturn(100L);
            when(mockEntry.lastModified()).thenReturn(200L);
            when(mockEntry.lastAccess()).thenReturn(300L);
            when(mockEntry.length()).thenReturn(12345L);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 10K bytes
    - Viewed (0)
  7. src/test/java/jcifs/ACETest.java

                ACE directAce = mock(ACE.class);
                when(inheritedAce.isInherited()).thenReturn(true);
                when(directAce.isInherited()).thenReturn(false);
    
                assertTrue(inheritedAce.isInherited());
                assertFalse(directAce.isInherited());
                verify(inheritedAce).isInherited();
                verify(directAce).isInherited();
            }
    
            @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 24.4K bytes
    - Viewed (0)
  8. src/test/java/jcifs/smb1/UniAddressTest.java

            when(dummy.getHostAddress()).thenReturn("192.0.2.1");
            UniAddress ua = new UniAddress(dummy);
            assertEquals("192.0.2.1", ua.getHostAddress(), "should forward hostAddress to underlying InetAddress");
        }
    
        @Test
        void toStringDelegatesToUnderlyingAddress() {
            InetAddress dummy = mock(InetAddress.class);
            when(dummy.toString()).thenReturn("mockedInet");
    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/SmbBasicFileInfoTest.java

            Mockito.when(mock.getAttributes()).thenReturn(7);
            Mockito.when(mock.getCreateTime()).thenReturn(11L);
            Mockito.when(mock.getLastWriteTime()).thenReturn(13L);
            Mockito.when(mock.getLastAccessTime()).thenReturn(17L);
            Mockito.when(mock.getSize()).thenReturn(19L);
    
            // Act: invoke each method once
            int attributes = mock.getAttributes();
    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/ntlmssp/Type1MessageTest.java

            lenient().when(mockContext.getConfig()).thenReturn(mockConfig);
            lenient().when(mockContext.getNameServiceClient()).thenReturn(mockNameServiceClient);
            lenient().when(mockNameServiceClient.getLocalHost()).thenReturn(mockLocalHost);
            lenient().when(mockLocalHost.getHostName()).thenReturn("localhost");
            lenient().when(mockConfig.getDefaultDomain()).thenReturn("WORKGROUP");
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.1K bytes
    - Viewed (0)
Back to top