- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 452 for isValid (0.05 sec)
-
src/test/java/jcifs/internal/SmbNegotiationResponseTest.java
} @Test @DisplayName("Test isValid returns false for invalid negotiation") void testIsValidReturnsFalse() { // Arrange when(negotiationResponse.isValid(cifsContext, negotiationRequest)).thenReturn(false); // Act boolean result = negotiationResponse.isValid(cifsContext, negotiationRequest); // Assert
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 20.6K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbFileHandleImplTest.java
assertTrue(h.isValid()); // Tree id change makes it invalid when(tree.getTreeId()).thenReturn(11L); assertFalse(h.isValid()); // Connected=false makes it invalid when(tree.getTreeId()).thenReturn(10L); when(tree.isConnected()).thenReturn(false); assertFalse(h.isValid()); // Mark closed makes it invalid
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 12.3K bytes - Viewed (0) -
src/main/java/jcifs/smb/PreauthIntegrityService.java
return false; } if (!context.isValid()) { throw new CIFSException("Preauth integrity context is invalid for session: " + sessionId); } byte[] actualHash = context.getCurrentHash(); boolean isValid = MessageDigest.isEqual(actualHash, expectedHash); if (isValid) {
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 12.1K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbWatchHandleImplTest.java
} // Ensures watch() fails fast if the underlying handle is invalid @Test @DisplayName("watch() throws when handle invalid") void watch_invalidHandle_throwsSmbException() throws Exception { when(handle.isValid()).thenReturn(false); SmbWatchHandleImpl sut = new SmbWatchHandleImpl(handle, 0, false);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.5K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbFileOutputStreamTest.java
when(mockFileHandle.isValid()).thenReturn(false); assertFalse(outputStream.isOpen()); } @Test void testWriteAfterClose() throws IOException, CIFSException { // Given when(mockTreeHandle.isSMB2()).thenReturn(true); when(mockTreeHandle.getSendBufferSize()).thenReturn(65536); when(mockFileHandle.isValid()).thenReturn(true);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 15.8K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/nego/Smb2NegotiateResponseTest.java
// When boolean valid = response.isValid(mockContext, mockRequest); // Then assertTrue(valid); assertEquals(DialectVersion.SMB311, response.getSelectedDialect()); } @Test @DisplayName("Should fail validation when not received") void testIsValidNotReceived() { // When boolean valid = response.isValid(mockContext, mockRequest); // Then
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 32.5K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbPipeHandleImplTest.java
// Re-prepare state for second branch: not open but handle set when(fileHandle.isValid()).thenReturn(false); // Need to reopen logic to set handle again // Reset open flag by reconstructing target target = new SmbPipeHandleImpl(pipe); target.ensureOpen(); // handle present but invalid per isValid=false target.close(); verify(fileHandle, atLeastOnce()).release(); }
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.7K bytes - Viewed (0) -
src/test/java/jcifs/smb/PreauthIntegrityServiceTest.java
fail("Expected CIFSException"); } catch (CIFSException e) { // Expected } assertFalse(context.isValid()); // Further operations on invalid context should fail assertThrows(CIFSException.class, () -> { preauthService.updatePreauthHash(sessionId, "test".getBytes()); }); } @Test
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 11.1K bytes - Viewed (0) -
cmd/erasure-healing-common.go
for index, e := range etags { if partsMetadata[index].IsValid() && e == etag { onlineDisks[index] = disks[index] } else { onlineDisks[index] = nil } } return onlineDisks, modTime, etag } } // Create a new online disks slice, which have common uuid. for index, t := range modTimes { if partsMetadata[index].IsValid() && t.Equal(modTime) { onlineDisks[index] = disks[index]
Registered: Sun Sep 07 19:28:11 UTC 2025 - Last Modified: Sun Mar 30 00:56:02 UTC 2025 - 12K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbPipeHandleInternalTest.java
when(fh.acquire()).thenReturn(fh); when(fh.isValid()).thenReturn(true, false); // first true, then false handle.ensureOpen(); assertTrue(handle.isOpen()); // Simulate invalidation assertFalse(handle.isOpen(), "Becomes not open when underlying handle invalid"); // After close, report stale handle.close();
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 16.7K bytes - Viewed (0)