Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 317 for Unwrap (1.26 sec)

  1. 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: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7K bytes
    - Viewed (0)
  2. 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: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 2.5K bytes
    - Viewed (0)
  3. 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: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 1.8K bytes
    - Viewed (0)
  4. 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: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 3K bytes
    - Viewed (0)
  5. 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: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 1.7K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/primitives/PrimitivesTest.java

      }
    
      public void testWrap() {
        assertThat(Primitives.wrap(int.class)).isEqualTo(Integer.class);
        assertThat(Primitives.wrap(Integer.class)).isEqualTo(Integer.class);
        assertThat(Primitives.wrap(String.class)).isEqualTo(String.class);
      }
    
      public void testUnwrap() {
        assertThat(Primitives.unwrap(Integer.class)).isEqualTo(int.class);
        assertThat(Primitives.unwrap(int.class)).isEqualTo(int.class);
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Dec 11 20:07:52 UTC 2025
    - 3K bytes
    - Viewed (0)
  7. src/main/java/jcifs/Address.java

     *
     * @author mbechler
     *
     */
    public interface Address {
    
        /**
         * Unwrap the address to a specific type
         *
         * @param <T> the type to unwrap to
         * @param type the target type to unwrap to
         * @return instance for type, null if the type cannot be unwrapped
         */
        <T extends Address> T unwrap(Class<T> type);
    
        /**
         * Gets the host name of this address.
         *
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 2.2K bytes
    - Viewed (0)
  8. src/test/java/jcifs/smb/SmbTransportImplTest.java

        }
    
        @Test
        @DisplayName("unwrap returns this for compatible types and throws otherwise")
        void unwrapBehavior() {
            // Happy paths
            SmbTransport asIface = transport.unwrap(SmbTransport.class);
            assertSame(transport, asIface);
            SmbTransportInternal asInternal = transport.unwrap(SmbTransportInternal.class);
            assertSame(transport, asInternal);
    
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 17.6K bytes
    - Viewed (0)
  9. src/main/java/jcifs/Credentials.java

     * @author mbechler
     *
     */
    public interface Credentials {
    
        /**
         * Unwrap credentials to a specific type.
         *
         * @param <T> the credential type to unwrap to
         * @param type the class of the credential type to unwrap to
         * @return instance for type, null if the type cannot be unwrapped
         */
        <T extends Credentials> T unwrap(Class<T> type);
    
        /**
         * Get the domain of the user account.
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 1.6K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/primitives/Primitives.java

       * returns {@code type} itself. Idempotent.
       *
       * <pre>
       *     unwrap(Integer.class) == int.class
       *     unwrap(int.class) == int.class
       *     unwrap(String.class) == String.class
       * </pre>
       */
      public static <T> Class<T> unwrap(Class<T> type) {
        checkNotNull(type);
    
        // cast is safe: long.class and Long.class are both of type Class<Long>
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Sat Dec 28 01:26:26 UTC 2024
    - 4.8K bytes
    - Viewed (0)
Back to top