- Sort Score
- Num 10 results
- Language All
Results 221 - 230 of 256 for thenReturn (0.42 seconds)
-
api/maven-api-core/src/test/java/org/apache/maven/api/services/SourcesTest.java
ModelSource.ModelLocator locator = mock(ModelSource.ModelLocator.class); Path resolvedPath = Paths.get("/tmp/subproject/pom.xml"); when(locator.locateExistingPom(any(Path.class))).thenReturn(resolvedPath); Sources.BuildPathSource source = (Sources.BuildPathSource) Sources.buildSource(basePath); ModelSource resolved = source.resolve(locator, "subproject"); assertNotNull(resolved);
Created: Sun Apr 05 03:35:12 GMT 2026 - Last Modified: Mon Sep 29 14:45:25 GMT 2025 - 5.4K bytes - Click Count (0) -
src/test/java/jcifs/internal/smb1/com/SmbComNTCreateAndXTest.java
} @Test @DisplayName("initResponse prepares a response instance") void initResponseCreatesResponse() { SmbComNTCreateAndX req = createRequest(0, 0); when(mockContext.getConfig()).thenReturn(mockConfig); SmbComNTCreateAndXResponse resp = req.initResponse(mockContext); assertNotNull(resp, "Response should not be null after init"); // getResponse should now return the same instanceCreated: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 5.6K bytes - Click Count (0) -
src/test/java/jcifs/internal/smb2/session/Smb2SessionSetupRequestTest.java
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 21.2K bytes - Click Count (0) -
src/test/java/jcifs/netbios/NodeStatusResponseTest.java
private NodeStatusResponse response; @BeforeEach void setUp() throws Exception { // Setup mock configuration with lenient stubbing lenient().when(mockConfig.getOemEncoding()).thenReturn("UTF-8"); // Setup mock query address mockQueryAddress = mock(NbtAddress.class); Name mockName = new Name(mockConfig, "TEST", 0x20, null); mockQueryAddress.hostName = mockName;Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 07:14:38 GMT 2025 - 19.3K bytes - Click Count (0) -
src/test/java/jcifs/internal/smb1/com/SmbComTreeDisconnectTest.java
*/ @Test @DisplayName("Test constructor with mock configuration") public void testConstructorWithMockConfig() { // Setup mock to return a valid PID when(mockConfig.getPid()).thenReturn(1234); // When smbComTreeDisconnect = new SmbComTreeDisconnect(mockConfig); // Then assertNotNull(smbComTreeDisconnect);Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 18.5K bytes - Click Count (0) -
src/test/java/jcifs/tests/persistent/PersistentHandleManagerTest.java
// Set system property for handle state directory System.setProperty("jcifs.smb.client.handleStateDirectory", tempDir.toString()); when(mockContext.getConfig()).thenReturn(mockConfig); manager = new PersistentHandleManager(mockContext); } @AfterEach public void tearDown() throws IOException { if (manager != null) { manager.shutdown();Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 21 04:51:33 GMT 2025 - 6.6K bytes - Click Count (0) -
src/test/java/jcifs/internal/smb1/trans2/Trans2QueryFSInformationTest.java
} @Test @DisplayName("Test with mock configuration") void testWithMockConfiguration() { when(mockConfig.getMinimumVersion()).thenReturn(jcifs.DialectVersion.SMB1); when(mockConfig.getMaximumVersion()).thenReturn(jcifs.DialectVersion.SMB311); trans2QueryFSInfo = new Trans2QueryFSInformation(mockConfig, FileSystemInformation.SMB_INFO_ALLOCATION);Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 18.9K bytes - Click Count (0) -
src/test/java/jcifs/internal/smb1/com/SmbComCloseTest.java
Properties properties = new Properties(); config = new PropertyConfiguration(properties); context = mock(CIFSContext.class); when(context.getConfig()).thenReturn(config); } /** * Test method for {@link jcifs.internal.smb1.com.SmbComClose#SmbComClose(jcifs.Configuration, int, long)}. */ @Test public void testConstructor() { // Given
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 6.4K bytes - Click Count (0) -
src/test/java/jcifs/smb/CredentialsInternalTest.java
tc.getCredentials(); // Minimal behavior: return a mock SSPContext with lenient stubbing SSPContext ctx = mock(SSPContext.class); lenient().when(ctx.isEstablished()).thenReturn(false); return ctx; } @Override public Subject getSubject() { return this.subject; } @Override
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 9.9K bytes - Click Count (0) -
src/test/java/jcifs/smb/SmbRenewableCredentialsTest.java
void mockitoInteraction(@Mock CredentialsInternal returned, @Mock SmbRenewableCredentials renewable) { // Arrange: stub renew() to return a mocked CredentialsInternal when(renewable.renew()).thenReturn(returned); // Act: invoke renew() CredentialsInternal result = renewable.renew(); // Assert: verify interaction and returned value verify(renewable, times(1)).renew();
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 7K bytes - Click Count (0)