Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 38 for isSMB2 (0.05 sec)

  1. src/test/java/jcifs/SmbTreeHandleTest.java

        }
    
        /**
         * Test for isSMB2() method.
         * Verifies that the method returns the correct SMB protocol version status.
         */
        @Test
        void testIsSMB2() {
            when(smbTreeHandle.isSMB2()).thenReturn(true);
            assertTrue(smbTreeHandle.isSMB2(), "isSMB2() should return true");
            when(smbTreeHandle.isSMB2()).thenReturn(false);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7.1K bytes
    - Viewed (0)
  2. src/test/java/jcifs/smb/SmbTransportInternalTest.java

        @Test
        @DisplayName("isSMB2 returns true/false and can throw")
        void isSMB2_variants() throws Exception {
            when(transport.isSMB2()).thenReturn(true, false);
            assertTrue(transport.isSMB2());
            assertFalse(transport.isSMB2());
            verify(transport, times(2)).isSMB2();
    
            doThrow(new SmbException("query failed")).when(transport).isSMB2();
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 12.1K bytes
    - Viewed (0)
  3. src/test/java/jcifs/smb/SmbCopyUtilTest.java

        @Nested
        class CopyFileExceptions {
    
            private SmbTreeHandleImpl newTreeHandle(boolean isSmb2) throws Exception {
                SmbTreeHandleImpl th = mock(SmbTreeHandleImpl.class);
                lenient().when(th.isSMB2()).thenReturn(isSmb2);
                return th;
            }
    
            private CIFSContext ctxWithIgnore(boolean ignore) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.1K bytes
    - Viewed (0)
  4. src/main/java/jcifs/smb/SmbTreeImpl.java

                // and send it as a separate request instead
                String svc = null;
                final int t = this.tid;
                request.setTid(t);
    
                if (!transport.isSMB2()) {
                    final ServerMessageBlock req = (ServerMessageBlock) request;
                    svc = this.service;
                    if (svc == null) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 30K bytes
    - Viewed (0)
  5. src/test/java/jcifs/DialectVersionTest.java

            assertFalse(DialectVersion.SMB1.isSMB2());
    
            // SMB2+ versions should be identified as SMB2
            assertTrue(DialectVersion.SMB202.isSMB2());
            assertTrue(DialectVersion.SMB210.isSMB2());
            assertTrue(DialectVersion.SMB300.isSMB2());
            assertTrue(DialectVersion.SMB302.isSMB2());
            assertTrue(DialectVersion.SMB311.isSMB2());
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7.1K bytes
    - Viewed (0)
  6. src/test/java/jcifs/smb/SmbFileOutputStreamTest.java

            lenient().when(mockTreeHandle.getConfig()).thenReturn(mockConfig);
        }
    
        @Test
        void testWriteSingleByte() throws IOException, CIFSException {
            // Given
            when(mockTreeHandle.isSMB2()).thenReturn(true);
            when(mockTreeHandle.getSendBufferSize()).thenReturn(65536);
            when(mockFileHandle.isValid()).thenReturn(false, true); // First false to trigger ensureOpen, then true
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.8K bytes
    - Viewed (0)
  7. src/test/java/jcifs/smb/SmbPipeInputStreamTest.java

        private SmbPipeInputStream newStreamWithInit(boolean smb2) throws CIFSException {
            when(handle.getPipe()).thenReturn(pipe);
            // init(th) behavior inside SmbFileInputStream constructor
            when(tree.isSMB2()).thenReturn(smb2);
            when(tree.getReceiveBufferSize()).thenReturn(4096);
            when(tree.getMaximumBufferSize()).thenReturn(65535);
            when(tree.hasCapability(anyInt())).thenReturn(false);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.9K bytes
    - Viewed (0)
  8. src/test/java/jcifs/smb/SmbTreeHandleImplTest.java

            verify(transport, times(4)).close();
        }
    
        @Test
        @DisplayName("isSMB2 true and exception fallback to false")
        void isSMB2Cases() throws Exception {
            // Happy path returns true; transport exception path returns false
            when(transport.isSMB2()).thenReturn(true);
            assertTrue(handle.isSMB2());
    
            reset(transport);
            when(session.getTransport()).thenReturn(transport);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14.4K bytes
    - Viewed (0)
  9. src/test/java/jcifs/smb/SmbPipeHandleInternalTest.java

            SmbPipeHandleImpl handle = newHandleWithBasicStubs(0, "\\\\pipe\\\\foo");
            when(pipe.ensureTreeConnected()).thenReturn(tree);
            when(tree.acquire()).thenReturn(tree);
            when(tree.isSMB2()).thenReturn(true); // simplifies stream init
            when(tree.getReceiveBufferSize()).thenReturn(4096);
    
            // Act: first calls construct streams, second calls return cached
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 16.7K bytes
    - Viewed (0)
  10. src/test/java/jcifs/smb/SmbFileTest.java

                when(mockTreeHandle.getConfig()).thenReturn(mockConfig);
            }
    
            @Test
            void testExists() throws SmbException, CIFSException {
                // Arrange
                when(mockTreeHandle.isSMB2()).thenReturn(false);
                SmbComQueryInformationResponse response = mock(SmbComQueryInformationResponse.class);
                when(response.getAttributes()).thenReturn(SmbConstants.ATTR_NORMAL);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.8K bytes
    - Viewed (0)
Back to top