- Sort Score
- Result 10 results
- Languages All
Results 131 - 140 of 270 for thenReturn (1.96 sec)
-
src/test/java/jcifs/context/CIFSContextCredentialWrapperTest.java
mockedNtlmAuthenticator.when(NtlmAuthenticator::getDefault).thenReturn(mockNtlmAuthenticator); mockedNtlmAuthenticator.when(() -> NtlmAuthenticator.requestNtlmPasswordAuthentication(eq(mockNtlmAuthenticator), eq("locationHint"), eq((SmbAuthException) null))).thenReturn(mockNtlmPasswordAuthenticator); // Perform the renewal
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.4K bytes - Viewed (0) -
src/test/java/jcifs/internal/fscc/BasicFileInformationTest.java
// Given when(mockBasicFileInfo.getAttributes()).thenReturn(TEST_ATTRIBUTES); when(mockBasicFileInfo.getCreateTime()).thenReturn(TEST_CREATE_TIME); when(mockBasicFileInfo.getLastWriteTime()).thenReturn(TEST_LAST_WRITE_TIME); when(mockBasicFileInfo.getLastAccessTime()).thenReturn(TEST_LAST_ACCESS_TIME); when(mockBasicFileInfo.getSize()).thenReturn(1024L);Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 13K bytes - Viewed (0) -
src/test/java/jcifs/netbios/NbtAddressTest.java
when(mockNetbiosAddress20.getNameType()).thenReturn(0x20); when(mockNetbiosAddress20.getHostName()).thenReturn("ACTUAL_SERVER_NAME"); NetbiosAddress[] nodeStatusResponse = { mock(NetbiosAddress.class), mockNetbiosAddress20 }; when(mockNameServiceClient.getNodeStatus(nbtAddress)).thenReturn(nodeStatusResponse);
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 20.4K bytes - Viewed (0) -
src/test/java/jcifs/util/transport/RequestTest.java
when(mockRequest.isCancel()).thenReturn(true); assertTrue(mockRequest.isCancel(), "isCancel should return true when mocked to do so."); verify(mockRequest, times(1)).isCancel(); } @Test void testIsCancelFalse() { // Test case for isCancel method when it returns false when(mockRequest.isCancel()).thenReturn(false);
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 3.6K bytes - Viewed (0) -
src/test/java/jcifs/internal/RequestTest.java
when(request.isResponseAsync()).thenReturn(true); when(request.getNext()).thenReturn(nextRequest); when(request.split()).thenReturn(nextRequest); when(request.allowChain(nextRequest)).thenReturn(true); when(request.createCancel()).thenReturn(nextRequest); when(request.size()).thenReturn(1024); when(request.getOverrideTimeout()).thenReturn(5000); // When & Then
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 14.5K bytes - Viewed (0) -
impl/maven-cli/src/test/java/org/apache/maven/cling/invoker/mvnup/goals/CompatibilityFixStrategyTest.java
void shouldBeApplicableWhenModelOptionTrue() { UpgradeOptions options = mock(UpgradeOptions.class); when(options.model()).thenReturn(Optional.of(true)); when(options.all()).thenReturn(Optional.empty()); UpgradeContext context = createMockContext(options);
Registered: Sun Dec 28 03:35:09 UTC 2025 - Last Modified: Tue Nov 18 18:03:26 UTC 2025 - 12.6K bytes - Viewed (0) -
src/test/java/jcifs/smb1/smb1/NtlmContextTest.java
// Test the second step (processing Type 2 and creating Type 3 message) when(mockAuth.getDomain()).thenReturn(domain); when(mockAuth.getUsername()).thenReturn(username); when(mockAuth.getPassword()).thenReturn(password); NtlmContext context = new NtlmContext(mockAuth, true); // State 1: Generate Type 1 message
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 8.9K bytes - Viewed (0) -
src/test/java/jcifs/smb/CriticalPerformanceTest.java
Mockito.when(mockContext.getConfig()).thenReturn(mockConfig); Mockito.when(mockContext.getCredentials()).thenReturn(mockCredentials); // Mock CredentialsInternal for session tests jcifs.smb.CredentialsInternal mockCredentialsInternal = Mockito.mock(jcifs.smb.CredentialsInternal.class); Mockito.when(mockCredentials.unwrap(jcifs.smb.CredentialsInternal.class)).thenReturn(mockCredentialsInternal);Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 15.3K bytes - Viewed (0) -
src/test/java/jcifs/smb1/smb1/Trans2QueryPathInformationResponseTest.java
Info mockInfo = mock(Info.class); // Set up mock behavior when(mockInfo.getAttributes()).thenReturn(0x20); when(mockInfo.getSize()).thenReturn(1024L); when(mockInfo.getCreateTime()).thenReturn(1000000L); when(mockInfo.getLastWriteTime()).thenReturn(2000000L); // Use the mock response.info = mockInfo; // Verify interactions
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.5K bytes - Viewed (0) -
src/test/java/jcifs/SmbPipeHandleTest.java
smbPipeHandle = mock(SmbPipeHandle.class); // Define behavior for the mock handle when(smbPipeHandle.getPipe()).thenReturn(mockPipeResource); when(smbPipeHandle.getInput()).thenReturn(mockInputStream); when(smbPipeHandle.getOutput()).thenReturn(mockOutputStream); } /** * Tests that the getter for the underlying pipe resource returns the correct instance. */ @Test
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 7K bytes - Viewed (0)