- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 722 for WHEN (0.96 sec)
-
src/test/java/jcifs/internal/smb2/nego/Smb2NegotiateResponseTest.java
// Default configuration when(mockConfig.isDfsDisabled()).thenReturn(false); when(mockConfig.isEncryptionEnabled()).thenReturn(true); when(mockConfig.getMinimumVersion()).thenReturn(DialectVersion.SMB202); when(mockConfig.getMaximumVersion()).thenReturn(DialectVersion.SMB311); when(mockConfig.getTransactionBufferSize()).thenReturn(65536); when(mockConfig.getReceiveBufferSize()).thenReturn(65536);Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 32.5K 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: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 22.1K bytes - Viewed (0) -
src/test/java/jcifs/SmbTreeHandleTest.java
/** * Test for close() method throwing CIFSException. * Verifies that the method correctly throws a CIFSException when configured to do so. * @throws CIFSException */ @Test void testClose_throwsCIFSException() throws CIFSException { doThrow(new CIFSException("Test Exception")).when(smbTreeHandle).close(); assertThrows(CIFSException.class, () -> smbTreeHandle.close(), "close() should throw CIFSException");Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 7.1K bytes - Viewed (0) -
src/test/java/jcifs/dcerpc/ndr/NdrShortTest.java
void testConstructorZero() { // Given/When: Creating NdrShort with zero NdrShort ndrShort = new NdrShort(0); // Then: Value should be zero assertEquals(0, ndrShort.value); } @Test @DisplayName("Should handle maximum byte value correctly") void testConstructorMaxByte() { // Given/When: Creating NdrShort with max byte value
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.2K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbTransportInternalTest.java
void hasCapability_variousCaps(int cap) throws SmbException { when(transport.hasCapability(anyInt())).thenAnswer(inv -> ((int) inv.getArgument(0)) >= 0); boolean result = transport.hasCapability(cap); assertEquals(cap >= 0, result); verify(transport, times(1)).hasCapability(cap); } // Invalid input: simulate underlying SmbException when capability check fails @Test
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 12.1K bytes - Viewed (0) -
src/test/java/jcifs/CIFSUnsupportedCryptoExceptionTest.java
void testMessageConstructor() { // Given & When CIFSUnsupportedCryptoException exception = new CIFSUnsupportedCryptoException(CRYPTO_ERROR_MESSAGE); // Then assertEquals(CRYPTO_ERROR_MESSAGE, exception.getMessage(), "Message should be preserved"); assertNull(exception.getCause(), "Cause should be null when not specified"); } @ParameterizedTest
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 4.1K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbCopyUtilTest.java
when(sh.isSMB2()).thenReturn(true); when(dh.isSMB2()).thenReturn(true); when(sh.isSameTree(dh)).thenReturn(true); // Source open returns a handle that reports size 0 SmbFileHandleImpl sfd = mock(SmbFileHandleImpl.class); when(sfd.getInitialSize()).thenReturn(0L);
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 12.1K bytes - Viewed (0) -
src/test/java/jcifs/internal/SmbNegotiationRequestTest.java
@DisplayName("Test isSigningEnforced returns true when signing is enforced") void testIsSigningEnforcedReturnsTrue() { // Given when(negotiationRequest.isSigningEnforced()).thenReturn(true); // When boolean result = negotiationRequest.isSigningEnforced(); // Then assertTrue(result, "isSigningEnforced should return true when signing is enforced");Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 6.4K bytes - Viewed (0) -
src/test/java/jcifs/internal/witness/WitnessClientTest.java
lenient().when(mockContext.getConfig()).thenReturn(mockConfig); lenient().when(mockConfig.getWitnessHeartbeatTimeout()).thenReturn(120000L); lenient().when(mockConfig.getWitnessRegistrationTimeout()).thenReturn(300000L); lenient().when(mockConfig.getWitnessReconnectDelay()).thenReturn(1000L); lenient().when(mockConfig.isWitnessServiceDiscovery()).thenReturn(true); }
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Sat Aug 23 09:06:40 UTC 2025 - 9.8K bytes - Viewed (0) -
src/test/java/jcifs/util/HMACT64Test.java
try (MockedStatic<Crypto> mockedCrypto = mockStatic(Crypto.class)) { mockedCrypto.when(Crypto::getMD5).thenReturn(mockMd5); byte[] innerDigest = "inner_digest".getBytes(); byte[] finalDigest = "final_digest".getBytes(); when(mockMd5.digest()).thenReturn(innerDigest); when(mockMd5.digest(any(byte[].class))).thenReturn(finalDigest);
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 14.6K bytes - Viewed (0)