Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for getArgument (0.45 sec)

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

            SmbRandomAccessFile raf = spy(newInstance("r", false, false, false));
            // For each 1-byte read, fill provided buffer with 0xFF/0x01
            doAnswer(inv -> {
                byte[] b = inv.getArgument(0);
                int off = inv.getArgument(1);
                b[off] = (byte) 0xFF;
                return 1;
            }).when(raf).read(any(byte[].class), anyInt(), eq(1));
            assertTrue(raf.readBoolean());
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.1K bytes
    - Viewed (0)
  2. src/test/java/jcifs/http/NtlmHttpFilterTest.java

            when(filterConfig.getInitParameterNames()).thenReturn(Collections.enumeration(initParams.keySet()));
            when(filterConfig.getInitParameter(anyString())).thenAnswer(invocation -> initParams.get(invocation.getArgument(0)));
    
            assertDoesNotThrow(() -> filter.init(filterConfig));
        }
    
        @Test
        void testInit_withMinimalConfig() throws ServletException {
            // Test initialization with minimal configuration
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 21 04:51:33 UTC 2025
    - 12.8K bytes
    - Viewed (0)
  3. src/test/java/jcifs/smb/NetServerEnumIteratorTest.java

            when(treeHandle.send(any(), any(), (RequestParam[]) any())).thenAnswer(invocation -> {
                // The response is the second argument
                Object response = invocation.getArgument(1);
                // Return it unchanged (which will have default values = empty results)
                return response;
            });
    
            // When: Create iterator
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.8K bytes
    - Viewed (0)
  4. src/test/java/jcifs/smb/SIDCacheImplTest.java

            // Stub sendrecv to emulate successful RPC response
            doAnswer(inv -> {
                // Capture the outgoing RPC and populate result fields as the server would
                Object msg = inv.getArgument(0);
                assertTrue(msg instanceof jcifs.dcerpc.msrpc.MsrpcLookupSids);
                jcifs.dcerpc.msrpc.MsrpcLookupSids rpc = (jcifs.dcerpc.msrpc.MsrpcLookupSids) msg;
                // Return success
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14K bytes
    - Viewed (0)
  5. src/test/java/jcifs/smb/DirFileEntryEnumIterator1Test.java

            when(tree.send(any(Trans2FindFirst2.class), any(Trans2FindFirst2Response.class))).thenAnswer((InvocationOnMock inv) -> {
                Trans2FindFirst2Response resp = inv.getArgument(1);
                // First response content
                FE[] res = java.util.Arrays.stream(batches.get(0)).map(FE::new).toArray(FE[]::new);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.7K bytes
    - Viewed (0)
  6. src/test/java/jcifs/smb/DirFileEntryEnumIterator2Test.java

            final int[] queryCount = { 0 };
    
            // Mock send(create) to wire a query response with fe1, fe2
            doAnswer(inv -> {
                Object arg = inv.getArgument(0);
                if (arg instanceof Smb2CreateRequest) {
                    Smb2CreateRequest create = (Smb2CreateRequest) arg;
                    // Initialize response chain (also for chained query)
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 13.7K bytes
    - Viewed (0)
  7. src/test/java/jcifs/dcerpc/DcerpcPipeHandleTest.java

                // Mock initial receive with valid PDU header
                when(mockSmbPipeHandleInternal.recv(buf, 0, buf.length)).thenAnswer(invocation -> {
                    byte[] buffer = invocation.getArgument(0);
                    buffer[0] = 5; // Valid PDU version
                    buffer[1] = 0; // Valid PDU type
                    Encdec.enc_uint16le((short) 50, buffer, 8); // Fragment length
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 21K bytes
    - Viewed (0)
  8. 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)
  9. 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)
  10. 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)
Back to top