Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for mockable (0.07 sec)

  1. 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: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.5K bytes
    - Viewed (0)
  2. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/concurrent/Lockable.kt

     * `wait()` and `notify()` functions.
     *
     * The Lockable interface is particularly handy because it ensures we lock the right `this` when
     * there are multiple `this` objects in scope.
     */
    interface Lockable
    
    internal inline fun Lockable.wait() = (this as Object).wait()
    
    internal inline fun Lockable.notify() = (this as Object).notify()
    
    internal inline fun Lockable.notifyAll() = (this as Object).notifyAll()
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed May 28 23:28:25 UTC 2025
    - 2.1K bytes
    - Viewed (0)
  3. 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 {
            @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 3.2K bytes
    - Viewed (0)
  4. 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: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 6.2K bytes
    - Viewed (0)
  5. 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: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 21 04:51:33 UTC 2025
    - 4.6K bytes
    - Viewed (0)
Back to top