- Sort Score
- Num 10 results
- Language All
Results 11 - 20 of 28 for stubbing (0.17 seconds)
-
src/test/java/jcifs/smb/DirFileEntryEnumIterator1Test.java
} } } @BeforeEach void setup() throws MalformedURLException, CIFSException { // Common happy-path defaults // Use lenient() to avoid strict stubbing issues with Mockito lenient().when(tree.acquire()).thenReturn(tree); lenient().when(tree.getConfig()).thenReturn(config); lenient().when(config.getListCount()).thenReturn(10);Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 12.7K bytes - Click Count (0) -
src/test/java/jcifs/netbios/NameQueryResponseTest.java
@Mock private Configuration mockConfig; private NameQueryResponse nameQueryResponse; @BeforeEach void setUp() { // Mock the OEM encoding configuration with lenient stubbing // since not all tests need this stub lenient().when(mockConfig.getOemEncoding()).thenReturn("UTF-8"); // Initialize NameQueryResponse before each testCreated: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 14.4K bytes - Click Count (0) -
src/test/java/jcifs/http/NtlmSspTest.java
return Base64.getEncoder().encodeToString(finalMessage); } @BeforeEach public void setUp() throws UnknownHostException { ntlmSsp = new NtlmSsp(); // Use lenient stubbing to avoid UnnecessaryStubbing errors for tests that don't need all mocks lenient().when(mockCifsContext.getConfig()).thenReturn(mockConfig); lenient().when(mockConfig.getDefaultDomain()).thenReturn("DOMAIN");Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 21 04:51:33 GMT 2025 - 11.4K bytes - Click Count (1) -
src/test/java/jcifs/netbios/NodeStatusResponseTest.java
@Mock private NbtAddress mockQueryAddress; private NodeStatusResponse response; @BeforeEach void setUp() throws Exception { // Setup mock configuration with lenient stubbing lenient().when(mockConfig.getOemEncoding()).thenReturn("UTF-8"); // Setup mock query address mockQueryAddress = mock(NbtAddress.class);Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 07:14:38 GMT 2025 - 19.3K bytes - Click Count (0) -
src/test/java/jcifs/smb/SSPContextTest.java
when(mockCtx.supportsIntegrity()).thenReturn(true); when(mockCtx.calculateMIC(any(byte[].class))).thenReturn(new byte[] { 42 }); // verifyMIC returns void; no stubbing needed when(mockCtx.isMICAvailable()).thenReturn(true); // Act useContext(mockCtx); // Assert: verify key interactions and ordering where meaningful
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 15.2K bytes - Click Count (0) -
src/test/java/jcifs/dcerpc/DcerpcHandleTest.java
return super.encodeMessage(msg, out); } } private TestDcerpcHandle handle; @BeforeEach void setUp() { // Setup buffer cache mocks with lenient stubbing lenient().when(mockContext.getBufferCache()).thenReturn(mockBufferCache); lenient().when(mockBufferCache.getBuffer()).thenReturn(new byte[8192]); handle = new TestDcerpcHandle(mockContext, mockBinding);
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 15.3K bytes - Click Count (0) -
src/test/java/jcifs/internal/smb2/notify/Smb2ChangeNotifyRequestTest.java
void setUp() { mockConfig = mock(Configuration.class); mockContext = mock(CIFSContext.class); testFileId = new byte[16]; Arrays.fill(testFileId, (byte) 0xAB); // Use lenient stubbing for default configuration values lenient().when(mockConfig.getNotifyBufferSize()).thenReturn(8192); lenient().when(mockContext.getConfig()).thenReturn(mockConfig);
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 17.1K bytes - Click Count (0) -
src/test/java/jcifs/dcerpc/DcerpcMessageTest.java
message.ptype = DcerpcConstants.RPC_PT_REQUEST; message.flags = DcerpcConstants.RPC_C_PF_BROADCAST; message.length = 100; message.call_id = 5; // Use lenient stubbing to avoid UnnecessaryStubbingException lenient().doNothing().when(mockBuffer).enc_ndr_small(anyInt()); lenient().doNothing().when(mockBuffer).enc_ndr_long(anyInt());Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 07:14:38 GMT 2025 - 18.3K bytes - Click Count (0) -
src/test/java/jcifs/dcerpc/DcerpcBindTest.java
int maxXmit = 1024; int maxRecv = 2048; when(mockHandle.getMaxXmit()).thenReturn(maxXmit); when(mockHandle.getMaxRecv()).thenReturn(maxRecv); // Use lenient stubbing to handle multiple calls lenient().doNothing().when(mockBuffer).enc_ndr_short(anyInt()); lenient().doNothing().when(mockBuffer).enc_ndr_long(anyInt());Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 22.7K bytes - Click Count (0) -
src/test/java/jcifs/SmbResourceTest.java
@Mock private ResourceFilter mockResourceFilter; @Mock private SID mockSID; @Mock private ACE mockACE; /** * Helper method to create a basic SmbResource mock without pre-stubbing */ private SmbResource createMockResource() { return mock(SmbResource.class); } @BeforeEach void setUp() { // Reset mocks to ensure clean state for each testCreated: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 35K bytes - Click Count (0)