- Sort Score
- Num 10 results
- Language All
Results 131 - 140 of 210 for thenReturn (0.06 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
src/test/java/jcifs/netbios/NameServicePacketTest.java
packet.questionType = NameServicePacket.NB; packet.questionClass = NameServicePacket.IN; when(mockQuestionName.writeWireFormat(any(byte[].class), anyInt())).thenReturn(10); // Mock name length int written = packet.writeQuestionSectionWireFormat(dst, 0); assertEquals(14, written); // 10 (name) + 2 (type) + 2 (class) verify(mockQuestionName).writeWireFormat(dst, 0);Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 17.9K bytes - Click Count (0) -
src/test/java/jcifs/internal/smb1/trans2/Trans2FindFirst2Test.java
MockitoAnnotations.openMocks(this); when(mockConfig.getMaximumBufferSize()).thenReturn(65535); when(mockConfig.getTransactionBufferSize()).thenReturn(65535); when(mockConfig.isUseUnicode()).thenReturn(true); when(mockConfig.isForceUnicode()).thenReturn(false); when(mockConfig.getOemEncoding()).thenReturn("ASCII"); } @Test @DisplayName("Test constructor with standard path")
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 10.8K bytes - Click Count (0) -
src/test/java/jcifs/smb/Kerb5AuthenticatorTest.java
void createContext_forceFallback_triggersNtlmAndFailsOnNonNtlmToken() throws CIFSException { when(tc.getConfig()).thenReturn(config); when(config.isAllowNTLMFallback()).thenReturn(true); when(config.isUseRawNTLM()).thenReturn(false); // Enable NTLM fallback by providing NTLM creds in constructor
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 10.9K bytes - Click Count (0) -
src/test/java/jcifs/dcerpc/msrpc/LsarSidArrayXTest.java
// Mock the unwrap method to return a sid_t instance sid_t sidT1 = new sid_t(); sid_t sidT2 = new sid_t(); when(mockSid1.unwrap(sid_t.class)).thenReturn(sidT1); when(mockSid2.unwrap(sid_t.class)).thenReturn(sidT2); jcifs.SID[] sids = { mockSid1, mockSid2 }; LsarSidArrayX lsarSidArrayX = new LsarSidArrayX(sids); // Verify num_sidsCreated: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 3.1K bytes - Click Count (0) -
src/test/java/jcifs/smb/ShareEnumIteratorTest.java
} // Helper to create a minimal FileEntry mock private FileEntry entry(String name, int type) { FileEntry e = mock(FileEntry.class); when(e.getName()).thenReturn(name); when(e.getType()).thenReturn(type); return e; } @Test @DisplayName("Happy path without filter: iterates all entries in order") void happyPath_noFilter_returnsAll() throws Exception {Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 8.1K bytes - Click Count (0) -
src/test/java/jcifs/tests/persistent/HandleReconnectorTest.java
} @Test public void testReconnectHandleSuccess() throws Exception { when(mockManager.getHandleForReconnect("/test/file.txt")).thenReturn(testHandle); // Create a test reconnector that succeeds TestHandleReconnector testReconnector = new TestHandleReconnector(mockManager, true);Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 21 04:51:33 GMT 2025 - 5.6K bytes - Click Count (0) -
src/test/java/jcifs/internal/smb2/multichannel/MultiChannelIntegrationTest.java
multiConfig = new PropertyConfiguration(props); // Mock context and session for ChannelManager when(mockContext.getConfig()).thenReturn(multiConfig); when(mockSession.getSessionKey()).thenReturn(new byte[16]); channelManager = new ChannelManager(mockContext, mockSession); } @Test void testMultiChannelInitialization() throws Exception {Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 21 11:13:46 GMT 2025 - 8.2K bytes - Click Count (0) -
src/test/java/jcifs/internal/AllocInfoTest.java
@DisplayName("Should handle multiple invocations") void shouldHandleMultipleInvocations() { // Given when(mockAllocInfo.getCapacity()).thenReturn(1000L, 2000L, 3000L); when(mockAllocInfo.getFree()).thenReturn(500L, 1000L, 1500L); // When & Then assertEquals(1000L, mockAllocInfo.getCapacity()); assertEquals(500L, mockAllocInfo.getFree());Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 18.8K bytes - Click Count (0) -
src/test/java/jcifs/internal/smb1/com/SmbComQueryInformationTest.java
private SmbComQueryInformation cmd; @BeforeEach void setUp() { // Configure the mock to return the OEM encoding which is required for writeString when(mockConfig.getOemEncoding()).thenReturn("windows-1252"); cmd = new SmbComQueryInformation(mockConfig, "testfile.txt"); } @Test @DisplayName("writeBytesWireFormat writes the command byte followed by the null terminated string")Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 4.9K bytes - Click Count (0) -
src/test/java/jcifs/FileNotifyInformationTest.java
when(mockFileNotifyInfo.getFileName()).thenReturn(fileName); assertEquals(fileName, mockFileNotifyInfo.getFileName()); } @Test @DisplayName("Test getFileName with null value") void testGetFileNameWithNull() { when(mockFileNotifyInfo.getFileName()).thenReturn(null); assertNull(mockFileNotifyInfo.getFileName()); }
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 18.1K bytes - Click Count (0)