Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 1,154 for Handle (0.23 sec)

  1. src/main/java/jcifs/smb/SmbPipeInputStream.java

        private final SmbPipeHandleImpl handle;
    
        /**
         * @param handle
         * @param th
         * @throws SmbException
         */
        SmbPipeInputStream(final SmbPipeHandleImpl handle, final SmbTreeHandleImpl th) throws CIFSException {
            super(handle.getPipe(), th, null);
            this.handle = handle;
        }
    
        /**
         * Ensures that the tree connection is established.
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 3.8K bytes
    - Viewed (0)
  2. src/test/java/jcifs/smb/SmbCopyUtilTest.java

            SmbFileHandleImpl handle = mock(SmbFileHandleImpl.class);
            when(dest.openUnshared(anyInt(), anyInt(), anyInt(), anyInt(), anyInt())).thenReturn(handle);
    
            int attrs = SmbConstants.ATTR_NORMAL;
    
            // Act
            SmbFileHandleImpl result = SmbCopyUtil.openCopyTargetFile(dest, attrs, alsoRead);
    
            // Assert
            assertSame(handle, result, "Should return handle from dest.openUnshared");
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.1K bytes
    - Viewed (0)
  3. src/test/java/jcifs/NetbiosNameTest.java

        @DisplayName("Should handle various NetBIOS name types")
        void testVariousNameTypes(int nameType) {
            // Given
            when(mockNetbiosName.getNameType()).thenReturn(nameType);
    
            // When
            int result = mockNetbiosName.getNameType();
    
            // Then
            assertEquals(nameType, result);
        }
    
        @Test
        @DisplayName("Should handle null name")
        void testNullName() {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 8K bytes
    - Viewed (0)
  4. src/main/java/jcifs/dcerpc/msrpc/LsaPolicyHandle.java

    import jcifs.smb.SmbException;
    
    /**
     * LSA policy handle for Local Security Authority operations.
     */
    public class LsaPolicyHandle extends rpc.policy_handle implements AutoCloseable {
    
        private final DcerpcHandle handle;
        private boolean opened;
    
        /**
         * Constructs an LSA policy handle.
         *
         * @param handle the DCERPC handle
         * @param server the server name
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 2.3K bytes
    - Viewed (0)
  5. src/test/java/jcifs/internal/smb2/Smb2SigningDigestTest.java

                try {
                    digest.verify(data, 0, data.length, 0, response);
                    // If no exception is thrown, verification should return false or handle gracefully
                    assertTrue(true, "Verify operation after close should either throw exception or handle gracefully");
                } catch (RuntimeException e) {
                    // Accept runtime exceptions that might be thrown due to closed state
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 43.7K bytes
    - Viewed (0)
  6. src/test/java/jcifs/dcerpc/ndr/NdrShortTest.java

            }
    
            @Test
            @DisplayName("Should handle zero value correctly")
            void testConstructorZero() {
                // Given/When: Creating NdrShort with zero
                NdrShort ndrShort = new NdrShort(0);
    
                // Then: Value should be zero
                assertEquals(0, ndrShort.value);
            }
    
            @Test
            @DisplayName("Should handle maximum byte value correctly")
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.2K bytes
    - Viewed (0)
  7. src/test/java/jcifs/SmbPipeHandleTest.java

             */
            @Test
            public void testIsOpen_ReturnsTrueWhenOpen() {
                when(smbPipeHandle.isOpen()).thenReturn(true);
                assertTrue(smbPipeHandle.isOpen(), "isOpen() should return true when the handle is open.");
            }
    
            /**
             * Verifies that the isOpen method returns false for a closed handle.
             */
            @Test
    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/main/java/jcifs/dcerpc/DcerpcHandle.java

         * @param tc
         *            the CIFS context for this handle
         */
        public DcerpcHandle(final CIFSContext tc) {
            this.transportContext = tc;
            this.binding = null;
        }
    
        /**
         * Constructs a DcerpcHandle with the specified CIFS context and binding
         *
         * @param tc
         *            the CIFS context for this handle
         * @param binding
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 15.9K bytes
    - Viewed (0)
  9. src/test/java/jcifs/dcerpc/msrpc/SamrPolicyHandleTest.java

            SamrPolicyHandle handle = new SamrPolicyHandle(mockHandle, server, access);
            handle.close();
    
            // Verify close was called
            verify(mockHandle, times(1)).sendrecv(any(MsrpcSamrCloseHandle.class));
            assertEquals(handle, closeCaptor.getValue().handle); // Verify correct handle is passed
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7.4K bytes
    - Viewed (0)
  10. src/test/java/jcifs/smb/WinErrorTest.java

            }
        }
    
        // Simple collaborator to demonstrate interaction verification with Mockito
        interface Handler {
            void handle(int code, String message);
        }
    
        @Mock
        Handler handler;
    
        @Test
        @DisplayName("Interaction: handler called with each code/message pair")
        void interaction_with_mock_handler_is_as_expected() {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 8.4K bytes
    - Viewed (0)
Back to top