Search Options

Results per page
Sort
Preferred Languages
Advance

Results 181 - 190 of 270 for thenReturn (0.04 sec)

  1. impl/maven-cli/src/test/java/org/apache/maven/cling/invoker/mvnup/goals/InferenceStrategyTest.java

            void shouldBeApplicableWhenInferOptionTrue() {
                UpgradeOptions options = mock(UpgradeOptions.class);
                when(options.infer()).thenReturn(Optional.of(true));
                when(options.all()).thenReturn(Optional.empty());
    
                UpgradeContext context = createMockContext(options);
    
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Tue Nov 18 18:03:26 UTC 2025
    - 35.2K bytes
    - Viewed (0)
  2. src/test/java/jcifs/dcerpc/DcerpcHandleTest.java

        @BeforeEach
        void setUp() {
            // Setup buffer cache mocks with lenient stubbing
            lenient().when(mockContext.getBufferCache()).thenReturn(mockBufferCache);
            lenient().when(mockBufferCache.getBuffer()).thenReturn(new byte[8192]);
            handle = new TestDcerpcHandle(mockContext, mockBinding);
        }
    
        @Nested
        @DisplayName("Binding Parsing Tests")
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.3K bytes
    - Viewed (0)
  3. src/test/java/jcifs/tests/persistent/HandleReconnectorTest.java

        }
    
        @Test
        public void testReconnectHandleSuccess() throws Exception {
            when(mockManager.getHandleForReconnect("/test/file.txt")).thenReturn(testHandle);
    
            // Create a test reconnector that succeeds
            TestHandleReconnector testReconnector = new TestHandleReconnector(mockManager, true);
    
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 21 04:51:33 UTC 2025
    - 5.6K bytes
    - Viewed (0)
  4. src/test/java/jcifs/smb/ShareEnumIteratorTest.java

        }
    
        // Helper to create a minimal FileEntry mock
        private FileEntry entry(String name, int type) {
            FileEntry e = mock(FileEntry.class);
            when(e.getName()).thenReturn(name);
            when(e.getType()).thenReturn(type);
            return e;
        }
    
        @Test
        @DisplayName("Happy path without filter: iterates all entries in order")
        void happyPath_noFilter_returnsAll() throws Exception {
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 8.1K bytes
    - Viewed (0)
  5. impl/maven-cli/src/test/java/org/apache/maven/cling/invoker/mvnup/goals/ApplyTest.java

                    // Update context to use the temp directory
                    when(context.invokerRequest.cwd()).thenReturn(tempDir);
    
                    // Mock successful strategy execution
                    when(mockOrchestrator.executeStrategies(Mockito.any(), Mockito.any()))
                            .thenReturn(UpgradeResult.empty());
    
                    applyGoal.execute(context);
    
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Tue Nov 18 10:39:17 UTC 2025
    - 4.9K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/AllocInfoTest.java

            @DisplayName("Should handle multiple invocations")
            void shouldHandleMultipleInvocations() {
                // Given
                when(mockAllocInfo.getCapacity()).thenReturn(1000L, 2000L, 3000L);
                when(mockAllocInfo.getFree()).thenReturn(500L, 1000L, 1500L);
    
                // When & Then
                assertEquals(1000L, mockAllocInfo.getCapacity());
                assertEquals(500L, mockAllocInfo.getFree());
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.8K bytes
    - Viewed (0)
  7. src/test/java/jcifs/internal/smb2/ServerMessageBlock2ResponseTest.java

                response.setDigest(mockDigest);
                response.setStatusForTest(NtStatus.NT_STATUS_ACCESS_DENIED);
                when(mockConfig.isRequireSecureNegotiate()).thenReturn(true);
                when(mockDigest.verify(buffer, 0, 100, 0, response)).thenReturn(false);
    
                boolean result = response.verifySignature(buffer, 0, 100);
    
                assertTrue(result);
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 19.3K bytes
    - Viewed (0)
  8. src/test/java/jcifs/internal/smb1/com/SmbComQueryInformationTest.java

        private SmbComQueryInformation cmd;
    
        @BeforeEach
        void setUp() {
            // Configure the mock to return the OEM encoding which is required for writeString
            when(mockConfig.getOemEncoding()).thenReturn("windows-1252");
            cmd = new SmbComQueryInformation(mockConfig, "testfile.txt");
        }
    
        @Test
        @DisplayName("writeBytesWireFormat writes the command byte followed by the null terminated string")
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.9K bytes
    - Viewed (0)
  9. src/test/java/jcifs/FileNotifyInformationTest.java

                when(mockFileNotifyInfo.getFileName()).thenReturn(fileName);
                assertEquals(fileName, mockFileNotifyInfo.getFileName());
            }
    
            @Test
            @DisplayName("Test getFileName with null value")
            void testGetFileNameWithNull() {
                when(mockFileNotifyInfo.getFileName()).thenReturn(null);
                assertNull(mockFileNotifyInfo.getFileName());
            }
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.1K bytes
    - Viewed (0)
  10. impl/maven-cli/src/test/java/org/apache/maven/cling/invoker/mvnup/goals/AbstractUpgradeGoalTest.java

                UpgradeContext context = createMockContext(projectDir);
    
                // Mock successful strategy execution
                when(mockOrchestrator.executeStrategies(Mockito.any(), Mockito.any()))
                        .thenReturn(UpgradeResult.empty());
    
                // Execute with target model 4.0.0 (should create .mvn directory)
                upgradeGoal.testExecuteWithTargetModel(context, "4.0.0");
    
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Tue Nov 18 18:03:26 UTC 2025
    - 13.7K bytes
    - Viewed (0)
Back to top