- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 28 for spy (0.01 sec)
-
src/test/java/jcifs/netbios/NodeStatusRequestTest.java
byte[] dst = new byte[100]; int originalHexCode = 0x20; mockName.hexCode = originalHexCode; // Setup spy to verify writeQuestionSectionWireFormat is called NodeStatusRequest spyRequest = spy(nodeStatusRequest); doReturn(40).when(spyRequest).writeQuestionSectionWireFormat(any(byte[].class), anyInt()); // Act
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/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/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/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/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 behaviorRegistered: 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/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 handleRegistered: 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/SmbFileTest.java
import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; 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 - 20.8K 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)