- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for stubbed (0.03 sec)
-
src/test/java/jcifs/smb1/smb1/AllocInfoTest.java
@Test @DisplayName("verify getters return stubbed values") void testGettersHappyPath() { when(mockAllocInfo.getCapacity()).thenReturn(1000L); when(mockAllocInfo.getFree()).thenReturn(400L); assertEquals(1000L, mockAllocInfo.getCapacity(), "capacity should match stubbed value"); assertEquals(400L, mockAllocInfo.getFree(), "free space should match stubbed value");
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 2.4K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbResourceLocatorInternalTest.java
verify(locator, times(1)).shouldForceSigning(); verifyNoMoreInteractions(locator); } // Happy path: overlaps delegates to implementation and returns as stubbed @Test @DisplayName("overlaps returns true then false as stubbed") void overlapsReturnsTrueThenFalse() throws Exception { when(locator.overlaps(other)).thenReturn(true, false); assertTrue(locator.overlaps(other));
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 6.9K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbTreeInternalTest.java
assertEquals("login failed", ex.getMessage()); verify(tree).connectLogon(context); } @Test @DisplayName("send without params returns the stubbed response") void send_noParams_returnsResponse() throws Exception { // Arrange - generic return type respected when(tree.send(request)).thenReturn(response); // Act
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 5.6K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbUnsupportedOperationExceptionTest.java
throw new SmbUnsupportedOperationException(); }); assertEquals("Operation is not supported with the negotiated capabilities", ex.getMessage()); } @Test @DisplayName("Mockito: stubbed collaborator throws RuntimeException wrapper and interactions are verified") void mockInteraction_stubsThrow_andVerifiesInvocation() {
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 5.2K bytes - Viewed (0) -
src/test/java/jcifs/smb/FileEntryTest.java
} private interface LongGetter { long apply(FileEntry e); } // --- Mockito-based interaction tests --- @Test @DisplayName("Mocked FileEntry returns stubbed values and verifies interactions") void mockedEntry_happyPath_and_interactions() { // Arrange: stub all methods with representative values when(mockEntry.getName()).thenReturn("file.txt");
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 10K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbSessionInternalTest.java
verify(session).getSmbTree(eq(share), eq(service)); } // Edge: unknown service returns null per stub @Test @DisplayName("getSmbTree unknown service returns null as stubbed") void getSmbTree_unknownService() { when(session.getSmbTree(eq("share"), eq("UNKNOWN"))).thenReturn(null); assertNull(session.getSmbTree("share", "UNKNOWN"));
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 6.8K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbTransportInternalTest.java
verify(transport).getSmbSession(eq(ctx)); } // Edge inputs: null context returns null session per mock setup @Test @DisplayName("getSmbSession(ctx) with null context returns null as stubbed") void getSmbSession_byContext_null() { when(transport.getSmbSession(isNull(jcifs.CIFSContext.class))).thenReturn(null); assertNull(transport.getSmbSession((jcifs.CIFSContext) null));
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 12.1K bytes - Viewed (0) -
src/test/java/jcifs/internal/SmbBasicFileInfoTest.java
Arguments.of(-1, -2L, -3L, -4L, -5L) // negative values ); } // --- Mockito interaction: verify each getter is invoked and returns stubbed values --- @Test void mockitoMock_verifiesGetterInteractions() { // Arrange: mock and stub each getter with distinct values SmbBasicFileInfo mock = Mockito.mock(SmbBasicFileInfo.class);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 5.8K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbRenewableCredentialsTest.java
CredentialsInternal result = renewable.renew(); // Assert: verify interaction and returned value verify(renewable, times(1)).renew(); assertSame(returned, result, "renew() should return the stubbed value"); // Negative interaction check: no further interactions with the mock verifyNoMoreInteractions(renewable); } @Test
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 7K bytes - Viewed (0) -
src/test/java/jcifs/internal/RequestWithPathTest.java
} @Override public boolean isResolveInDfs() { return resolveInDfs; } // CommonServerMessageBlock interface methods (stubbed for testing) @Override public int decode(byte[] buffer, int bufferIndex) throws SMBProtocolDecodingException { return 0; } @Override
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 12.2K bytes - Viewed (0)