- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for spy (0.01 sec)
-
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. */ @TestRegistered: 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/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) -
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/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/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/context/AbstractCIFSContextTest.java
context.run(); assertTrue(context.isCloseCalled()); // Verify close() was called } @Test void testRun_closeThrowsException() throws CIFSException { // Create a spy on the context to make close() throw an exception TestAbstractCIFSContext spyContext = new TestAbstractCIFSContext(mockCredentials) { @Override public boolean close() throws CIFSException {
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 7K bytes - Viewed (0)