Search Options

Results per page
Sort
Preferred Languages
Advance

Results 151 - 160 of 239 for thenReturn (0.04 sec)

  1. src/test/java/jcifs/smb1/http/NtlmHttpServletRequestTest.java

        @Test
        @DisplayName("constructor stores principal and delegates properly")
        void testHappyPath(@Mock HttpServletRequest mockRequest, @Mock Principal mockPrincipal) {
            when(mockPrincipal.getName()).thenReturn("user1");
            NtlmHttpServletRequest request = new NtlmHttpServletRequest(mockRequest, mockPrincipal);
            assertEquals("user1", request.getRemoteUser());
            assertSame(mockPrincipal, request.getUserPrincipal());
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 21 04:51:33 UTC 2025
    - 3.4K bytes
    - Viewed (0)
  2. src/test/java/jcifs/smb/NtlmUtilTest.java

        void testGetPreNTLMResponse_basicAndInteractions() throws Exception {
            // Arrange
            when(cifsContext.getConfig()).thenReturn(configuration);
            when(configuration.getOemEncoding()).thenReturn("Cp850");
            String password14 = "ABCDEFGHIJKLMN"; // 14 chars
            String password15 = "ABCDEFGHIJKLMNO"; // 15 chars, same first 14
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 12K bytes
    - Viewed (1)
  3. src/test/java/jcifs/dcerpc/msrpc/LsarSidArrayXTest.java

            // Mock the unwrap method to return a sid_t instance
            sid_t sidT1 = new sid_t();
            sid_t sidT2 = new sid_t();
            when(mockSid1.unwrap(sid_t.class)).thenReturn(sidT1);
            when(mockSid2.unwrap(sid_t.class)).thenReturn(sidT2);
    
            jcifs.SID[] sids = { mockSid1, mockSid2 };
            LsarSidArrayX lsarSidArrayX = new LsarSidArrayX(sids);
    
            // Verify num_sids
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 3.1K bytes
    - Viewed (0)
  4. src/test/java/jcifs/internal/smb2/multichannel/MultiChannelIntegrationTest.java

            multiConfig = new PropertyConfiguration(props);
    
            // Mock context and session for ChannelManager
            when(mockContext.getConfig()).thenReturn(multiConfig);
            when(mockSession.getSessionKey()).thenReturn(new byte[16]);
    
            channelManager = new ChannelManager(mockContext, mockSession);
        }
    
        @Test
        void testMultiChannelInitialization() throws Exception {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 21 11:13:46 UTC 2025
    - 8.2K bytes
    - Viewed (0)
  5. src/test/java/jcifs/tests/persistent/HandleReconnectorTest.java

        }
    
        @Test
        public void testReconnectHandleSuccess() throws Exception {
            when(mockManager.getHandleForReconnect("/test/file.txt")).thenReturn(testHandle);
    
            // Create a test reconnector that succeeds
            TestHandleReconnector testReconnector = new TestHandleReconnector(mockManager, true);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 21 04:51:33 UTC 2025
    - 5.6K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/smb1/trans/nt/NtTransNotifyChangeTest.java

        @BeforeEach
        void setUp() {
            MockitoAnnotations.openMocks(this);
            when(mockConfig.getNotifyBufferSize()).thenReturn(4096);
            when(mockConfig.getTransactionBufferSize()).thenReturn(65535);
        }
    
        @Test
        @DisplayName("Test constructor initialization with basic parameters")
        void testConstructorBasic() {
            int fid = 0x1234;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.4K bytes
    - Viewed (0)
  7. src/test/java/jcifs/smb/ShareEnumIteratorTest.java

        }
    
        // Helper to create a minimal FileEntry mock
        private FileEntry entry(String name, int type) {
            FileEntry e = mock(FileEntry.class);
            when(e.getName()).thenReturn(name);
            when(e.getType()).thenReturn(type);
            return e;
        }
    
        @Test
        @DisplayName("Happy path without filter: iterates all entries in order")
        void happyPath_noFilter_returnsAll() throws Exception {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 8.1K bytes
    - Viewed (0)
  8. src/test/java/jcifs/util/StringsTest.java

            void testGetOEMBytes() {
                // Given
                Configuration mockConfig = mock(Configuration.class);
                when(mockConfig.getOemEncoding()).thenReturn("UTF-8");
    
                // When
                byte[] result = Strings.getOEMBytes(TEST_STRING, mockConfig);
    
                // Then
                assertNotNull(result, "Result should not be null");
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.6K bytes
    - Viewed (0)
  9. src/test/java/jcifs/internal/AllocInfoTest.java

            @DisplayName("Should handle multiple invocations")
            void shouldHandleMultipleInvocations() {
                // Given
                when(mockAllocInfo.getCapacity()).thenReturn(1000L, 2000L, 3000L);
                when(mockAllocInfo.getFree()).thenReturn(500L, 1000L, 1500L);
    
                // When & Then
                assertEquals(1000L, mockAllocInfo.getCapacity());
                assertEquals(500L, mockAllocInfo.getFree());
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.8K bytes
    - Viewed (0)
  10. src/test/java/jcifs/internal/smb2/ServerMessageBlock2ResponseTest.java

                response.setDigest(mockDigest);
                response.setStatusForTest(NtStatus.NT_STATUS_ACCESS_DENIED);
                when(mockConfig.isRequireSecureNegotiate()).thenReturn(true);
                when(mockDigest.verify(buffer, 0, 100, 0, response)).thenReturn(false);
    
                boolean result = response.verifySignature(buffer, 0, 100);
    
                assertTrue(result);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 19.3K bytes
    - Viewed (0)
Back to top