- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 239 for thenReturn (0.16 sec)
-
src/test/java/jcifs/smb/SmbPipeOutputStreamTest.java
// 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 @ValueSource(booleans = { true, false })Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 5.4K bytes - Viewed (0) -
src/test/java/jcifs/pac/PacLogonInfoTest.java
when(logonInfo.getHomeDrive()).thenReturn("H:"); when(logonInfo.getLogonScript()).thenReturn("logon.bat"); when(logonInfo.getUserAccountControl()).thenReturn(0x200); when(logonInfo.getUserFlags()).thenReturn(0); when(logonInfo.getUserSid()).thenReturn(userSid); when(logonInfo.getGroupSid()).thenReturn(new SID("S-1-5-21-1-2-3-513"));
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 12.3K bytes - Viewed (0) -
src/test/java/jcifs/internal/CommonServerMessageBlockRequestTest.java
when(request.getNext()).thenReturn(nextRequest); when(nextRequest.getNext()).thenReturn(thirdRequest); when(thirdRequest.getNext()).thenReturn(null); when(request.allowChain(nextRequest)).thenReturn(true); when(nextRequest.allowChain(thirdRequest)).thenReturn(true); // When
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 12.1K bytes - Viewed (0) -
src/test/java/jcifs/AddressTest.java
} @Test @DisplayName("unwrap method should return correct type when supported") void testUnwrapMethodContract() throws Exception { // Given when(mockAddress.unwrap(Address.class)).thenReturn(mockAddress); // When & Then Address unwrapped = mockAddress.unwrap(Address.class); assertSame(mockAddress, unwrapped, "Should return same instance for supported type"); } @TestRegistered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 4.9K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbTreeImplTest.java
when(session.getConfig()).thenReturn(config); when(session.getContext()).thenReturn(context); when(session.getTransport()).thenReturn(transport); when(session.acquire()).thenReturn(session); when(config.isTraceResourceUsage()).thenReturn(false); when(context.getConfig()).thenReturn(config); when(session.isConnected()).thenReturn(true); }
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 7.8K bytes - Viewed (0) -
src/test/java/jcifs/internal/SmbNegotiationResponseTest.java
int cap1 = 0x00000001; int cap2 = 0x00000002; int cap3 = 0x00000004; when(negotiationResponse.haveCapabilitiy(cap1)).thenReturn(true); when(negotiationResponse.haveCapabilitiy(cap2)).thenReturn(false); when(negotiationResponse.haveCapabilitiy(cap3)).thenReturn(true); // Act & Assert assertTrue(negotiationResponse.haveCapabilitiy(cap1));Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 20.6K bytes - Viewed (0) -
src/test/java/jcifs/dcerpc/msrpc/MsrpcLookupSidsTest.java
jcifs.SID mockSid2 = mock(jcifs.SID.class); jcifs.SID mockSid3 = mock(jcifs.SID.class); when(mockSid1.unwrap(sid_t.class)).thenReturn(mockSidT); when(mockSid2.unwrap(sid_t.class)).thenReturn(mockSidT); when(mockSid3.unwrap(sid_t.class)).thenReturn(mockSidT); testSids = new jcifs.SID[] { mockSid1, mockSid2, mockSid3 }; // Act
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 12.6K bytes - Viewed (0) -
src/test/java/jcifs/http/NtlmHttpFilterTest.java
filter = new NtlmHttpFilter(); // Setup lenient stubs for common mock interactions lenient().when(request.getSession()).thenReturn(httpSession); lenient().when(request.getSession(anyBoolean())).thenReturn(httpSession); lenient().when(response.getOutputStream()).thenReturn(servletOutputStream); } @Test void testInit_success() throws ServletException {
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 21 04:51:33 UTC 2025 - 12.8K bytes - Viewed (0) -
src/test/java/jcifs/smb1/smb1/NtlmChallengeTest.java
void testToStringWithValidData() { byte[] challenge = new byte[] { (byte) 0x01, (byte) 0x02, (byte) 0x03, (byte) 0xFF }; UniAddress dc = mock(UniAddress.class); when(dc.toString()).thenReturn("SERVER123"); NtlmChallenge nc = new NtlmChallenge(challenge, dc); String result = nc.toString(); // The format is: NtlmChallenge[challenge=0x<hex>,dc=<dc_string>]
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 6K bytes - Viewed (0) -
src/test/java/jcifs/dcerpc/msrpc/lsarpcTest.java
lenient().when(mockNdrBuffer.derive(anyInt())).thenReturn(mockDeferredNdrBuffer); lenient().when(mockDeferredNdrBuffer.derive(anyInt())).thenReturn(mockDeferredNdrBuffer); // Set up lenient stubs for common operations to avoid unnecessary stubbing exceptions lenient().when(mockNdrBuffer.getIndex()).thenReturn(0); lenient().when(mockDeferredNdrBuffer.getIndex()).thenReturn(0); // Mock the index field access
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 60.8K bytes - Viewed (0)