- Sort Score
- Result 10 results
- Languages All
Results 251 - 260 of 773 for When (1.36 sec)
-
src/test/java/jcifs/internal/smb1/com/SmbComSetInformationResponseTest.java
import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.when; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith;
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 4.1K bytes - Viewed (0) -
src/test/java/jcifs/dcerpc/DcerpcSecurityProviderTest.java
} @Test void testWrapMethodThrowsDcerpcException() throws DcerpcException { // Configure the mock to throw DcerpcException when wrap is called doThrow(new DcerpcException("Test wrap exception")).when(dcerpcSecurityProvider).wrap(mockNdrBuffer); // Assert that calling wrap throws DcerpcExceptionRegistered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 2.5K bytes - Viewed (0) -
src/test/java/jcifs/smb1/smb1/AllocInfoTest.java
* implementation. */ @Test @DisplayName("verify getters return stubbed values") void testGettersHappyPath() { when(mockAllocInfo.getCapacity()).thenReturn(1000L); when(mockAllocInfo.getFree()).thenReturn(400L); assertEquals(1000L, mockAllocInfo.getCapacity(), "capacity should match stubbed value");Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 2.4K bytes - Viewed (0) -
src/test/java/jcifs/dcerpc/msrpc/MsrpcSamrCloseHandleTest.java
void constructorShouldInitializeCorrectly() { // Given // mockPolicyHandle is already mocked by @Mock and initialized by @BeforeEach // When MsrpcSamrCloseHandle msrpcSamrCloseHandle = new MsrpcSamrCloseHandle(mockPolicyHandle); // Then assertNotNull(msrpcSamrCloseHandle, "MsrpcSamrCloseHandle object should not be null"); assertEquals(0, msrpcSamrCloseHandle.getPtype(), "ptype should be 0");
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 1.4K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb1/AndXServerMessageBlockTest.java
void testWriteAndXWireFormatWithNonAndXCommand() { when(mockConfig.isUseBatching()).thenReturn(true); when(mockAndxCommand.getCommand()).thenReturn(0x42); when(mockAndxCommand.writeParameterWordsWireFormat(any(byte[].class), anyInt())).thenReturn(10); when(mockAndxCommand.writeBytesWireFormat(any(byte[].class), anyInt())).thenReturn(20);
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 19.4K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb1/trans2/Trans2SetFileInformationTest.java
} @Test @DisplayName("Test complete wire format writing") void testCompleteWireFormatWriting() { when(mockFileInfo.getFileInformationLevel()).thenReturn((byte) FileInformation.FILE_BASIC_INFO); when(mockFileInfo.encode(any(byte[].class), anyInt())).thenReturn(50); trans2SetFileInfo = new Trans2SetFileInformation(config, TEST_FID, mockFileInfo);Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 17.8K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb1/trans/TransTransactNamedPipeResponseTest.java
System.arraycopy(outputBuffer, 0, expectedData, 0, testData.length); assertArrayEquals(testData, expectedData); } @Test void testReadDataWireFormatExceedsBuffer() { // Test when data length exceeds outputBuffer size byte[] buffer = new byte[2000]; int dataLen = outputBuffer.length + 100; // Exceeds outputBuffer size SMBProtocolDecodingException exception =
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 9.5K bytes - Viewed (0) -
src/test/java/jcifs/spnego/NegTokenInitTest.java
assertNull(parsed.getMechanisms(), "Mechanisms should be null when absent"); assertEquals(0, parsed.getContextFlags(), "Flags should be zero when absent"); assertNull(parsed.getMechanismToken(), "Mechanism token should be null when absent"); assertNull(parsed.getMechanismListMIC(), "MIC should be null when absent"); } @Test
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 21K bytes - Viewed (0) -
src/test/java/jcifs/smb/ShareEnumIteratorTest.java
} // Helper to create a minimal FileEntry mock private FileEntry entry(String name, int type) { FileEntry e = mock(FileEntry.class); when(e.getName()).thenReturn(name); when(e.getType()).thenReturn(type); return e; } @Test @DisplayName("Happy path without filter: iterates all entries in order")Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 8.1K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb1/com/SmbComCreateDirectoryTest.java
package jcifs.internal.smb1.com; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import java.nio.charset.StandardCharsets; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import jcifs.Configuration; import jcifs.internal.smb1.ServerMessageBlock; /** * Tests for the SmbComCreateDirectory class. */
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 4.2K bytes - Viewed (0)