Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 66 for openMocks (0.12 sec)

  1. src/test/java/jcifs/dcerpc/msrpc/srvsvcTest.java

     */
    class srvsvcTest {
    
        @Mock
        private NdrBuffer mockNdrBuffer;
    
        @Mock
        private NdrBuffer mockDeferredBuffer;
    
        @BeforeEach
        void setUp() {
            MockitoAnnotations.openMocks(this);
            // Set the deferred field directly since it's a public field, not a method
            mockNdrBuffer.deferred = mockDeferredBuffer;
            lenient().when(mockNdrBuffer.derive(anyInt())).thenReturn(mockDeferredBuffer);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/smb2/io/Smb2WriteResponseTest.java

    class Smb2WriteResponseTest {
    
        @Mock
        private Configuration mockConfig;
    
        private Smb2WriteResponse response;
    
        @BeforeEach
        void setUp() {
            MockitoAnnotations.openMocks(this);
            response = new Smb2WriteResponse(mockConfig);
        }
    
        @Nested
        @DisplayName("Constructor Tests")
        class ConstructorTests {
    
            @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.9K bytes
    - Viewed (0)
  3. src/test/java/jcifs/internal/smb2/lease/DirectoryLeaseManagerTest.java

        @Mock
        private SmbFile mockFile2;
    
        private DirectoryLeaseManager directoryLeaseManager;
        private AutoCloseable mocks;
    
        @BeforeEach
        public void setUp() {
            mocks = MockitoAnnotations.openMocks(this);
            when(context.getConfig()).thenReturn(config);
            when(config.isDirectoryNotificationsEnabled()).thenReturn(false); // Disable for unit tests
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 23 01:47:47 UTC 2025
    - 15.9K bytes
    - Viewed (0)
  4. src/test/java/jcifs/internal/smb1/trans2/Trans2QueryFSInformationResponseTest.java

        private Configuration config;
    
        @Mock
        private Configuration mockConfig;
    
        @BeforeEach
        void setUp() throws Exception {
            MockitoAnnotations.openMocks(this);
            Properties props = new Properties();
            config = new PropertyConfiguration(props);
        }
    
        @Test
        void testConstructor() {
            // Test constructor with SMB_INFO_ALLOCATION
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 17.9K bytes
    - Viewed (0)
  5. src/test/java/jcifs/internal/smb1/trans2/Trans2SetFileInformationResponseTest.java

        private Configuration config;
    
        @Mock
        private Configuration mockConfig;
    
        @BeforeEach
        void setUp() throws Exception {
            MockitoAnnotations.openMocks(this);
            Properties props = new Properties();
            config = new PropertyConfiguration(props);
            response = new Trans2SetFileInformationResponse(config);
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.9K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/smb1/trans2/Trans2GetDfsReferralResponseTest.java

    class Trans2GetDfsReferralResponseTest {
    
        @Mock
        private Configuration mockConfig;
    
        private Trans2GetDfsReferralResponse response;
    
        @BeforeEach
        void setUp() {
            MockitoAnnotations.openMocks(this);
            response = new Trans2GetDfsReferralResponse(mockConfig);
        }
    
        @Nested
        @DisplayName("Constructor and Initialization Tests")
        class ConstructorTests {
    
            @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 19.4K bytes
    - Viewed (0)
  7. src/test/java/jcifs/internal/smb1/trans/SmbComTransactionTest.java

            }
    
            void setDataBuffer(byte[] buffer) {
                this.dataBuffer = buffer;
            }
        }
    
        @BeforeEach
        void setUp() {
            MockitoAnnotations.openMocks(this);
            when(mockConfig.getTransactionBufferSize()).thenReturn(65535);
            when(mockConfig.getOemEncoding()).thenReturn("ASCII");
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 10.7K bytes
    - Viewed (0)
  8. src/test/java/jcifs/internal/smb2/Smb2CancelRequestTest.java

    /**
     * Test class for Smb2CancelRequest
     */
    class Smb2CancelRequestTest {
    
        @Mock
        private Configuration mockConfig;
    
        @BeforeEach
        void setUp() {
            MockitoAnnotations.openMocks(this);
        }
    
        @Test
        @DisplayName("Test constructor with non-zero asyncId sets async flag")
        void testConstructorWithNonZeroAsyncId() {
            // Given
            long mid = 12345L;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.8K bytes
    - Viewed (0)
  9. src/test/java/jcifs/internal/smb1/trans/TransCallNamedPipeTest.java

        private static final String TEST_PIPE_NAME = "\\\\PIPE\\\\testpipe";
        private static final byte[] TEST_DATA = "Test pipe data".getBytes();
    
        @BeforeEach
        void setUp() {
            MockitoAnnotations.openMocks(this);
        }
    
        @Test
        @DisplayName("Test constructor initializes fields correctly")
        void testConstructorInitialization() {
            // Given
            int offset = 0;
            int length = TEST_DATA.length;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 10.8K bytes
    - Viewed (0)
  10. src/test/java/jcifs/internal/smb1/trans/nt/NtTransNotifyChangeTest.java

        private static final int FILE_NOTIFY_CHANGE_STREAM_WRITE = 0x00000800;
        private static final int FILE_NOTIFY_CHANGE_ALL = 0x00000FFF;
    
        @BeforeEach
        void setUp() {
            MockitoAnnotations.openMocks(this);
            when(mockConfig.getNotifyBufferSize()).thenReturn(4096);
            when(mockConfig.getTransactionBufferSize()).thenReturn(65535);
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.4K bytes
    - Viewed (0)
Back to top