- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for testUnwrap (0.07 sec)
-
android/guava-tests/test/com/google/common/primitives/PrimitivesTest.java
assertThat(Primitives.isWrapperType(void.class)).isFalse(); } public void testWrap() { assertThat(Primitives.wrap(int.class)).isSameInstanceAs(Integer.class); assertThat(Primitives.wrap(Integer.class)).isSameInstanceAs(Integer.class); assertThat(Primitives.wrap(String.class)).isSameInstanceAs(String.class); } public void testUnwrap() { assertThat(Primitives.unwrap(Integer.class)).isSameInstanceAs(int.class);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 3K bytes - Viewed (0) -
src/test/java/jcifs/SmbTransportTest.java
assertEquals(cifsContext, result, "Returned context should be the mocked context"); verify(smbTransport).getContext(); // Verify that the method was called } @Test void testUnwrap() { // Arrange SmbTransport mockUnwrappedTransport = smbTransport; // Mocking unwrap to return itself for simplicity when(smbTransport.unwrap(SmbTransport.class)).thenReturn(mockUnwrappedTransport);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 3K bytes - Viewed (0) -
src/test/java/jcifs/CredentialsTest.java
mockCredentials.isAnonymous(); mockCredentials.isGuest(); }); } @Test @DisplayName("Should unwrap to correct type") void testUnwrap() { // Given when(mockCredentials.unwrap(Credentials.class)).thenReturn(mockCredentials); // When Credentials unwrapped = mockCredentials.unwrap(Credentials.class); // Then
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 2.5K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbTreeImplTest.java
SmbTreeImpl tree3 = new SmbTreeImpl(session, "OTHER", "A:"); assertEquals(tree1, tree2); assertFalse(tree1.equals(tree3)); } // Test case for the unwrap method @Test void testUnwrap() { SmbTreeImpl tree = new SmbTreeImpl(session, "SHARE", "A:"); SmbTreeImpl unwrapped = tree.unwrap(SmbTreeImpl.class); assertEquals(tree, unwrapped);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 7.8K bytes - Viewed (0) -
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) -
src/test/java/jcifs/SmbPipeHandleTest.java
*/ @Nested public class UnwrapFunctionalityTest { /** * Verifies that unwrap returns the expected underlying object. */ @Test public void testUnwrap() { when(smbPipeHandle.unwrap(SmbPipeHandleInternal.class)).thenReturn(mockSmbPipeHandleInternal); SmbPipeHandleInternal unwrapped = smbPipeHandle.unwrap(SmbPipeHandleInternal.class);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 7K bytes - Viewed (0) -
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) -
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) -
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) -
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)