- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 27 for stubbing (0.72 sec)
-
src/test/java/jcifs/ntlmssp/Type1MessageTest.java
@Mock private NameServiceClient mockNameServiceClient; @Mock private NetbiosAddress mockLocalHost; @BeforeEach void setUp() { // Setup mock context with lenient stubbing to avoid UnnecessaryStubbingException lenient().when(mockContext.getConfig()).thenReturn(mockConfig); lenient().when(mockContext.getNameServiceClient()).thenReturn(mockNameServiceClient);
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/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);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 12.7K bytes - Viewed (0) -
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);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 19.3K bytes - Viewed (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);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 17.1K bytes - Viewed (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
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 15.2K bytes - Viewed (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");
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 21 04:51:33 UTC 2025 - 11.4K bytes - Viewed (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 test
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 14.4K bytes - Viewed (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);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 15.3K bytes - Viewed (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());
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 18.3K bytes - Viewed (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());
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 22.7K bytes - Viewed (0)