Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 293 for Unwrap (0.06 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/test/java/jcifs/dcerpc/msrpc/MsrpcLookupSidsTest.java

            jcifs.SID mockSid2 = mock(jcifs.SID.class);
            jcifs.SID mockSid3 = mock(jcifs.SID.class);
            when(mockSid1.unwrap(sid_t.class)).thenReturn(mockSidT);
            when(mockSid2.unwrap(sid_t.class)).thenReturn(mockSidT);
            when(mockSid3.unwrap(sid_t.class)).thenReturn(mockSidT);
            testSids = new jcifs.SID[] { mockSid1, mockSid2, mockSid3 };
    
            // Act
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.6K bytes
    - Viewed (0)
  4. 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)
  5. src/test/java/jcifs/SmbSessionTest.java

                    assertTrue(SmbSession.class.isAssignableFrom((Class<?>) unwrapMethod.getReturnType()),
                            "unwrap method should return SmbSession or subtype");
                }, "unwrap(Class) method should be properly defined");
            }
    
            @Test
            @DisplayName("Should handle unwrap with SmbSession type")
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.1K bytes
    - Viewed (0)
  6. 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)
  7. 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)
  8. src/test/java/jcifs/smb/SmbPipeHandleImplTest.java

            target = new SmbPipeHandleImpl(pipe);
        }
    
        @Test
        @DisplayName("unwrap returns self for assignable type; throws for incompatible and null")
        void testUnwrap() {
            // Happy path: unwrap to concrete type
            SmbPipeHandleImpl unwrapped = target.unwrap(SmbPipeHandleImpl.class);
            assertSame(target, unwrapped);
    
            // Incompatible type: expect ClassCastException
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.7K bytes
    - Viewed (0)
  9. 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)
  10. src/test/java/jcifs/smb/CredentialsInternalTest.java

            // Act & Assert
            // unwrap to interface itself should return same instance
            CredentialsInternal unwrapped = creds.unwrap(CredentialsInternal.class);
            assertNotNull(unwrapped, "unwrap to CredentialsInternal returns instance");
            assertSame(creds, unwrapped, "unwrap returns the same object instance");
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.9K bytes
    - Viewed (0)
Back to top