Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 19 for mockable (1.08 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/smb/SmbFileOutputStreamTest.java

            // Mock for ensureOpen to reopen file
            when(mockFile.openUnshared(anyInt(), anyInt(), anyInt(), anyInt(), anyInt())).thenReturn(mockFileHandle);
    
            when(mockTreeHandle.send(any(Smb2WriteRequest.class), any())).thenReturn(mockWriteResponse);
            when(mockWriteResponse.getCount()).thenReturn(1);
    
            outputStream = new SmbFileOutputStream(mockFile, mockTreeHandle, mockFileHandle,
    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/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)
  5. 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)
  6. 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)
  7. src/test/java/jcifs/smb/SmbFileInputStreamTest.java

    import jcifs.internal.smb2.io.Smb2ReadResponse;
    
    @ExtendWith(MockitoExtension.class)
    @MockitoSettings(strictness = Strictness.LENIENT)
    class SmbFileInputStreamTest {
    
        @Mock
        SmbFile mockFile;
    
        @Mock
        SmbTreeHandleImpl mockTree;
    
        @Mock
        SmbFileHandleImpl mockHandle;
    
        @Mock
        Configuration mockConfig;
    
        private SmbFileInputStream newStream() throws SmbException {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 12.8K bytes
    - Viewed (0)
  8. src/test/java/jcifs/SmbResourceTest.java

                assertEquals(1, shareSecurity.length, "Should return expected number of ACEs");
                assertSame(mockACE, security1[0], "Should return expected ACE");
                assertSame(mockACE, security2[0], "Should return expected ACE");
                assertSame(mockACE, shareSecurity[0], "Should return expected ACE");
            }
        }
    
        @Nested
        @DisplayName("JCIFS Specification Compliance Tests")
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 35K bytes
    - Viewed (0)
  9. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http2/Http2Writer.kt

     */
    package okhttp3.internal.http2
    
    import java.io.Closeable
    import java.io.IOException
    import java.util.logging.Level.FINE
    import java.util.logging.Logger
    import okhttp3.internal.concurrent.Lockable
    import okhttp3.internal.concurrent.withLock
    import okhttp3.internal.format
    import okhttp3.internal.http2.Http2.CONNECTION_PREFACE
    import okhttp3.internal.http2.Http2.FLAG_ACK
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed May 28 23:28:25 UTC 2025
    - 11K bytes
    - Viewed (0)
  10. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/concurrent/TaskRunner.kt

     *
     * Most applications should share a process-wide [TaskRunner] and use queues for per-client work.
     */
    class TaskRunner(
      val backend: Backend,
      internal val logger: Logger = TaskRunner.logger,
    ) : Lockable {
      private var nextQueueName = 10000
      private var coordinatorWaiting = false
      private var coordinatorWakeUpAt = 0L
    
      /**
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:30:11 UTC 2025
    - 10.4K bytes
    - Viewed (0)
Back to top