- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 29 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/smb1/dcerpc/ndr/NdrShortTest.java
@Test void encodeWithSpiedBufferCallsEncMethod() throws NdrException { NdrShort ns = new NdrShort(42); NdrBuffer spy = spy(new NdrBuffer(new byte[10], 0)); ns.encode(spy); // NdrShort passes its value (already masked to 0xFF) to enc_ndr_short verify(spy).enc_ndr_short(42); } /** * Verify that decode invokes NdrBuffer.dec_ndr_short. */ @Test
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 5.1K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbTreeConnectionTraceTest.java
void constructor_withDelegate_acquireAndReleaseForwarded() { // Arrange: delegate we can spy on for interaction verification CIFSContext ctx = mock(CIFSContext.class); SmbTreeConnectionTrace delegate = Mockito.spy(new SmbTreeConnectionTrace(ctx)); // Act: create wrapper using delegate, then acquire and release once
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 8.7K 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/StaticJAASConfigurationTest.java
void optionsMap_notMutated_verifyNoWrites() { // Arrange: create a regular map first, then spy on it Map<String, Object> originalMap = new HashMap<>(); originalMap.put("refreshKrb5Config", "true"); @SuppressWarnings("unchecked") Map<String, Object> spyOpts = spy(originalMap); // Reset the spy to clear any prior invocations from setup reset(spyOpts);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 7K bytes - Viewed (0)