- Sort Score
- Num 10 results
- Language All
Results 241 - 250 of 878 for verifyCn (0.1 seconds)
-
src/test/java/jcifs/smb/SmbSessionImplSecurityTest.java
import org.junit.jupiter.api.Test; import org.mockito.Mockito; import jcifs.CIFSContext; import jcifs.Configuration; import jcifs.Credentials; /** * Security-focused test cases for SmbSessionImpl to verify race condition fixes. */ public class SmbSessionImplSecurityTest { private CIFSContext mockContext; private SmbTransportImpl mockTransport; private Configuration mockConfig;Created: Sat Dec 20 13:44:44 GMT 2025 - Last Modified: Sun Aug 31 08:00:57 GMT 2025 - 11K bytes - Click Count (0) -
src/test/java/jcifs/smb/NtlmUtilTest.java
assertArrayEquals(r14, r15, "Only first 14 OEM bytes affect Pre-NTLM response"); assertEquals(24, r14.length); // Verify collaborator interactions verify(cifsContext, atLeastOnce()).getConfig(); verify(configuration, atLeastOnce()).getOemEncoding(); verifyNoMoreInteractions(cifsContext, configuration); } @Test
Created: Sat Dec 20 13:44:44 GMT 2025 - Last Modified: Sat Aug 30 05:58:03 GMT 2025 - 12K bytes - Click Count (1) -
src/test/java/jcifs/netbios/NodeStatusRequestTest.java
import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.lenient; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.verify; import java.lang.reflect.Field; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock;
Created: Sat Dec 20 13:44:44 GMT 2025 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 13.9K bytes - Click Count (0) -
src/test/java/jcifs/internal/smb2/ioctl/ValidateNegotiateInfoResponseTest.java
int testDialect = 0x0311; SMBUtil.writeInt2(testDialect, buffer, bufferIndex + 22); // Execute decode int bytesDecoded = response.decode(buffer, bufferIndex, 24); // Verify results assertEquals(24, bytesDecoded, "Should decode exactly 24 bytes"); assertEquals(testCapabilities, response.getCapabilities(), "Capabilities should match");Created: Sat Dec 20 13:44:44 GMT 2025 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 10.8K bytes - Click Count (0) -
src/test/java/jcifs/dcerpc/msrpc/MsrpcSamrOpenDomainTest.java
MsrpcSamrOpenDomain msrpcSamrOpenDomain = new MsrpcSamrOpenDomain(mockHandle, access, mockSid, mockDomainHandle); // Then // Verify that ptype is set to 0 assertEquals(0, msrpcSamrOpenDomain.getPtype(), "ptype should be initialized to 0"); // Verify that flags are set correctly (DCERPC_FIRST_FRAG | DCERPC_LAST_FRAG)
Created: Sat Dec 20 13:44:44 GMT 2025 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 1.7K bytes - Click Count (0) -
src/test/java/jcifs/internal/smb2/ServerMessageBlock2ResponseTest.java
when(mockConfig.isRequireSecureNegotiate()).thenReturn(true); when(mockDigest.verify(buffer, 0, 100, 0, response)).thenReturn(false); boolean result = response.verifySignature(buffer, 0, 100); assertTrue(result); verify(mockDigest).verify(buffer, 0, 100, 0, response); } } @Nested @DisplayName("Expiration Tests")
Created: Sat Dec 20 13:44:44 GMT 2025 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 19.3K bytes - Click Count (0) -
src/test/java/jcifs/smb1/smb1/SmbConstantsTest.java
// Stub the getRemoteHostName method when(mock.getRemoteHostName()).thenReturn("test-host"); // Verify the stubbing assertEquals("test-host", mock.getRemoteHostName()); // Ensure that the mock was interacted with verify(mock).getRemoteHostName(); }Created: Sat Dec 20 13:44:44 GMT 2025 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 4.2K bytes - Click Count (0) -
src/test/java/jcifs/smb1/smb1/SmbTreeTest.java
ServerMessageBlock response = new SmbComOpenAndXResponse(); // Execute send tree.send(request, response); // Verify session.send was called and tid was set verify(session).send(request, response); assertEquals(123, request.tid); } @Test void testSendWithDfs() throws SmbException {
Created: Sat Dec 20 13:44:44 GMT 2025 - Last Modified: Thu Aug 14 07:14:38 GMT 2025 - 10.2K bytes - Click Count (0) -
src/test/java/jcifs/smb/SmbPipeHandleInternalTest.java
// Assert assertSame(tree, t1, "First acquire returns provided tree"); assertSame(tree, t2, "Subsequent acquire returns same tree instance"); verify(pipe, times(1)).ensureTreeConnected(); verify(tree, times(2)).acquire(); } @Test @DisplayName("getInput/getOutput return cached streams when open; throw when closed")Created: Sat Dec 20 13:44:44 GMT 2025 - Last Modified: Thu Aug 14 07:14:38 GMT 2025 - 16.7K bytes - Click Count (0) -
src/test/java/jcifs/smb1/smb1/DosFileFilterTest.java
verify(file, times(1)).getAttributes(); } @Test public void testAcceptReturnsFalseWhenAttributesDoNotMatch() throws Exception { SmbFile file = mock(SmbFile.class); when(file.getAttributes()).thenReturn(SmbFile.ATTR_HIDDEN); assertFalse(filter.accept(file), "Attributes not matching should be rejected"); verify(file, times(1)).getAttributes(); }
Created: Sat Dec 20 13:44:44 GMT 2025 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 1.8K bytes - Click Count (0)