- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 31 for expectedSizes (0.65 sec)
-
src/test/java/jcifs/internal/smb2/create/CreateContextRequestTest.java
void testCombinedSizeCalculation() { CreateContextRequest[] contexts = new CreateContextRequest[5]; int[] expectedSizes = { 16, 24, 32, 40, 48 }; for (int i = 0; i < contexts.length; i++) { contexts[i] = new MockCreateContextRequest("CTX" + i, expectedSizes[i]); } // Calculate total size int totalSize = 0;
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 24.9K bytes - Viewed (0) -
src/test/java/jcifs/internal/fscc/FileRenameInformation2Test.java
FileRenameInformation2 info = new FileRenameInformation2(longFileName, false); int expectedSize = 20 + 2 * longFileName.length(); assertEquals(expectedSize, info.size()); byte[] buffer = new byte[expectedSize + 100]; int bytesWritten = info.encode(buffer, 0); assertEquals(expectedSize, bytesWritten); } @Test @DisplayName("Test decode with empty filename")Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.3K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/lock/Smb2LockRequestTest.java
Smb2LockRequest req = new Smb2LockRequest(mockConfig, testFileId, singleLock); int expectedSize = Smb2Constants.SMB2_HEADER_LENGTH + 24 + 24; // header + structure + 1 lock expectedSize = ((expectedSize + 7) / 8) * 8; // 8-byte alignment assertEquals(expectedSize, req.size()); } @Test @DisplayName("Should calculate size correctly with multiple locks")
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 25.3K bytes - Viewed (0) -
src/test/java/jcifs/SmbFileHandleTest.java
* Test getInitialSize() returns the correct size. */ @Test void testGetInitialSize() { long expectedSize = 1024L; when(smbFileHandle.getInitialSize()).thenReturn(expectedSize); long actualSize = smbFileHandle.getInitialSize(); assertEquals(expectedSize, actualSize, "getInitialSize should return the correct initial file size."); verify(smbFileHandle, times(1)).getInitialSize();
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 5.1K bytes - Viewed (0) -
src/test/java/jcifs/internal/SmbNegotiationResponseTest.java
void testGetSendBufferSizeStandard() { // Arrange int expectedSize = 65536; when(negotiationResponse.getSendBufferSize()).thenReturn(expectedSize); // Act int size = negotiationResponse.getSendBufferSize(); // Assert assertEquals(expectedSize, size); verify(negotiationResponse).getSendBufferSize(); } @Test
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 20.6K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/create/LeaseV1CreateContextRequestTest.java
assertEquals(0, leaseContext.getLeaseFlags()); } @Test @DisplayName("Should calculate correct size") void testSize() { int expectedSize = 16 + 4 + 4 + 32; // header + name + padding + data assertEquals(expectedSize, leaseContext.size()); } @Test @DisplayName("Should set and get lease key") void testLeaseKeyAccessors() {
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 21 00:16:17 UTC 2025 - 5.8K bytes - Viewed (0) -
src/test/java/jcifs/internal/dfs/DfsReferralRequestBufferTest.java
buffer = new DfsReferralRequestBuffer(path, maxReferralLevel); assertNotNull(buffer); // Verify through encode since there are no getters int expectedSize = 4 + 2 * path.length(); assertEquals(expectedSize, buffer.size()); } @Test @DisplayName("Should create buffer with empty path") void testConstructorWithEmptyPath() { String path = "";
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 17.5K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/create/Smb2CreateRequestTest.java
request = new Smb2CreateRequest(mockConfig, "test.txt"); int expectedSize = Smb2Constants.SMB2_HEADER_LENGTH + 56; int nameLen = 2 * "test.txt".length(); expectedSize += ((nameLen + 7) / 8) * 8; // size8(nameLen) expectedSize = ((expectedSize + 7) / 8) * 8; // size8(size) assertEquals(expectedSize, request.size()); } @Test
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 18.6K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/io/Smb2WriteRequestTest.java
@DisplayName("Should calculate size correctly with no data") void testSizeWithNoData() { request.setData(new byte[0], 0, 0); int expectedSize = ((Smb2Constants.SMB2_HEADER_LENGTH + 48 + 7) / 8) * 8; assertEquals(expectedSize, request.size()); } @Test @DisplayName("Should calculate size correctly with data") void testSizeWithData() {Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 22.4K bytes - Viewed (0) -
src/main/java/jcifs/util/ServerResponseValidator.java
} if (buffer.length < expectedSize) { failedValidations.incrementAndGet(); bufferOverflowsPrevented.incrementAndGet(); log.warn("Response buffer too small: {} < {}", buffer.length, expectedSize); throw new SmbException("Response buffer too small: " + buffer.length + " < " + expectedSize); } if (buffer.length > maxSize) {Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Sat Aug 30 05:58:03 UTC 2025 - 16.6K bytes - Viewed (0)