- Sort Score
- Result 10 results
- Languages All
Results 101 - 110 of 239 for thenReturn (0.17 sec)
-
src/test/java/jcifs/dcerpc/DcerpcBindTest.java
int result = 0; when(mockBuffer.dec_ndr_short()).thenReturn(4096, 4096, 10, result, 0); when(mockBuffer.dec_ndr_long()).thenReturn(12345); when(mockBuffer.dec_ndr_small()).thenReturn(1); lenient().doNothing().when(mockBuffer).advance(anyInt()); lenient().when(mockBuffer.align(anyInt())).thenReturn(0); // When bind.decode_out(mockBuffer);Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 22.7K 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: 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/SmbTransportTest.java
@BeforeEach void setUp() { // Common setup for mocks if needed } @Test void testGetContext() { // Arrange when(smbTransport.getContext()).thenReturn(cifsContext); // Act CIFSContext result = smbTransport.getContext(); // Assert assertNotNull(result, "Context should not be null");Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 3K bytes - Viewed (0) -
src/test/java/jcifs/context/BaseContextTest.java
// Setup mock configuration with required methods when(mockConfig.getDefaultUsername()).thenReturn(null); when(mockConfig.getDefaultPassword()).thenReturn(null); when(mockConfig.getDefaultDomain()).thenReturn(null); when(mockConfig.getBufferCacheSize()).thenReturn(16); when(mockConfig.getMaximumBufferSize()).thenReturn(65536); context = new BaseContext(mockConfig); } @TestRegistered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 15.1K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb1/com/SmbComSessionSetupAndXTest.java
when(mockContext.getConfig()).thenReturn(mockConfig); when(mockNegotiate.getServerData()).thenReturn(new ServerDataStub()); } private void setupNegotiateStubs() { when(mockNegotiate.getNegotiatedCapabilities()).thenReturn(0x00123456); when(mockNegotiate.getNegotiatedSendBufferSize()).thenReturn(65535); when(mockNegotiate.getNegotiatedMpxCount()).thenReturn(65535);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 6.4K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/info/Smb2SetInfoRequestTest.java
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 13.9K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/info/Smb2QueryInfoResponseTest.java
// Set buffer length SMBUtil.writeInt4(8, buffer, bufferIndex + 4); // Mock getHeaderStart response = spy(response); when(response.getHeaderStart()).thenReturn(0); // Write FileInternalInfo data at the buffer offset // FileInternalInfo expects 8 bytes (IndexNumber as int8) SMBUtil.writeInt8(0x123456789ABCDEFL, buffer, 50);Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 24.5K bytes - Viewed (0) -
src/test/java/jcifs/SmbWatchHandleTest.java
when(fileNotifyInfo1.getAction()).thenReturn(FileNotifyInformation.FILE_ACTION_ADDED); when(fileNotifyInfo1.getFileName()).thenReturn("newfile.txt"); when(fileNotifyInfo2.getAction()).thenReturn(FileNotifyInformation.FILE_ACTION_MODIFIED); when(fileNotifyInfo2.getFileName()).thenReturn("existingfile.txt"); when(fileNotifyInfo3.getAction()).thenReturn(FileNotifyInformation.FILE_ACTION_REMOVED);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 13.2K bytes - Viewed (1) -
src/test/java/jcifs/dcerpc/msrpc/samrTest.java
when(mockNdrBuffer.dec_ndr_long()).thenReturn(1, 100); // idx, _name_bufferp when(mockNdrBuffer.dec_ndr_short()).thenReturn(4, 6); // length, maximum_length when(mockDeferredBuffer.dec_ndr_long()).thenReturn(3, 0, 2); // _name_buffers, 0, _name_bufferl when(mockDeferredBuffer.dec_ndr_short()).thenReturn((int) (short) 't', (int) (short) 'e'); // When: Decoding entry
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 33.7K bytes - Viewed (0) -
src/test/java/jcifs/internal/SMBSigningDigestTest.java
void testVerifyReturnsTrue() { // Arrange int offset = 0; int length = testData.length; int extraPad = 0; when(signingDigest.verify(testData, offset, length, extraPad, message)).thenReturn(true); // Act boolean result = signingDigest.verify(testData, offset, length, extraPad, message); // Assert assertTrue(result, "Verify should return true for valid signature");
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 10.9K bytes - Viewed (0)