Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 41 for anyInt (0.07 sec)

  1. 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: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.5K bytes
    - Viewed (0)
  2. 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: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 15.5K bytes
    - Viewed (0)
  3. src/test/java/jcifs/internal/SMBSigningDigestTest.java

                    any(CommonServerMessageBlock.class));
        }
    
        @Test
        @DisplayName("Test multiple verify operations with mixed results")
        void testMultipleVerifyOperations() {
            // Arrange
            when(signingDigest.verify(any(byte[].class), anyInt(), anyInt(), anyInt(), any())).thenReturn(true, false, true, false, true);
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 10.9K bytes
    - Viewed (0)
  4. 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: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 3K bytes
    - Viewed (0)
  5. 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: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 22.7K 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: Sat Dec 20 13:44:44 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: Sat Dec 20 13:44:44 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: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 18.3K bytes
    - Viewed (0)
  9. src/test/java/jcifs/DfsResolverTest.java

            when(mockTransportPool.getSmbTransport(any(), anyString(), anyInt(), anyBoolean(), anyBoolean())).thenReturn(mockTransport);
            when(mockTransport.unwrap(any())).thenReturn(mockTransport);
            when(mockTransport.getDfsReferrals(any(), anyString(), anyString(), anyString(), anyInt())).thenReturn(null);
            assertNull(dfsResolver.getDc(mockContext, "anyDomain"));
        }
    
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.5K bytes
    - Viewed (0)
  10. 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: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.5K bytes
    - Viewed (0)
Back to top