- Sort Score
- Result 10 results
- Languages All
Results 81 - 90 of 239 for thenReturn (0.19 sec)
-
src/test/java/jcifs/smb/SmbSessionInternalTest.java
@ParameterizedTest @DisplayName("isInUse reflects current mocked state") @ValueSource(booleans = { true, false }) void isInUse_variants(boolean inUse) { when(session.isInUse()).thenReturn(inUse); boolean result = session.isInUse(); assertEquals(inUse, result); verify(session, times(1)).isInUse(); }Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 6.8K bytes - Viewed (0) -
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) -
src/test/java/jcifs/smb/SmbWatchHandleImplTest.java
when(handle.isValid()).thenReturn(true); when(handle.getTree()).thenReturn(tree); when(tree.isSMB2()).thenReturn(true); when(tree.getConfig()).thenReturn(mock(Configuration.class)); when(handle.getFileId()).thenReturn(fileId); when(tree.send(any(CommonServerMessageBlockRequest.class), any(), any(), any())).thenReturn(resp); }
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.5K bytes - Viewed (0) -
src/test/java/jcifs/internal/dfs/DfsReferralDataImplTest.java
void testFromReferralWithSpecialName() { when(mockReferral.getTtl()).thenReturn(300); when(mockReferral.getRFlags()).thenReturn(Trans2GetDfsReferralResponse.FLAGS_NAME_LIST_REFERRAL); when(mockReferral.getExpandedNames()).thenReturn(new String[0]); when(mockReferral.getSpecialName()).thenReturn("\\SPECIAL"); String reqPath = "\\\\domain\\root";
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 30.6K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbTreeHandleImplTest.java
when(ctx.getConfig()).thenReturn(config); when(config.getCapabilities()).thenReturn(0); when(config.getFlags2()).thenReturn(0); when(config.getMaxMpxCount()).thenReturn(1); when(config.getSendBufferSize()).thenReturn(4096); when(config.getReceiveBufferSize()).thenReturn(4096); when(config.getTransactionBufferSize()).thenReturn(4096);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 14.4K bytes - Viewed (0) -
src/test/java/jcifs/smb/FileEntryAdapterIteratorTest.java
FileEntry entry3 = mock(FileEntry.class); when(delegate.hasNext()).thenReturn(true, true, true, false); when(delegate.next()).thenReturn(entry1, entry2, entry3); // First rejected, second throws exception, third accepted when(filter.accept(resource)).thenReturn(false).thenThrow(new CIFSException("Error")).thenReturn(true); TestIterator iterator = new TestIterator(filter);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 10.6K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbTreeInternalTest.java
@Test @DisplayName("send without params returns the stubbed response") void send_noParams_returnsResponse() throws Exception { // Arrange - generic return type respected when(tree.send(request)).thenReturn(response); // Act CommonServerMessageBlockResponse out = tree.send(request); // Assert assertSame(response, out); verify(tree).send(request); } @TestRegistered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 5.6K bytes - Viewed (0) -
src/test/java/jcifs/smb/DirFileEntryEnumIterator2Test.java
// Setup required for this test when(parent.getLocator()).thenReturn(locator); when(locator.getUNCPath()).thenReturn("\\\\server\\share\\dir\\"); when(tree.getConfig()).thenReturn(config); when(config.getMaximumBufferSize()).thenReturn(65535); when(config.getListSize()).thenReturn(65535); // Arrange: initial page with two entries, then one more entry, then no more filesRegistered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 13.7K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbTreeHandleInternalTest.java
void hasCapability_variousCaps_returnsTrue_andCapturesArgument(int cap) throws Exception { // Arrange: stub to return true regardless of input when(handle.hasCapability(anyInt())).thenReturn(true); // Act boolean result = handle.hasCapability(cap); // Assert: verify return and the captured argument equals input assertTrue(result);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 9.3K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/lease/DirectoryLeasingIntegrationTest.java
when(mockFile2.getName()).thenReturn("subfolder"); when(mockFile2.length()).thenReturn(0L); when(mockFile2.lastModified()).thenReturn(System.currentTimeMillis() - 1800000); when(mockFile2.isDirectory()).thenReturn(true); when(mockFile2.getAttributes()).thenReturn(0x10); // FILE_ATTRIBUTE_DIRECTORYRegistered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 23 01:47:47 UTC 2025 - 14.2K bytes - Viewed (0)