Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 23 for SmbTransport (0.54 sec)

  1. src/main/java/jcifs/SmbTransport.java

     */
    package jcifs;
    
    /**
     * Opaque reference to a SMB transport
     *
     * @author mbechler
     *
     * <p>This interface is intended for internal use.</p>
     */
    public interface SmbTransport extends AutoCloseable {
    
        /**
         * Gets the CIFS context associated with this transport.
         *
         * @return the context this transport is attached to
         */
        CIFSContext getContext();
    
        /**
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 1.8K bytes
    - Viewed (0)
  2. src/test/java/jcifs/SmbTransportTest.java

            when(smbTransport.unwrap(SmbTransport.class)).thenReturn(mockUnwrappedTransport);
    
            // Act
            SmbTransport result = smbTransport.unwrap(SmbTransport.class);
    
            // Assert
            assertNotNull(result, "Unwrapped transport should not be null");
            assertEquals(mockUnwrappedTransport, result, "Returned unwrapped transport should be the mocked one");
    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/smb1/DfsTest.java

        @Mock
        private SmbTransport smbTransport;
    
        @Mock
        private UniAddress uniAddress;
    
        @Mock
        private DfsReferral dfsReferral;
    
        private Dfs dfs;
        private TestDfs testDfs;
    
        private MockedStatic<LogStream> logStreamMockedStatic;
        private MockedStatic<UniAddress> uniAddressMockedStatic;
        private MockedStatic<SmbTransport> smbTransportMockedStatic;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.6K bytes
    - Viewed (0)
  4. src/test/java/jcifs/smb1/smb1/SmbSessionTest.java

            // Configure the mock transport with the server data
            transport.server = serverData;
    
            smbtStatic = mockStatic(SmbTransport.class);
            smbtStatic.when(() -> SmbTransport.getSmbTransport(addr, 445, inet, 0, null)).thenReturn(transport);
            smbtStatic.when(() -> SmbTransport.getSmbTransport(addr, 445)).thenReturn(transport);
        }
    
        @AfterEach
        void tearDown() {
            if (smbtStatic != null) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.6K bytes
    - Viewed (0)
  5. src/test/java/jcifs/smb1/smb1/SmbConstantsTest.java

        }
    
        /**
         * Test interaction with SmbTransport using Mockito.
         * This demonstrates mocking capabilities for testing.
         */
        @Test
        @DisplayName("Mock interaction example with SmbTransport")
        void mockTransportInteraction() {
            // Create a mock of SmbTransport from jcifs package
            jcifs.SmbTransport mock = mock(jcifs.SmbTransport.class);
            // Stub the getRemoteHostName method
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.2K bytes
    - Viewed (0)
  6. src/test/java/jcifs/smb1/smb1/SmbRandomAccessFileTest.java

        private SmbSession smbSession;
        private SmbTransport smbTransport;
        private SmbRandomAccessFile smbRandomAccessFile;
    
        @BeforeEach
        void setUp() throws MalformedURLException, UnknownHostException, SmbException {
            // Mock the transport layer
            smbTransport = mock(SmbTransport.class);
            smbTransport.rcv_buf_size = 4096;
            smbTransport.snd_buf_size = 4096;
    
            // Mock the session layer
    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/main/java/jcifs/SmbTransportPool.java

         */
        SmbTransport getSmbTransport(CIFSContext tc, Address address, int port, InetAddress localAddr, int localPort, String hostName,
                boolean exclusive, boolean forceSigning);
    
        /**
         * Removes a transport from the pool.
         *
         * @param trans the transport to remove
         */
        void removeTransport(SmbTransport trans);
    
        /**
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 7.5K bytes
    - Viewed (0)
  8. src/test/java/jcifs/internal/smb2/multichannel/ChannelLoadBalancerTest.java

    @ExtendWith(MockitoExtension.class)
    class ChannelLoadBalancerTest {
    
        @Mock
        private ChannelManager mockChannelManager;
    
        @Mock
        private SmbTransport mockTransport1;
    
        @Mock
        private SmbTransport mockTransport2;
    
        @Mock
        private CommonServerMessageBlock mockMessage;
    
        private ChannelLoadBalancer loadBalancer;
        private ChannelInfo channel1;
        private ChannelInfo channel2;
    
        @BeforeEach
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 23 05:11:12 UTC 2025
    - 7.7K bytes
    - Viewed (0)
  9. src/test/java/jcifs/smb/SmbSessionInternalTest.java

    import org.mockito.ArgumentCaptor;
    import org.mockito.Mock;
    import org.mockito.Mockito;
    import org.mockito.junit.jupiter.MockitoExtension;
    
    import jcifs.CIFSException;
    import jcifs.SmbTransport;
    import jcifs.SmbTree;
    
    /**
     * Tests for SmbSessionInternal interface using Mockito to exercise
     * method contracts, checked exceptions, and interactions with collaborators.
     */
    @ExtendWith(MockitoExtension.class)
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 6.8K bytes
    - Viewed (0)
  10. src/main/java/jcifs/smb/SmbSessionInternal.java

     * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     */
    package jcifs.smb;
    
    import jcifs.CIFSException;
    import jcifs.SmbSession;
    import jcifs.SmbTransport;
    import jcifs.SmbTree;
    
    /**
     * Internal SMB session interface providing extended session management capabilities.
     * Defines methods for internal session operations and state management.
     *
     * @author mbechler
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 2.3K bytes
    - Viewed (0)
Back to top