- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 21 for spy (0.01 sec)
-
src/test/java/jcifs/smb/SmbTransportPoolImplTest.java
(java.util.concurrent.ConcurrentLinkedQueue<SmbTransportImpl>) nonPooledField.get(pool); // Create spies SmbTransportImpl pooledSpy = spy(pooled); SmbTransportImpl nonPooledSpy = spy(nonPooled); // Replace with spies (remove and add back for concurrent queues) connections.remove(pooled); connections.offer(pooledSpy);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 19.2K bytes - Viewed (0) -
src/test/java/jcifs/smb/JAASAuthenticatorTest.java
} @Test @DisplayName("handle: null password leaves PasswordCallback unset") void testHandleWithNullPasswordDoesNotSet() throws Exception { // Spy to override getPasswordAsCharArray() to return null JAASAuthenticator spyAuth = spy(new JAASAuthenticator("DOM", "user", null)); when(spyAuth.getPasswordAsCharArray()).thenReturn(null); PasswordCallback pc = new PasswordCallback("pass:", false);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 30 05:58:03 UTC 2025 - 9.9K bytes - Viewed (0) -
src/test/java/jcifs/internal/fscc/FileInformationTest.java
int size = spy.size(); byte[] buffer = new byte[8]; int encoded = spy.encode(buffer, 0); int decoded = spy.decode(buffer, 0, 8); String str = spy.toString(); // Verify all methods were called except toString (Mockito limitation) verify(spy).getFileInformationLevel(); verify(spy).size(); verify(spy).encode(buffer, 0);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.5K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbRandomAccessFileTest.java
import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.doThrow; 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.util.concurrent.atomic.AtomicInteger; import org.junit.jupiter.api.DisplayName;
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 18.1K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/info/Smb2QueryInfoResponseTest.java
import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.when; import java.lang.reflect.Method; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test;
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 24.5K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/info/Smb2QueryDirectoryResponseTest.java
import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.when; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.nio.charset.StandardCharsets; 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 - 23.5K bytes - Viewed (0) -
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/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/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)