- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 154 for mocked (0.88 sec)
-
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/AllocInfoTest.java
assertEquals(7, FileSystemInformation.FS_FULL_SIZE_INFO); } } @Nested @DisplayName("Mock Behavior Tests") class MockBehaviorTests { @Test @DisplayName("Should return mocked capacity value") void shouldReturnMockedCapacity() { // Given long expectedCapacity = 1024L * 1024L * 1024L * 100L; // 100GB
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 18.8K bytes - Viewed (0) -
src/test/java/jcifs/smb1/smb1/DosErrorTest.java
} @Test @DisplayName("Mocked consumer receives correct NTSTATUS value") void testConsumerInteraction() { final int dosErr = 0x00010001; final int expectedNt = 0xc0000002; interface NtStatusConsumer { void consume(int ntStatus); } NtStatusConsumer mock = mock(NtStatusConsumer.class); findNtStatus(dosErr).ifPresent(mock::consume);Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 3K bytes - Viewed (0) -
src/test/java/jcifs/pac/kerberos/KerberosTicketTest.java
import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.MockedStatic; import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; import jcifs.pac.PACDecodingException; /** * Unit tests for the KerberosTicket class. */ @ExtendWith(MockitoExtension.class) class KerberosTicketTest { @Mock private KerberosKey kerberosKey;Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.4K bytes - Viewed (0) -
src/test/java/jcifs/smb1/dcerpc/ndr/NdrHyperTest.java
* The tests verify that: * <ul> * <li>encoding and decoding round‑trip correctly handle typical, zero, * and extreme {@code long} values.</li> * <li>encode/decode methods interact correctly with a mocked * {@link NdrBuffer} so that the correct method is called with * the correct argument.</li> * <li>passing {@code null} throws {@link NullPointerException}. * </ul> *
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 4.3K bytes - Viewed (0) -
src/test/java/jcifs/http/NtlmHttpServletRequestTest.java
import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import jakarta.servlet.http.HttpServletRequest; /** * Tests for {@link NtlmHttpServletRequest}. */ @ExtendWith(MockitoExtension.class) class NtlmHttpServletRequestTest { @Mock private HttpServletRequest mockRequest; @Mock private Principal mockPrincipal;Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 21 04:51:33 UTC 2025 - 2.7K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbNamedPipeTest.java
// Arrange: real instance to call protected method; collaborators mocked for interaction verification SmbNamedPipe pipe = new SmbNamedPipe("smb://server/IPC$/foo", SmbPipeResource.PIPE_TYPE_RDWR, ctx()); SmbComNTCreateAndX req = mock(SmbComNTCreateAndX.class); SmbComNTCreateAndXResponse resp = mock(SmbComNTCreateAndXResponse.class); // Act pipe.customizeCreate(req, resp);Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 5.2K bytes - Viewed (0) -
src/test/java/jcifs/SmbFileHandleTest.java
import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; /** * Unit tests for the {@link SmbFileHandle} interface. */ @ExtendWith(MockitoExtension.class) class SmbFileHandleTest { @Mock private SmbFileHandle smbFileHandle; @Mock private SmbTreeHandle smbTreeHandle; @BeforeEachRegistered: 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/SMBProtocolDecodingExceptionTest.java
import org.junit.jupiter.params.provider.ValueSource; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import jcifs.CIFSException; /** * Tests for SMBProtocolDecodingException covering all constructors and observable behavior. */ @ExtendWith(MockitoExtension.class) public class SMBProtocolDecodingExceptionTest { @Mock Throwable mockCause; @TestRegistered: 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/smb1/dcerpc/ndr/NdrShortTest.java
/** * Verify that encode invokes NdrBuffer.enc_ndr_short via a mocked * (spied) buffer. */ @Test void encodeWithSpiedBufferCallsEncMethod() throws NdrException { NdrShort ns = new NdrShort(42); NdrBuffer spy = spy(new NdrBuffer(new byte[10], 0)); ns.encode(spy); // NdrShort passes its value (already masked to 0xFF) to enc_ndr_short verify(spy).enc_ndr_short(42); }Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 5.1K bytes - Viewed (0)