- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for mockable (0.84 sec)
-
src/test/java/jcifs/smb1/smb1/SmbComSessionSetupAndXTest.java
private SmbComSessionSetupAndX setupAndX; @BeforeEach void setUp() throws Exception { MockitoAnnotations.openMocks(this); // Create a real ServerData instance as it's not mockable (inner class) SmbTransport.ServerData serverData = mockTransport.new ServerData(); serverData.security = ServerMessageBlock.SECURITY_USER; serverData.encryptedPasswords = true;Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 4.5K 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: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 3.2K bytes - Viewed (0) -
src/test/java/jcifs/smb/DosFileFilterTest.java
dosFileFilter = new DosFileFilter("*.*", filterAttributes); // and a mock SmbFile with specific attributes when(mockFile.getAttributes()).thenReturn(fileAttributes); // When the accept method is called boolean result = dosFileFilter.accept(mockFile); // Then the result should be as expected if (expectedResult) { assertTrue(result, "File should be accepted");
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 6.2K bytes - Viewed (0) -
src/test/java/jcifs/tests/persistent/HandleInfoTest.java
HandleInfo info = new HandleInfo("/test/file.txt", testGuid, testFileId, HandleType.DURABLE_V2, 120000, null); assertNull(info.getFile()); Object mockFile = new Object(); info.setFile(mockFile); assertEquals(mockFile, info.getFile()); } @Test public void testToString() {
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 21 04:51:33 UTC 2025 - 4.6K bytes - Viewed (0)