Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 27 for ArgumentCaptor (1.27 sec)

  1. src/test/java/jcifs/smb/SmbFileInputStreamTest.java

                // Assert
                assertEquals(3, n, "Should report bytes read from SMB2 response");
    
                // Verify the request offset equals the skip value (2)
                ArgumentCaptor<Smb2ReadRequest> cap = ArgumentCaptor.forClass(Smb2ReadRequest.class);
                verify(mockTree).send(cap.capture(), any(RequestParam.class));
                Smb2ReadRequest req = cap.getValue();
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 12.8K bytes
    - Viewed (0)
  2. src/test/java/jcifs/smb/DirFileEntryEnumIterator1Test.java

            verify(tree, times(2)).send(isA(Trans2FindNext2.class), any(Trans2FindFirst2Response.class));
    
            // Close should have sent FindClose2 exactly once
            ArgumentCaptor<SmbComFindClose2> captor = ArgumentCaptor.forClass(SmbComFindClose2.class);
            verify(tree, times(1)).send(captor.capture(), any());
            assertNotNull(captor.getValue());
    
            // Tree handle is released after close
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.7K bytes
    - Viewed (0)
  3. src/test/java/jcifs/smb/SmbCopyUtilTest.java

            SmbFileHandleImpl result = SmbCopyUtil.openCopyTargetFile(dest, attrs, alsoRead);
    
            // Assert
            assertSame(handle, result, "Should return handle from dest.openUnshared");
    
            ArgumentCaptor<Integer> accessCaptor = ArgumentCaptor.forClass(Integer.class);
            verify(dest, times(1)).openUnshared(anyInt(), accessCaptor.capture(), anyInt(), eq(attrs), anyInt());
            int access = accessCaptor.getValue();
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.1K bytes
    - Viewed (0)
  4. src/test/java/jcifs/smb/SmbFileHandleImplTest.java

            h.close(lastWrite);
    
            // Verify SMB1 close path uses request + response overload
            ArgumentCaptor<CommonServerMessageBlockRequest> reqCap = ArgumentCaptor.forClass(CommonServerMessageBlockRequest.class);
            ArgumentCaptor<SmbComBlankResponse> respCap = ArgumentCaptor.forClass(SmbComBlankResponse.class);
            verify(tree, times(1)).send(reqCap.capture(), respCap.capture(), eq(RequestParam.NO_RETRY));
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.3K bytes
    - Viewed (0)
  5. src/test/java/jcifs/smb/NetServerFileEntryAdapterIteratorTest.java

            // Act
            assertTrue(itr.hasNext());
            SmbResource r = itr.next();
    
            // Assert: filter was invoked twice and we got the accepted one
            ArgumentCaptor<SmbResource> captor = ArgumentCaptor.forClass(SmbResource.class);
            verify(filter, times(2)).accept(captor.capture());
            assertNotNull(r);
            assertTrue(r.getName().startsWith("TAKEME"));
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7.9K bytes
    - Viewed (0)
  6. src/test/java/jcifs/smb/SmbTreeHandleInternalTest.java

            // Act
            boolean result = handle.hasCapability(cap);
    
            // Assert: verify return and the captured argument equals input
            assertTrue(result);
            ArgumentCaptor<Integer> captor = ArgumentCaptor.forClass(Integer.class);
            verify(handle, times(1)).hasCapability(captor.capture());
            assertEquals(cap, captor.getValue());
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.3K bytes
    - Viewed (0)
  7. src/test/java/jcifs/smb/SIDTest.java

                // Act
                sid.resolve("server.example", mockCtx);
    
                // Assert: resolver.resolveSids called with this SID
                ArgumentCaptor<jcifs.SID[]> captor = ArgumentCaptor.forClass(jcifs.SID[].class);
                verify(mockResolver, times(1)).resolveSids(same(mockCtx), eq("server.example"), captor.capture());
                assertSame(sid, captor.getValue()[0]);
            }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.8K bytes
    - Viewed (0)
  8. src/test/java/jcifs/smb/SpnegoContextTest.java

            assertNotNull(out);
            assertTrue(out.length > 0);
    
            // Verify interactions: flags and an empty optimistic token are used
            verify(this.mechContext, times(1)).getFlags();
            ArgumentCaptor<byte[]> cap = ArgumentCaptor.forClass(byte[].class);
            verify(this.mechContext, times(1)).initSecContext(cap.capture(), eq(0), eq(0));
            assertEquals(0, cap.getValue().length, "Optimistic token must be zero-length");
        }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.3K bytes
    - Viewed (0)
  9. src/test/java/jcifs/http/NtlmServletTest.java

            lenient().when(request.isSecure()).thenReturn(true);
            when(request.getSession()).thenReturn(session);
    
            ntlmServlet.service(request, response);
    
            ArgumentCaptor<NtlmPasswordAuthentication> authCaptor = ArgumentCaptor.forClass(NtlmPasswordAuthentication.class);
            verify(session).setAttribute(eq("NtlmHttpAuth"), authCaptor.capture());
    
            NtlmPasswordAuthentication capturedAuth = authCaptor.getValue();
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 21 04:51:33 UTC 2025
    - 11.5K bytes
    - Viewed (0)
  10. src/test/java/jcifs/smb/SmbPipeHandleImplTest.java

            byte[] out = new byte[10];
            int read = target.sendrecv(new byte[] { 9, 8, 7 }, 0, 3, out, 1024);
            assertEquals(42, read);
    
            // Verify we issued an SMB2 IOCTL
            ArgumentCaptor<Smb2IoctlRequest> captor = ArgumentCaptor.forClass(Smb2IoctlRequest.class);
            verify(tree).send(captor.capture(), any());
            assertNotNull(captor.getValue());
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.7K bytes
    - Viewed (0)
Back to top