Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 61 for anySet (0.03 sec)

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

    import static org.junit.jupiter.api.Assertions.assertThrows;
    import static org.junit.jupiter.api.Assertions.assertTrue;
    import static org.mockito.ArgumentMatchers.any;
    import static org.mockito.ArgumentMatchers.anySet;
    import static org.mockito.ArgumentMatchers.anyString;
    import static org.mockito.ArgumentMatchers.eq;
    import static org.mockito.Mockito.atLeastOnce;
    import static org.mockito.Mockito.doAnswer;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 13K bytes
    - Viewed (0)
  2. src/test/java/jcifs/smb/SmbFileOutputStreamTest.java

            when(mockFileHandle.acquire()).thenReturn(mockFileHandle);
    
            // Mock for ensureOpen to reopen file
            when(mockFile.openUnshared(anyInt(), anyInt(), anyInt(), anyInt(), anyInt())).thenReturn(mockFileHandle);
    
            when(mockTreeHandle.send(any(Smb2WriteRequest.class), any())).thenReturn(mockWriteResponse);
            when(mockWriteResponse.getCount()).thenReturn(1);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.8K bytes
    - Viewed (0)
  3. src/test/java/jcifs/smb/SmbPipeHandleImplTest.java

            when(tree.acquire()).thenReturn(tree);
            when(tree.isSMB2()).thenReturn(true);
    
            // SMB2 branch in ensureOpen uses openUnshared(String, ...)
            when(pipe.openUnshared(anyString(), anyInt(), anyInt(), anyInt(), anyInt(), anyInt())).thenReturn(fileHandle);
            when(fileHandle.acquire()).thenReturn(fileHandle);
            when(fileHandle.isValid()).thenReturn(true);
            when(fileHandle.getTree()).thenReturn(tree);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.7K bytes
    - Viewed (0)
  4. src/test/java/jcifs/dcerpc/rpcTest.java

    import static org.junit.jupiter.api.Assertions.assertNotNull;
    import static org.junit.jupiter.api.Assertions.assertNull;
    import static org.junit.jupiter.api.Assertions.assertThrows;
    import static org.mockito.ArgumentMatchers.anyInt;
    import static org.mockito.Mockito.mock;
    import static org.mockito.Mockito.times;
    import static org.mockito.Mockito.verify;
    import static org.mockito.Mockito.when;
    
    import org.junit.jupiter.api.DisplayName;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.5K bytes
    - Viewed (0)
  5. src/test/java/jcifs/smb/Kerb5ContextTest.java

            byte[] data = new byte[] { 7 };
            byte[] mic = new byte[] { 8 };
            doThrow(new GSSException(GSSException.BAD_MIC)).when(gssContext)
                    .verifyMIC(any(), anyInt(), anyInt(), any(), anyInt(), anyInt(), any());
    
            CIFSException ex = assertThrows(CIFSException.class, () -> ctx.verifyMIC(data, mic));
            assertTrue(ex.getMessage().contains("Failed to verify MIC"));
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 14.2K bytes
    - Viewed (0)
  6. src/test/java/jcifs/dcerpc/DcerpcBindTest.java

                // Use lenient stubbing to handle multiple calls
                lenient().doNothing().when(mockBuffer).enc_ndr_short(anyInt());
                lenient().doNothing().when(mockBuffer).enc_ndr_long(anyInt());
                lenient().doNothing().when(mockBuffer).enc_ndr_small(anyInt());
    
                DcerpcBind bindWithParams = new DcerpcBind(mockBinding, mockHandle);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 22.7K bytes
    - Viewed (0)
  7. src/test/java/jcifs/netbios/SessionRetargetResponsePacketTest.java

            // Test that an IOException is thrown if the input stream does not provide enough bytes.
            // Simulate reading less than 6 bytes.
            when(mockInputStream.read(any(byte[].class), anyInt(), anyInt())).thenReturn(5); // Simulate reading only 5 bytes
    
            SessionRetargetResponsePacket packet = new SessionRetargetResponsePacket();
            byte[] buffer = new byte[6];
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 3K bytes
    - Viewed (0)
  8. src/test/java/jcifs/smb/SmbCopyUtilTest.java

            // Verify that server-side path engaged at least the initial opens
            verify(src, times(1)).openUnshared(anyInt(), anyInt(), anyInt(), anyInt(), anyInt());
            verify(dest, times(1)).openUnshared(anyInt(), anyInt(), anyInt(), anyInt(), anyInt());
        }
    
        // --- WriterThread behavior ---
    
        @Test
        @DisplayName("WriterThread writes provided buffer and stops on -1")
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.1K bytes
    - Viewed (0)
  9. src/test/java/jcifs/netbios/SessionServicePacketTest.java

        }
    
        @Test
        @DisplayName("readn should handle multiple read calls")
        void testReadnMultipleCalls() throws IOException {
            when(mockInputStream.read(any(byte[].class), anyInt(), anyInt())).thenReturn(2) // First read returns 2 bytes
                    .thenReturn(2) // Second read returns 2 bytes
                    .thenReturn(1); // Third read returns 1 byte
    
            byte[] buffer = new byte[10];
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.5K bytes
    - Viewed (0)
  10. src/test/java/jcifs/SidResolverTest.java

        @Test
        void testResolveSidsWithOffsetAndLength_Success() throws CIFSException {
            doNothing().when(sidResolver).resolveSids(any(CIFSContext.class), anyString(), any(SID[].class), anyInt(), anyInt());
    
            assertDoesNotThrow(() -> sidResolver.resolveSids(mockContext, testServerName, testSids, 0, 2));
    
            verify(sidResolver, times(1)).resolveSids(mockContext, testServerName, testSids, 0, 2);
        }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 15.5K bytes
    - Viewed (0)
Back to top