Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 300 for mocked (0.29 sec)

  1. src/test/java/jcifs/util/transport/RequestTest.java

            verify(mockRequest, times(1)).isCancel();
        }
    
        @Test
        void testIsCancelFalse() {
            // Test case for isCancel method when it returns false
            when(mockRequest.isCancel()).thenReturn(false);
    
            assertFalse(mockRequest.isCancel(), "isCancel should return false when mocked to do so.");
            verify(mockRequest, times(1)).isCancel();
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 3.6K bytes
    - Viewed (0)
  2. src/test/java/jcifs/SmbTransportTest.java

    import org.junit.jupiter.api.Test;
    import org.junit.jupiter.api.extension.ExtendWith;
    import org.mockito.Mock;
    import org.mockito.junit.jupiter.MockitoExtension;
    
    @ExtendWith(MockitoExtension.class)
    public class SmbTransportTest {
    
        @Mock
        private SmbTransport smbTransport;
    
        @Mock
        private CIFSContext cifsContext;
    
        @Mock
        private Address remoteAddress;
    
        @BeforeEach
        void setUp() {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 3K bytes
    - Viewed (0)
  3. src/test/java/jcifs/smb1/dcerpc/msrpc/samrTest.java

    @DisplayName("SMB1 SAMR Protocol Test Suite")
    class samrTest {
    
        @Mock
        private NdrBuffer mockNdrBuffer;
    
        @Mock
        private NdrBuffer mockDeferredBuffer;
    
        @Mock
        private rpc.policy_handle mockPolicyHandle;
    
        @Mock
        private rpc.sid_t mockSidT;
    
        @Mock
        private rpc.unicode_string mockUnicodeString;
    
        @Mock
        private lsarpc.LsarSidArray mockLsarSidArray;
    
        @BeforeEach
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 33.6K bytes
    - Viewed (0)
  4. src/test/java/jcifs/dcerpc/msrpc/samrTest.java

    @DisplayName("SAMR Protocol Test Suite")
    class samrTest {
    
        @Mock
        private NdrBuffer mockNdrBuffer;
    
        @Mock
        private NdrBuffer mockDeferredBuffer;
    
        @Mock
        private rpc.policy_handle mockPolicyHandle;
    
        @Mock
        private rpc.sid_t mockSidT;
    
        @Mock
        private rpc.unicode_string mockUnicodeString;
    
        @Mock
        private lsarpc.LsarSidArray mockLsarSidArray;
    
        @BeforeEach
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 33.7K bytes
    - Viewed (0)
  5. src/test/java/jcifs/pac/kerberos/KerberosRelevantAuthDataTest.java

         */
        @Test
        void testConstructor_ValidToken() throws IOException, PACDecodingException {
            // 1. GIVEN
            // Create a mock KerberosAuthData to be returned by the mocked parse method
            KerberosAuthData mockAuthData = mock(KerberosAuthData.class);
            mockedStaticAuthData.when(() -> KerberosAuthData.parse(anyInt(), any(byte[].class), any(Map.class)))
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9K bytes
    - Viewed (0)
  6. src/test/java/jcifs/smb/SmbSessionInternalTest.java

    @ExtendWith(MockitoExtension.class)
    public class SmbSessionInternalTest {
    
        @Mock
        private SmbSessionInternal session;
    
        @Mock
        private SmbTransport transport;
    
        @Mock
        private SmbTree tree;
    
        @BeforeEach
        void resetMocks() {
            Mockito.reset(session, transport, tree);
        }
    
        // Happy path: isInUse returns the mocked state
        @ParameterizedTest
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 6.8K bytes
    - Viewed (0)
  7. src/test/java/jcifs/pac/kerberos/KerberosCredentialsTest.java

         */
        @Test
        void testConstructor_Success() throws LoginException {
            try (MockedConstruction<LoginContext> mocked = Mockito.mockConstruction(LoginContext.class, (mock, context) -> {
                when(mock.getSubject()).thenReturn(subject);
                doNothing().when(mock).login();
            })) {
                KerberosCredentials credentials = new KerberosCredentials(LOGIN_CONTEXT_NAME);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7K bytes
    - Viewed (0)
  8. src/test/java/jcifs/smb/SMBSignatureValidationExceptionTest.java

            // Assert
            assertSame(mocked, ex.getCause(), "Mocked cause should be preserved");
            verifyNoInteractions(mocked);
        }
    
        // Reflection-based check: ensure serialVersionUID remains the declared constant
        @Test
        @DisplayName("serialVersionUID matches declared constant")
        void serialVersionUID_hasExpectedValue() throws Exception {
            // Arrange
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.3K bytes
    - Viewed (0)
  9. src/test/java/jcifs/dcerpc/ndr/NdrHyperTest.java

    import org.junit.jupiter.api.BeforeEach;
    import org.junit.jupiter.api.Test;
    import org.mockito.Mock;
    import org.mockito.MockitoAnnotations;
    
    class NdrHyperTest {
    
        @Mock
        private NdrBuffer mockNdrBuffer;
    
        @BeforeEach
        void setUp() {
            // Initialize mocks before each test
            MockitoAnnotations.openMocks(this);
        }
    
        @Test
        void testConstructorAndGetValue() {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 2.2K bytes
    - Viewed (0)
  10. 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: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.8K bytes
    - Viewed (0)
Back to top