Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 104 for anyInt (0.04 sec)

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

            when(tree.acquire()).thenReturn(tree);
    
            // Setup for ensureOpen
            when(tree.isSMB2()).thenReturn(true);
            when(pipe.openUnshared(anyString(), anyInt(), anyInt(), anyInt(), anyInt(), anyInt())).thenReturn(fh);
            when(fh.acquire()).thenReturn(fh);
            lenient().when(fh.isValid()).thenReturn(true);
            lenient().when(fh.getTree()).thenReturn(tree);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 16.7K bytes
    - Viewed (0)
  2. src/test/java/jcifs/smb/SmbRandomAccessFileTest.java

            when(tree.getSendBufferSize()).thenReturn(1024);
            when(tree.hasCapability(anyInt())).thenAnswer(inv -> ntSmbsCap && inv.getArgument(0).equals(SmbConstants.CAP_NT_SMBS));
            when(tree.areSignaturesActive()).thenReturn(false);
            when(tree.isSMB2()).thenReturn(smb2);
    
            when(file.openUnshared(anyInt(), anyInt(), anyInt(), anyInt(), anyInt())).thenReturn(fh);
            when(fh.acquire()).thenReturn(fh);
    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/smb/SmbFileTest.java

                doReturn(mockTreeHandle).when(smbFile).ensureTreeConnected();
                when(mockTreeHandle.getConfig()).thenReturn(mockConfig);
                doReturn(mockFileHandle).when(smbFile).openUnshared(anyInt(), anyInt(), anyInt(), anyInt(), anyInt());
            }
    
            @Test
            void testGetInputStream() throws IOException {
                // Act
                var inputStream = smbFile.getInputStream();
    
                // Assert
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.8K bytes
    - Viewed (0)
  4. src/test/java/jcifs/internal/smb2/create/CreateContextResponseTest.java

                CreateContextResponse response = mock(CreateContextResponse.class);
                byte[] buffer = new byte[100];
                when(response.decode(any(byte[].class), anyInt(), anyInt())).thenReturn(10);
    
                int result = response.decode(buffer, 0, 10);
                assertEquals(10, result);
                verify(response, times(1)).decode(buffer, 0, 10);
            }
    
            @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 16.2K bytes
    - Viewed (0)
  5. src/test/java/jcifs/internal/AllocInfoTest.java

            void shouldHandleMockedDecodeMethod() throws jcifs.internal.SMBProtocolDecodingException {
                // Given
                byte[] buffer = new byte[100];
                when(mockAllocInfo.decode(any(byte[].class), anyInt(), anyInt())).thenReturn(42);
    
                // When
                int result = mockAllocInfo.decode(buffer, 10, 50);
    
                // Then
                assertEquals(42, result);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.8K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/smb2/lease/DirectoryLeaseManagerTest.java

    import static org.junit.jupiter.api.Assertions.assertNotNull;
    import static org.junit.jupiter.api.Assertions.assertNull;
    import static org.junit.jupiter.api.Assertions.assertTrue;
    import static org.mockito.ArgumentMatchers.anyInt;
    import static org.mockito.ArgumentMatchers.anyString;
    import static org.mockito.Mockito.mock;
    import static org.mockito.Mockito.verify;
    import static org.mockito.Mockito.when;
    
    import java.io.IOException;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 23 01:47:47 UTC 2025
    - 15.9K bytes
    - Viewed (0)
  7. src/test/java/jcifs/internal/smb2/ioctl/Smb2IoctlRequestTest.java

            when(mockInputData.encode(any(byte[].class), anyInt())).thenReturn(100);
            request.setInputData(mockInputData);
            byte[] buffer = new byte[1024];
    
            int written = request.writeBytesWireFormat(buffer, 0);
    
            assertTrue(written > 57);
            verify(mockInputData).encode(any(byte[].class), anyInt());
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14.3K bytes
    - Viewed (0)
  8. src/test/java/jcifs/dcerpc/DcerpcMessageTest.java

                lenient().doNothing().when(mockBuffer).advance(anyInt());
                lenient().doNothing().when(mockBuffer).enc_ndr_long(anyInt());
                lenient().doNothing().when(mockBuffer).enc_ndr_short(anyInt());
                lenient().doNothing().when(mockBuffer).enc_ndr_small(anyInt());
                lenient().doNothing().when(mockBuffer).setIndex(anyInt());
    
                message.encode(mockBuffer);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 18.3K bytes
    - Viewed (0)
  9. src/test/java/jcifs/smb/DfsImplTest.java

    import static org.junit.jupiter.api.Assertions.assertNull;
    import static org.mockito.ArgumentMatchers.any;
    import static org.mockito.ArgumentMatchers.anyBoolean;
    import static org.mockito.ArgumentMatchers.anyInt;
    import static org.mockito.ArgumentMatchers.anyString;
    import static org.mockito.Mockito.mock;
    import static org.mockito.Mockito.when;
    
    import java.io.IOException;
    
    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
    - 5.5K bytes
    - Viewed (0)
  10. src/test/java/jcifs/internal/smb2/ServerMessageBlock2ResponseTest.java

                response.setAsync(true);
    
                boolean result = response.verifySignature(buffer, 0, 100);
    
                assertTrue(result);
                verify(mockDigest, never()).verify(any(), anyInt(), anyInt(), anyInt(), any());
            }
    
            @Test
            @DisplayName("Should skip verification when digest is null")
            void testVerifySignatureNoDigest() {
                byte[] buffer = new byte[100];
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 19.3K bytes
    - Viewed (0)
Back to top