Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 777 for When (2.32 sec)

  1. src/test/java/jcifs/BufferCacheTest.java

            doNothing().when(mockBufferCache).releaseBuffer(buffer);
    
            // When & Then
            assertDoesNotThrow(() -> {
                mockBufferCache.releaseBuffer(buffer);
            }, "releaseBuffer should handle valid buffers");
        }
    
        @Test
        @DisplayName("getBuffer should return buffers for use")
        void testGetBufferBasicUsage() {
            // When
            byte[] buffer1 = testCache.getBuffer();
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.3K bytes
    - Viewed (0)
  2. 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: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.2K bytes
    - Viewed (0)
  3. 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: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 11K bytes
    - Viewed (0)
  4. src/test/java/jcifs/internal/smb1/com/SmbComWriteAndXResponseTest.java

            byte[] buffer = new byte[] { (byte) 0xff, (byte) 0xff, 0, 0, 0, 0, 0, 0 };
            SmbComWriteAndXResponse instance = new SmbComWriteAndXResponse(config);
    
            // When
            int result = instance.readParameterWordsWireFormat(buffer, 0);
    
            // Then
            assertEquals(8, result);
            assertEquals(0xffffL, instance.getCount());
        }
    
        /**
         * Test of readParameterWordsWireFormat with zero count
         */
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 3.2K bytes
    - Viewed (0)
  5. src/test/java/jcifs/netbios/LmhostsTest.java

            mockContext = mock(CIFSContext.class);
            mockConfig = mock(Configuration.class);
            when(mockContext.getConfig()).thenReturn(mockConfig);
        }
    
        @Test
        void testGetByNameWithNullLmHostsFile() {
            // Test when lmhosts file is not configured
            when(mockConfig.getLmHostsFileName()).thenReturn(null);
    
            NbtAddress result = lmhosts.getByName("TEST_HOST", mockContext);
    
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.2K bytes
    - Viewed (0)
  6. fess-crawler/src/test/java/org/codelibs/fess/crawler/processor/impl/SitemapsResponseProcessorTest.java

            sitemap.setLoc("https://example.com/page1");
    
            SitemapSet sitemapSet = new SitemapSet();
            sitemapSet.addSitemap(sitemap);
    
            when(crawlerContainer.getComponent("sitemapsHelper")).thenReturn(sitemapsHelper);
            try {
                when(sitemapsHelper.parse(any(InputStream.class))).thenReturn(sitemapSet);
            } catch (Exception e) {
                fail("Should not throw exception in test setup");
            }
    Registered: Sat Dec 20 11:21:39 UTC 2025
    - Last Modified: Thu Nov 13 13:29:22 UTC 2025
    - 12K bytes
    - Viewed (0)
  7. src/test/java/jcifs/internal/smb2/lease/DirectoryLeaseManagerTest.java

            // Setup mock files
            when(mockFile1.getName()).thenReturn("file1.txt");
            when(mockFile1.length()).thenReturn(1024L);
            when(mockFile1.lastModified()).thenReturn(1000L);
            when(mockFile1.isDirectory()).thenReturn(false);
            when(mockFile1.getAttributes()).thenReturn(0x20);
            when(mockFile1.createTime()).thenReturn(500L);
            when(mockFile1.lastAccess()).thenReturn(800L);
    
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 23 01:47:47 UTC 2025
    - 15.9K bytes
    - Viewed (0)
  8. src/test/java/jcifs/smb/SmbPipeOutputStreamTest.java

        private SmbPipeOutputStream newStream() throws CIFSException {
            // Arrange common constructor collaborators to avoid touching network/state
            when(handle.getPipe()).thenReturn(pipe);
            when(tree.isSMB2()).thenReturn(true);
            when(tree.getSendBufferSize()).thenReturn(4096);
            // Act
            return new SmbPipeOutputStream(handle, tree);
        }
    
        @ParameterizedTest
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.4K bytes
    - Viewed (0)
  9. src/test/java/jcifs/DfsResolverTest.java

            when(mockConfig.isDfsDisabled()).thenReturn(false);
            when(mockContext.getTransportPool()).thenReturn(mockTransportPool);
            when(mockTransportPool.getSmbTransport(any(), anyString(), anyInt(), anyBoolean(), anyBoolean())).thenReturn(mockTransport);
            when(mockTransport.unwrap(any())).thenReturn(mockTransport);
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.5K bytes
    - Viewed (0)
  10. src/test/java/jcifs/smb/SmbFileTest.java

                doReturn(mockTreeHandle).when(dest).ensureTreeConnected();
                doReturn(true).when(smbFile).exists();
                doReturn(false).when(dest).exists();
                when(mockTreeHandle.isSMB2()).thenReturn(false);
                when(mockTreeHandle.isSameTree(mockTreeHandle)).thenReturn(true);
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.8K bytes
    - Viewed (0)
Back to top