Search Options

Results per page
Sort
Preferred Languages
Advance

Results 231 - 239 of 239 for thenReturn (0.05 sec)

  1. src/test/java/jcifs/internal/smb1/trans/nt/SmbComNtTransactionTest.java

            }
    
            public void setSetupCount(int value) {
                this.setupCount = value;
            }
        }
    
        @BeforeEach
        void setUp() {
            when(mockConfig.getTransactionBufferSize()).thenReturn(65535);
            transaction = new TestSmbComNtTransaction(mockConfig, SmbComNtTransaction.NT_TRANSACT_QUERY_SECURITY_DESC);
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.1K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/smb2/create/Smb2CreateRequestTest.java

        }
    
        @Test
        @DisplayName("Test createResponse")
        void testCreateResponse() {
            // Setup mock for this specific test
            when(mockContext.getConfig()).thenReturn(mockConfig);
    
            request = new Smb2CreateRequest(mockConfig, "test\\file.txt");
    
            Smb2CreateResponse response = request.createResponse(mockContext, request);
    
            assertNotNull(response);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 18.6K bytes
    - Viewed (0)
  3. src/test/java/jcifs/netbios/NameQueryResponseTest.java

        @BeforeEach
        void setUp() {
            // Mock the OEM encoding configuration with lenient stubbing
            // since not all tests need this stub
            lenient().when(mockConfig.getOemEncoding()).thenReturn("UTF-8");
    
            // Initialize NameQueryResponse before each test
            nameQueryResponse = new NameQueryResponse(mockConfig);
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14.4K bytes
    - Viewed (0)
  4. src/test/java/jcifs/smb1/netbios/SocketInputStreamTest.java

        void availableReturnsUnderlyingWhenNoMessage() throws IOException {
            // Mock input stream that reports available bytes
            InputStream mockIn = mock(InputStream.class);
            when(mockIn.available()).thenReturn(42);
    
            SocketInputStream sis = new SocketInputStream(mockIn);
    
            // When no message is buffered, should return underlying stream's available
            assertEquals(42, sis.available());
        }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14.2K bytes
    - Viewed (0)
  5. src/test/java/jcifs/internal/smb2/create/Smb2CloseRequestTest.java

        private Smb2CloseRequest request;
    
        @BeforeEach
        void setUp() {
            mockConfig = mock(Configuration.class);
            mockContext = mock(CIFSContext.class);
            when(mockContext.getConfig()).thenReturn(mockConfig);
    
            // Create a test file ID (16 bytes)
            testFileId = new byte[16];
            for (int i = 0; i < 16; i++) {
                testFileId[i] = (byte) (i + 1);
            }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.5K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/smb1/net/NetShareEnumTest.java

            // Use real configuration for most tests
            realConfig = new BaseConfiguration(false);
            // Mock configuration setup
            when(mockConfig.getTransactionBufferSize()).thenReturn(65535);
        }
    
        @Test
        @DisplayName("Test constructor initializes fields correctly")
        void testConstructor() {
            netShareEnum = new NetShareEnum(realConfig);
    
            assertNotNull(netShareEnum);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.8K bytes
    - Viewed (0)
  7. src/test/java/jcifs/internal/smb2/io/Smb2WriteRequestTest.java

        private byte[] testFileId;
        private Smb2WriteRequest request;
    
        @BeforeEach
        void setUp() {
            MockitoAnnotations.openMocks(this);
            when(mockContext.getConfig()).thenReturn(mockConfig);
    
            testFileId = new byte[16];
            new SecureRandom().nextBytes(testFileId);
            request = new Smb2WriteRequest(mockConfig, testFileId);
        }
    
        @Nested
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 22.4K bytes
    - Viewed (0)
  8. src/test/java/jcifs/internal/fscc/FileBothDirectoryInfoTest.java

        @BeforeEach
        void setUp() {
            MockitoAnnotations.openMocks(this);
            // Mock the OEM encoding for non-Unicode tests
            when(mockConfig.getOemEncoding()).thenReturn("Cp850");
            fileBothDirectoryInfo = new FileBothDirectoryInfo(mockConfig, true);
            fileBothDirectoryInfoNonUnicode = new FileBothDirectoryInfo(mockConfig, false);
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.9K bytes
    - Viewed (0)
  9. src/test/java/jcifs/internal/smb2/io/Smb2ReadRequestTest.java

        private byte[] outputBuffer;
        private Smb2ReadRequest request;
    
        @BeforeEach
        void setUp() {
            MockitoAnnotations.openMocks(this);
            when(mockContext.getConfig()).thenReturn(mockConfig);
    
            testFileId = new byte[16];
            new SecureRandom().nextBytes(testFileId);
            outputBuffer = new byte[4096];
            request = new Smb2ReadRequest(mockConfig, testFileId, outputBuffer, 0);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 24.8K bytes
    - Viewed (0)
Back to top