- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 84 for anyInt (1.5 sec)
-
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) -
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) -
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) -
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) -
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) -
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) -
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) -
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) -
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) -
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: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 10.9K bytes - Viewed (0)