- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 2,390 for when (0.03 sec)
-
src/test/java/jcifs/smb1/dcerpc/msrpc/samrTest.java
samr.SamrSamEntry entry = new samr.SamrSamEntry(); when(mockNdrBuffer.dec_ndr_long()).thenReturn(1, 100); // idx, _name_bufferp when(mockNdrBuffer.dec_ndr_short()).thenReturn(4, 6); // length, maximum_length when(mockDeferredBuffer.dec_ndr_long()).thenReturn(-1); // Invalid _name_buffers // When/Then: Should throw exception
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 33.6K bytes - Viewed (0) -
src/test/java/jcifs/ntlmssp/Type2MessageTest.java
when(mockContext.getConfig()).thenReturn(mockConfig); when(mockContext.getNameServiceClient()).thenReturn(mockNameServiceClient); when(mockNameServiceClient.getLocalHost()).thenReturn(mockHost); when(mockHost.getHostName()).thenReturn(TEST_HOSTNAME); when(mockConfig.getDefaultDomain()).thenReturn(TEST_DOMAIN); when(mockConfig.isUseUnicode()).thenReturn(true);Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 38.9K bytes - Viewed (0) -
src/test/java/jcifs/dcerpc/ndr/NdrShortTest.java
NdrBuffer decodeBuffer = mock(NdrBuffer.class); when(decodeBuffer.dec_ndr_short()).thenReturn(originalValue); // When: Encoding then decoding ndrShort1.encode(encodeBuffer); NdrShort ndrShort2 = new NdrShort(0); ndrShort2.decode(decodeBuffer); // Then: Values should match verify(encodeBuffer).enc_ndr_short(originalValue);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.2K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb1/com/SmbComRenameTest.java
int dstIndex = 0; // When int result = smbComRename.writeBytesWireFormat(dst, dstIndex); // Then assertTrue(result > 0); assertEquals((byte) 0x04, dst[0]); // First buffer format byte // Find the second buffer format byte by searching for it // In Unicode mode, the old filename is written as Unicode, then 0x04, then an alignment byteRegistered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 12.5K bytes - Viewed (0) -
src/test/java/jcifs/ntlmssp/Type3MessageTest.java
lenient().when(mockConfig.getDefaultDomain()).thenReturn("TESTDOMAIN"); lenient().when(mockConfig.isUseUnicode()).thenReturn(true); lenient().when(mockConfig.getOemEncoding()).thenReturn("UTF-8"); lenient().when(mockConfig.getRandom()).thenReturn(mockRandom); lenient().when(mockConfig.getLanManCompatibility()).thenReturn(level);Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 17.3K bytes - Viewed (0) -
src/test/java/jcifs/util/CryptoTest.java
void testMD4Hash() { // Given String input = "Hello World"; byte[] data = input.getBytes(); // When MessageDigest md4 = Crypto.getMD4(); byte[] hash = md4.digest(data); // Then assertNotNull(hash); assertEquals(16, hash.length); // MD4 produces 128-bit hash } @Test
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 7.4K bytes - Viewed (0) -
src/test/java/jcifs/dcerpc/DcerpcPipeHandleTest.java
lenient().when(mockSmbNamedPipe.openPipe()).thenReturn(mockSmbPipeHandle); lenient().when(mockSmbPipeHandle.unwrap(SmbPipeHandleInternal.class)).thenReturn(mockSmbPipeHandleInternal); lenient().when(mockSmbNamedPipe.getContext()).thenReturn(mockContext); lenient().when(mockSmbNamedPipe.getLocator()).thenReturn(mockSmbResourceLocator);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 21K bytes - Viewed (0) -
src/test/java/jcifs/http/NtlmHttpURLConnectionTest.java
// Arrange when(mockConnection.getRequestMethod()).thenReturn("GET"); when(mockConnection.getAllowUserInteraction()).thenReturn(true); when(mockConnection.getDoInput()).thenReturn(true); when(mockConnection.getDoOutput()).thenReturn(true); when(mockConnection.getIfModifiedSince()).thenReturn(12345L); when(mockConnection.getUseCaches()).thenReturn(false);Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 12.6K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/io/Smb2ReadResponseTest.java
headerStartField.setAccessible(true); headerStartField.set(response, 0); // When int bytesRead = response.readBytesWireFormat(buffer, bodyStart); // Then // When dataLength is 0, it returns max(16, dataOffset + 0 - bodyStart) = max(16, 80) = 80 assertEquals(80, bytesRead); assertEquals(0, response.getDataLength());
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 22.1K bytes - Viewed (0) -
src/test/java/jcifs/util/StringsTest.java
// When & Then - the implementation throws ArrayIndexOutOfBoundsException when buffer bounds are exceeded assertThrows(ArrayIndexOutOfBoundsException.class, () -> { Strings.findUNITermination(bufferWithoutTermination, 0, bufferWithoutTermination.length); }, "Should throw ArrayIndexOutOfBoundsException when termination not found within bounds"); }Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 18.6K bytes - Viewed (0)