Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for testUnwrap (0.04 sec)

  1. 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);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.7K bytes
    - Viewed (0)
  2. src/test/java/jcifs/smb/SmbSessionImplTest.java

            verify(tree, times(1)).close();
        }
    
        @Test
        @DisplayName("unwrap: returns self for compatible type and throws for incompatible")
        @SuppressWarnings({ "rawtypes", "unchecked" })
        void testUnwrap() {
            SmbSessionImpl session = newSession();
    
            // Happy path: ask for SmbSession and SmbSessionInternal
            assertSame(session, session.unwrap(SmbSessionInternal.class));
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.5K bytes
    - Viewed (0)
  3. src/test/java/jcifs/smb/SIDTest.java

                assertEquals("alice", sid.getAccountName());
            }
    
            @Test
            @DisplayName("unwrap returns this for assignable type; otherwise throws ClassCastException")
            void testUnwrap() throws Exception {
                SID sid = new SID("S-1-5-21-1");
                // Happy path
                assertSame(sid, sid.unwrap(SID.class));
                assertSame(sid, sid.unwrap(Object.class));
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.8K bytes
    - Viewed (0)
  4. src/test/java/jcifs/SIDTest.java

            assertEquals("Domain group", sid.getTypeText());
        }
    
        /**
         * Test the unwrap method.
         *
         * @throws SmbException if the SID string is invalid
         */
        @Test
        void testUnwrap() throws SmbException {
            SID sid = new SID(adminSidString);
            SID unwrapped = sid.unwrap(SID.class);
            assertNotNull(unwrapped);
            assertEquals(sid, unwrapped);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 13.5K bytes
    - Viewed (0)
  5. src/test/java/jcifs/netbios/NbtAddressTest.java

            assertFalse(nbtAddress.isActive(mockContext));
            assertTrue(nbtAddress.isPermanent(mockContext));
            assertArrayEquals(testMacAddress, nbtAddress.getMacAddress(mockContext));
        }
    
        @Test
        void testUnwrap() {
            // Test unwrap method for correct type casting
            mockName = new Name(mockConfig, "TEST", 0x20, null);
            NbtAddress nbtAddress = new NbtAddress(mockName, testAddressInt, false, NbtAddress.H_NODE);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.4K bytes
    - Viewed (0)
Back to top