- Sort Score
- Result 10 results
- Languages All
Results 241 - 250 of 722 for WHEN (2.72 sec)
-
src/test/java/jcifs/util/transport/TransportTest.java
@Test @DisplayName("readn should throw IOException when buffer too short") void shouldThrowWhenBufferTooShort() { InputStream is = new ByteArrayInputStream("test".getBytes()); assertThrows(IOException.class, () -> Transport.readn(is, new byte[5], 0, 10)); } @Test @DisplayName("readn should return 0 when no more bytes available")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/internal/smb2/info/Smb2QueryInfoRequestTest.java
@BeforeEach void setUp() { mockConfig = mock(Configuration.class); mockContext = mock(CIFSContext.class); when(mockContext.getConfig()).thenReturn(mockConfig); when(mockConfig.getMaximumBufferSize()).thenReturn(65536); when(mockConfig.getListSize()).thenReturn(65536); testFileId = new byte[16]; for (int i = 0; i < 16; i++) { testFileId[i] = (byte) i;Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 22.6K bytes - Viewed (0) -
src/test/java/jcifs/ACETest.java
ACE directAce = mock(ACE.class); when(inheritedAce.isInherited()).thenReturn(true); when(directAce.isInherited()).thenReturn(false); assertTrue(inheritedAce.isInherited()); assertFalse(directAce.isInherited()); verify(inheritedAce).isInherited(); verify(directAce).isInherited(); } @Test
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 24.4K bytes - Viewed (0) -
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/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/smb1/smb1/AndXServerMessageBlockTest.java
assertEquals((byte) 0xFF, buf[1], "AndX command should be 0xFF when no chaining"); assertEquals((byte) 0x00, buf[2], "Reserved byte must be 0"); assertEquals((byte) 0xDE, buf[3], "Sentinel low offset when no chaining"); assertEquals((byte) 0xDE, buf[4], "Sentinel high offset when no chaining"); assertNull(block.andx, "andx should be cleared when not chaining"); } @Test
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 12.5K bytes - Viewed (0)