- Sort Score
- Result 10 results
- Languages All
Results 121 - 130 of 239 for thenReturn (0.08 sec)
-
src/test/java/jcifs/smb1/smb1/NtlmContextTest.java
// Test the second step (processing Type 2 and creating Type 3 message) when(mockAuth.getDomain()).thenReturn(domain); when(mockAuth.getUsername()).thenReturn(username); when(mockAuth.getPassword()).thenReturn(password); NtlmContext context = new NtlmContext(mockAuth, true); // State 1: Generate Type 1 message
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 8.9K bytes - Viewed (0) -
src/test/java/jcifs/SmbPipeHandleTest.java
smbPipeHandle = mock(SmbPipeHandle.class); // Define behavior for the mock handle when(smbPipeHandle.getPipe()).thenReturn(mockPipeResource); when(smbPipeHandle.getInput()).thenReturn(mockInputStream); when(smbPipeHandle.getOutput()).thenReturn(mockOutputStream); } /** * Tests that the getter for the underlying pipe resource returns the correct instance. */ @Test
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/SmbSessionTest.java
SmbSession unwrapResult = mock(SmbSession.class); when(mockSession.getConfig()).thenReturn(mockConfig); when(mockSession.getContext()).thenReturn(mockContext); when(mockSession.unwrap(SmbSession.class)).thenReturn(unwrapResult); doNothing().when(mockSession).close(); assertEquals(mockConfig, mockSession.getConfig());
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 15.1K bytes - Viewed (0) -
src/test/java/jcifs/smb1/smb1/DosFileFilterTest.java
when(file.getAttributes()).thenReturn(SmbFile.ATTR_NORMAL); assertTrue(filter.accept(file), "Attributes match should be accepted"); verify(file, times(1)).getAttributes(); } @Test public void testAcceptReturnsFalseWhenAttributesDoNotMatch() throws Exception { SmbFile file = mock(SmbFile.class); when(file.getAttributes()).thenReturn(SmbFile.ATTR_HIDDEN);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 1.8K bytes - Viewed (0) -
src/test/java/jcifs/smb1/smb1/AllocInfoTest.java
* implementation. */ @Test @DisplayName("verify getters return stubbed values") void testGettersHappyPath() { when(mockAllocInfo.getCapacity()).thenReturn(1000L); when(mockAllocInfo.getFree()).thenReturn(400L); assertEquals(1000L, mockAllocInfo.getCapacity(), "capacity should match stubbed value"); assertEquals(400L, mockAllocInfo.getFree(), "free space should match stubbed value");Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 2.4K bytes - Viewed (0) -
src/test/java/jcifs/smb/PreauthIntegrityTest.java
void setUp() throws Exception { when(context.getConfig()).thenReturn(config); when(config.isSigningEnforced()).thenReturn(false); when(config.getSessionTimeout()).thenReturn(30_000); when(config.getResponseTimeout()).thenReturn(5_000); when(address.getHostAddress()).thenReturn("127.0.0.1"); when(address.getHostName()).thenReturn("testhost");
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 30 05:58:03 UTC 2025 - 10.5K bytes - Viewed (0) -
src/test/java/jcifs/internal/fscc/BasicFileInformationTest.java
// Given when(mockBasicFileInfo.getAttributes()).thenReturn(TEST_ATTRIBUTES); when(mockBasicFileInfo.getCreateTime()).thenReturn(TEST_CREATE_TIME); when(mockBasicFileInfo.getLastWriteTime()).thenReturn(TEST_LAST_WRITE_TIME); when(mockBasicFileInfo.getLastAccessTime()).thenReturn(TEST_LAST_ACCESS_TIME); when(mockBasicFileInfo.getSize()).thenReturn(1024L);Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 13K bytes - Viewed (0) -
src/test/java/jcifs/smb1/smb1/SmbFileFilterTest.java
class HappyPath { @Test void acceptWithMockedFile() throws Exception { SmbFile mockFile = mock(SmbFile.class); when(mockFile.getPath()).thenReturn("/share/file.txt"); assertTrue(ALWAYSACTIVE.accept(mockFile)); } } @Nested @DisplayName("Invalid input – null file handling") class InvalidPath { @TestRegistered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 3.2K bytes - Viewed (0) -
src/test/java/jcifs/pac/kerberos/KerberosRelevantAuthDataTest.java
mockedStaticAuthData.when(() -> KerberosAuthData.parse(eq(1), eq(new byte[] { 0x01 }), any(Map.class))) .thenReturn(Collections.singletonList(mockAuthData1)); mockedStaticAuthData.when(() -> KerberosAuthData.parse(eq(2), eq(new byte[] { 0x02 }), any(Map.class))) .thenReturn(Collections.singletonList(mockAuthData2)); // Construct a token with two authorization entries
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 9K bytes - Viewed (0) -
src/test/java/jcifs/smb/CriticalPerformanceTest.java
Mockito.when(mockContext.getConfig()).thenReturn(mockConfig); Mockito.when(mockContext.getCredentials()).thenReturn(mockCredentials); // Mock CredentialsInternal for session tests jcifs.smb.CredentialsInternal mockCredentialsInternal = Mockito.mock(jcifs.smb.CredentialsInternal.class); Mockito.when(mockCredentials.unwrap(jcifs.smb.CredentialsInternal.class)).thenReturn(mockCredentialsInternal);Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 15.3K bytes - Viewed (0)