Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 108 for unwrap (0.12 sec)

  1. src/test/java/jcifs/dcerpc/DcerpcSecurityProviderTest.java

            // Configure the mock to throw DcerpcException when unwrap is called
            doThrow(new DcerpcException("Test unwrap exception")).when(dcerpcSecurityProvider).unwrap(mockNdrBuffer);
    
            // Assert that calling unwrap throws DcerpcException
            assertThrows(DcerpcException.class, () -> dcerpcSecurityProvider.unwrap(mockNdrBuffer));
    
            // Verify that the unwrap method was called exactly once
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 2.5K bytes
    - Viewed (0)
  2. src/test/java/jcifs/SmbTreeTest.java

            when(smbTree.unwrap(CustomSmbTree.class)).thenReturn(null);
    
            CustomSmbTree result = smbTree.unwrap(CustomSmbTree.class);
    
            assertEquals(null, result, "Should return null when type cannot be unwrapped");
            verify(smbTree).unwrap(CustomSmbTree.class);
        }
    
        /**
         * Test for unwrap() method throwing exception.
         * Verifies that unwrap can throw exceptions when appropriate.
         */
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.2K bytes
    - Viewed (0)
  3. src/main/java/jcifs/SmbPipeHandle.java

         */
        boolean isStale();
    
        /**
         * Unwraps this handle to the specified type.
         *
         * @param <T> the type to unwrap to
         * @param type the class of the type to unwrap to
         * @return unwrapped instance
         */
        <T extends SmbPipeHandle> T unwrap(Class<T> type);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 2.4K bytes
    - Viewed (0)
  4. src/main/java/jcifs/SmbTree.java

     * @author mbechler
     *
     */
    public interface SmbTree extends AutoCloseable {
    
        /**
         * Unwraps the tree instance to the specified type
         * @param <T> the target tree type
         * @param type the class of the tree type to unwrap to
         * @return tree instance with the given type
         */
        <T extends SmbTree> T unwrap(Class<T> type);
    
        /**
         * {@inheritDoc}
         *
         * @see java.lang.AutoCloseable#close()
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 1.3K bytes
    - Viewed (0)
  5. src/test/java/jcifs/smb/SmbTreeInternalTest.java

            verify(tree).send(request, param);
        }
    
        @Test
        @DisplayName("unwrap and close are available via SmbTree")
        void unwrap_and_close_interactions() {
            // Arrange
            when(tree.unwrap(SmbTreeInternal.class)).thenReturn(tree);
    
            // Act
            SmbTree unwrapped = tree.unwrap(SmbTreeInternal.class);
            tree.close();
    
            // Assert
            assertNotNull(unwrapped);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.6K bytes
    - Viewed (0)
  6. src/test/java/jcifs/SmbPipeHandleTest.java

                assertSame(mockSmbPipeHandleInternal, unwrapped, "Unwrap should return the underlying handle implementation.");
            }
    
            /**
             * Verifies that unwrap returns null if the requested type is not available.
             */
            @Test
            public void testUnwrap_ReturnsNullForUnsupportedType() {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7K bytes
    - Viewed (0)
  7. src/test/java/jcifs/CredentialsTest.java

            assertDoesNotThrow(() -> {
                mockCredentials.unwrap(Credentials.class);
                mockCredentials.getUserDomain();
                mockCredentials.isAnonymous();
                mockCredentials.isGuest();
            });
        }
    
        @Test
        @DisplayName("Should unwrap to correct type")
        void testUnwrap() {
            // Given
            when(mockCredentials.unwrap(Credentials.class)).thenReturn(mockCredentials);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 2.5K bytes
    - Viewed (0)
  8. src/main/java/jcifs/SmbSession.java

         */
        Configuration getConfig();
    
        /**
         * Unwraps this session to the specified type, allowing access to implementation-specific functionality.
         *
         * @param <T> the type to unwrap to
         * @param type the class of the type to unwrap to
         * @return session instance with the given type
         */
        <T extends SmbSession> T unwrap(Class<T> type);
    
        /**
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 1.7K bytes
    - Viewed (0)
  9. src/test/java/jcifs/SmbTransportTest.java

        @Test
        void testUnwrap() {
            // Arrange
            SmbTransport mockUnwrappedTransport = smbTransport; // Mocking unwrap to return itself for simplicity
            when(smbTransport.unwrap(SmbTransport.class)).thenReturn(mockUnwrappedTransport);
    
            // Act
            SmbTransport result = smbTransport.unwrap(SmbTransport.class);
    
            // Assert
            assertNotNull(result, "Unwrapped transport should not be null");
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 3K bytes
    - Viewed (0)
  10. src/main/java/jcifs/SmbTransport.java

         */
        CIFSContext getContext();
    
        /**
         * Unwraps the transport to the specified type.
         *
         * @param <T> the type to unwrap to
         * @param type the class of the transport type to unwrap
         * @return transport instance with the given type
         */
        <T extends SmbTransport> T unwrap(Class<T> type);
    
        /**
         *
         * {@inheritDoc}
         *
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 1.8K bytes
    - Viewed (0)
Back to top