- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 36 for spy (0.01 sec)
-
src/test/java/jcifs/netbios/NameQueryRequestTest.java
import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.Mock;
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 3.8K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbPipeHandleInternalTest.java
// Mock the streams SmbPipeInputStream mockIn = mock(SmbPipeInputStream.class); SmbPipeOutputStream mockOut = mock(SmbPipeOutputStream.class); // Create spy and override getInput/getOutput SmbPipeHandleImpl spyHandle = spy(handle); doReturn(mockIn).when(spyHandle).getInput(); doReturn(mockOut).when(spyHandle).getOutput(); // Setup mock behavior
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 16.7K bytes - Viewed (0) -
src/test/java/jcifs/smb/SecurityBlobTest.java
assertEquals(0, blob.length(), "length() should return 0 when internal array is null"); } @Spy SecurityBlob spyBlob = new SecurityBlob(); // Illustrates Mockito interaction verification by spying on set() and validating behavior @Test @DisplayName("Mockito spy: verify set() interaction and resulting behavior") void spy_verifySetInteraction() { // Arrange
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 9.4K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbPipeHandleImplTest.java
import static org.mockito.Mockito.atLeastOnce; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream;
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.7K bytes - Viewed (0) -
src/test/java/jcifs/dcerpc/DcerpcHandleTest.java
@Test @DisplayName("Should execute bind operation successfully") void testBindSuccess() throws DcerpcException, IOException { // Given: Spy to intercept sendrecv calls TestDcerpcHandle spyHandle = spy(new TestDcerpcHandle(mockContext, mockBinding)); doNothing().when(spyHandle).sendrecv(any(DcerpcMessage.class)); // When: Binding the handle
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/smb/SmbTreeConnectionTest.java
} @Test @DisplayName("send retries on transport errors and restores request/response state") void send_retries_on_transportError() throws Exception { // Create a spy to track method calls SmbTreeConnection c = spy(newConn()); // Prepare a minimal locator SmbResourceLocatorImpl loc = new SmbResourceLocatorImpl(ctx, smbUrl("smb://srv/share/path"));
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 13K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbSessionImplTest.java
import static org.mockito.Mockito.clearInvocations; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import java.lang.reflect.Field; import org.junit.jupiter.api.BeforeEach;
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 12.5K bytes - Viewed (0) -
src/test/java/jcifs/http/NtlmHttpURLConnectionTest.java
* @throws IOException */ @Test void testGettersTriggerHandshake() throws IOException { // Arrange // Spy on the connection to verify handshake() is called NtlmHttpURLConnection spiedConnection = spy(ntlmConnection); doNothing().when(spiedConnection).connect(); // Mock the handshake process to do nothing complex mockResponse(HTTP_OK, "OK", null, null);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 12.6K bytes - Viewed (0) -
src/test/java/jcifs/http/NetworkExplorerTest.java
when(smbFile.length()).thenReturn((long) contentBytes.length); when(smbFile.getInputStream()).thenReturn(new ByteArrayInputStream(contentBytes)); // Use spy to avoid actual SMB operations NetworkExplorer spyExplorer = spy(networkExplorer); doNothing().when(spyExplorer).doFile(any(), any(), any()); // Call the method spyExplorer.doFile(request, response, smbFile);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 21 04:51:33 UTC 2025 - 21.2K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb1/net/NetShareEnumResponseTest.java
} @Test @DisplayName("Test setUseUnicode is called with false") void testSetUseUnicode() throws Exception { // Create a spy to verify method call NetShareEnumResponse spyResponse = spy(new NetShareEnumResponse(mockConfig)); setNumEntries(spyResponse, 0); byte[] buffer = new byte[100]; spyResponse.readDataWireFormat(buffer, 0, buffer.length);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 20.2K bytes - Viewed (0)