Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 33 for getArguments (0.25 sec)

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

            when(transport.disconnect(anyBoolean(), anyBoolean())).thenAnswer(inv -> {
                boolean h = inv.getArgument(0);
                boolean u = inv.getArgument(1);
                // Arbitrary behavior mapping for test purposes
                return (h && !u) || (!h && u);
            });
    
            boolean result = transport.disconnect(hard, inuse);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 12.1K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/smb1/SMB1SigningDigestTest.java

                // For LM compatibility 3-5, only 16 bytes are used
                doAnswer(invocation -> {
                    byte[] dest = invocation.getArgument(2);
                    int offset = invocation.getArgument(3);
                    System.arraycopy(new byte[16], 0, dest, offset, 16);
                    return null;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.1K bytes
    - Viewed (0)
  3. src/test/java/jcifs/netbios/LmhostsTest.java

                        when(mock.read(any(byte[].class), any(int.class), any(int.class))).thenAnswer(inv -> {
                            byte[] buffer = inv.getArgument(0);
                            int offset = inv.getArgument(1);
                            int length = inv.getArgument(2);
                            int remaining = includeContent.length - index[0];
                            if (remaining <= 0) {
                                return -1;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.2K bytes
    - Viewed (0)
  4. src/test/java/jcifs/dcerpc/msrpc/SamrPolicyHandleTest.java

            ArgumentCaptor<MsrpcSamrCloseHandle> closeCaptor = ArgumentCaptor.forClass(MsrpcSamrCloseHandle.class);
            doAnswer(invocation -> {
                MsrpcSamrCloseHandle rpc = invocation.getArgument(0);
                rpc.retval = 0; // Simulate success
                return null;
            }).when(mockHandle).sendrecv(closeCaptor.capture());
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7.4K bytes
    - Viewed (0)
  5. src/test/java/jcifs/util/HMACT64Test.java

                when(mockMd5.digest(buffer, 0, expectedOutput.length)).thenAnswer(invocation -> {
                    byte[] b = invocation.getArgument(0);
                    int off = invocation.getArgument(1);
                    int l = invocation.getArgument(2);
                    System.arraycopy(expectedOutput, 0, b, off, l);
                    return l;
                });
    
                HMACT64 hmac = new HMACT64(TEST_KEY);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14.6K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/smb2/rdma/RdmaBufferManagerTest.java

            when(mockProvider.registerMemory(any(ByteBuffer.class), any())).thenAnswer(invocation -> {
                ByteBuffer buffer = invocation.getArgument(0);
                EnumSet<RdmaAccess> access = invocation.getArgument(1);
                return new TcpMemoryRegion(buffer, access);
            });
    
            bufferManager = new RdmaBufferManager(mockProvider);
        }
    
        @AfterEach
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 23 05:11:12 UTC 2025
    - 7.1K bytes
    - Viewed (0)
  7. src/test/java/jcifs/smb/SmbPipeHandleInternalTest.java

            // Mock both sends and return response
            when(tree.send(any(TransWaitNamedPipe.class), any(TransWaitNamedPipeResponse.class))).thenAnswer(inv -> inv.getArgument(1));
            when(tree.send(any(TransCallNamedPipe.class), any(TransCallNamedPipeResponse.class))).thenAnswer(inv -> inv.getArgument(1));
    
            int n = handle.sendrecv(new byte[3], 0, 3, new byte[8], 64);
            assertEquals(0, n, "Default response length is 0 unless protocol fills it");
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 16.7K bytes
    - Viewed (0)
  8. src/test/java/jcifs/smb1/smb1/SmbTreeTest.java

            doNothing().when(transport).connect();
    
            // Setup response for tree connect
            doAnswer(invocation -> {
                ServerMessageBlock request = invocation.getArgument(0);
                ServerMessageBlock response = invocation.getArgument(1);
                if (request instanceof SmbComTreeConnectAndX && response instanceof SmbComTreeConnectAndXResponse) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 10.2K bytes
    - Viewed (0)
  9. src/test/java/jcifs/smb/SmbPipeInputStreamTest.java

            when(config.getPid()).thenReturn(1234);
    
            // Stub send to populate the provided response instance via reflection
            Mockito.doAnswer(inv -> {
                Object resp = inv.getArgument(1);
                // Set private fields: status on SmbComTransactionResponse and available on TransPeekNamedPipeResponse
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.9K bytes
    - Viewed (0)
  10. src/test/java/jcifs/http/NtlmServletTest.java

            lenient().when(servletConfig.getInitParameterNames()).thenReturn(Collections.enumeration(initParams.keySet()));
            lenient().when(servletConfig.getInitParameter(anyString())).thenAnswer(invocation -> initParams.get(invocation.getArgument(0)));
    
            // Mock HTTP method for request - this is required for HttpServlet.service()
            lenient().when(request.getMethod()).thenReturn("GET");
    
            // Setup CIFSContext configuration mock
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 21 04:51:33 UTC 2025
    - 11.5K bytes
    - Viewed (0)
Back to top