- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for stubbing (2 sec)
-
src/test/java/jcifs/smb1/smb1/SmbConstantsTest.java
jcifs.SmbTransport mock = mock(jcifs.SmbTransport.class); // Stub the getRemoteHostName method when(mock.getRemoteHostName()).thenReturn("test-host"); // Verify the stubbing assertEquals("test-host", mock.getRemoteHostName()); // Ensure that the mock was interacted with verify(mock).getRemoteHostName(); }
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 4.2K bytes - Viewed (0) -
src/test/java/jcifs/internal/SmbNegotiationRequestTest.java
// Then assertNotNull(mockRequest, "Mock should be created successfully"); } @Test @DisplayName("Test default behavior of mock without stubbing") void testDefaultBehaviorOfMock() { // Given SmbNegotiationRequest mockRequest = mock(SmbNegotiationRequest.class); // When boolean result = mockRequest.isSigningEnforced();Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 6.4K bytes - Viewed (0) -
src/test/java/jcifs/smb1/UniAddressTest.java
* with different kinds of inputs. Many static helpers in {@code * UniAddress} are network dependent and therefore not exercised here – they * would require complex stubbing of static methods. Instead the tests * concentrate on the instance methods and simple static predicates * that are observable without network access. */ @ExtendWith(MockitoExtension.class) class UniAddressTest {Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 7.9K bytes - Viewed (0) -
src/test/java/jcifs/smb1/smb1/SmbRandomAccessFileTest.java
import java.net.MalformedURLException; import java.net.UnknownHostException; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; class SmbRandomAccessFileTest { private SmbFile smbFile; private SmbTree smbTree; private SmbSession smbSession; private SmbTransport smbTransport;Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 9.3K bytes - Viewed (0)