Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 394 for mocked (0.06 sec)

  1. 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: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.1K bytes
    - Viewed (0)
  2. src/test/java/jcifs/smb/FileEntryTest.java

    import org.junit.jupiter.params.provider.MethodSource;
    import org.mockito.InOrder;
    import org.mockito.Mock;
    import org.mockito.junit.jupiter.MockitoExtension;
    
    @ExtendWith(MockitoExtension.class)
    class FileEntryTest {
    
        @Mock
        FileEntry mockEntry;
    
        // Simple fake implementation to exercise the interface without mocks
        private static final class TestFileEntry implements FileEntry {
            private final String name;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 10K bytes
    - Viewed (0)
  3. src/test/java/jcifs/smb1/smb1/SmbSessionTest.java

     */
    @ExtendWith(MockitoExtension.class)
    public class SmbSessionTest {
    
        @Mock
        UniAddress addr;
        @Mock
        InetAddress inet;
        NtlmPasswordAuthentication auth;
        @Mock
        SmbTransport transport;
    
        // static helper that returns the mocked transport. The real class
        // performs several other operations, but for the purpose of the test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.6K bytes
    - Viewed (0)
  4. src/test/java/jcifs/SmbSessionTest.java

            }
        }
    
        @Nested
        @DisplayName("Mock Interaction Tests")
        class MockInteractionTest {
    
            @Test
            @DisplayName("Should allow all methods to be mocked independently")
            void shouldAllowAllMethodsToBeMockedIndependently() throws Exception {
                SmbSession mockSession = mock(SmbSession.class);
                Configuration mockConfig = mock(Configuration.class);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.1K bytes
    - Viewed (0)
  5. src/test/java/jcifs/dcerpc/DcerpcPipeHandleTest.java

    class DcerpcPipeHandleTest {
    
        @Mock
        private CIFSContext mockContext;
        @Mock
        private SmbNamedPipe mockSmbNamedPipe;
        @Mock
        private SmbPipeHandleInternal mockSmbPipeHandleInternal;
        @Mock
        private DcerpcBinding mockDcerpcBinding;
        @Mock
        private SmbResourceLocator mockSmbResourceLocator;
        @Mock
        private SmbPipeHandle mockSmbPipeHandle;
        @Mock
        private BufferCache mockBufferCache;
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 21K bytes
    - Viewed (0)
  6. src/test/java/jcifs/smb/SmbTreeHandleInternalTest.java

            verify(handle).areSignaturesActive();
        }
    
        @Test
        @DisplayName("getSession(): returns the mocked SmbSession instance")
        void getSession_returnsMock() {
            // Arrange
            SmbSession session = mock(SmbSession.class);
            when(handle.getSession()).thenReturn(session);
    
            // Act
            SmbSession result = handle.getSession();
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.3K bytes
    - Viewed (0)
  7. src/test/java/jcifs/smb/Kerb5ContextTest.java

    import org.mockito.Mock;
    import org.mockito.MockedStatic;
    import org.mockito.junit.jupiter.MockitoExtension;
    
    import jcifs.CIFSException;
    import jcifs.spnego.NegTokenInit;
    
    @ExtendWith(MockitoExtension.class)
    class Kerb5ContextTest {
    
        @Mock
        private GSSManager gssManager;
    
        @Mock
        private GSSContext gssContext;
    
        @Mock
        private GSSName serviceName;
    
        @Mock
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 14.2K bytes
    - Viewed (0)
  8. src/test/java/jcifs/smb/SmbTransportPoolImplTest.java

    class SmbTransportPoolImplTest {
    
        private SmbTransportPoolImpl pool;
    
        @Mock
        private CIFSContext ctx;
        @Mock
        private Configuration config;
        @Mock
        private NameServiceClient nameSvc;
        @Mock
        private Credentials creds;
        @Mock
        private Address address;
        @Mock
        private SmbNegotiationResponse negotiationResponse;
    
        @BeforeEach
        void setUp() {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 19.2K bytes
    - Viewed (0)
  9. src/test/java/jcifs/smb1/util/transport/TransportExceptionTest.java

            @DisplayName("Should handle circular reference in root cause")
            void testCircularReferenceInRootCause() {
                // Create a mock exception that could have circular reference
                Exception rootCause = mock(Exception.class);
                when(rootCause.getMessage()).thenReturn("Mocked exception");
    
                TransportException exception = new TransportException("Test", rootCause);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.5K bytes
    - Viewed (0)
  10. src/test/java/jcifs/smb/DirFileEntryAdapterIteratorTest.java

     * scenarios that don't require complex filter setups.
     */
    @ExtendWith(MockitoExtension.class)
    class DirFileEntryAdapterIteratorTest {
    
        @Mock
        private SmbResource mockParent;
    
        @Mock
        private CloseableIterator<FileEntry> mockDelegate;
    
        @Mock
        private ResourceFilter mockFilter;
    
        @Mock
        private FileEntry mockFileEntry1;
    
        @Mock
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 14.4K bytes
    - Viewed (0)
Back to top