Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 134 for interactions (0.08 sec)

  1. src/test/java/jcifs/smb/FileEntryTest.java

            inOrder.verify(mockEntry).getName();
            inOrder.verify(mockEntry, times(2)).getType();
        }
    
        @Test
        @DisplayName("Mock without interactions reports none")
        void mock_noInteractions() {
            // Arrange/Act: do nothing
            // Assert: verify no interactions
            verifyNoInteractions(mockEntry);
        }
    
        // --- Fake implementation tests (happy path and edge cases) ---
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 10K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/SMBProtocolDecodingExceptionTest.java

                assertTrue(ts.contains(message), "toString should include non-empty message");
            }
        }
    
        @Test
        @DisplayName("Cause-only constructor: preserves provided cause; no interactions with cause")
        void causeOnlyConstructor_preservesCause_andNoInteractions() {
            // Arrange & Act
            SMBProtocolDecodingException ex = new SMBProtocolDecodingException(mockCause);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.1K bytes
    - Viewed (0)
  3. src/test/java/jcifs/internal/SmbBasicFileInfoTest.java

    import org.mockito.junit.jupiter.MockitoExtension;
    
    /**
     * Tests for SmbBasicFileInfo interface.
     * The tests exercise typical, edge, and null scenarios using a simple
     * implementation and a Mockito mock to verify interactions.
     */
    @ExtendWith(MockitoExtension.class)
    public class SmbBasicFileInfoTest {
    
        /**
         * Simple concrete implementation used for testing return values.
         */
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.8K bytes
    - Viewed (0)
  4. src/test/java/jcifs/dcerpc/ndr/NdrLongTest.java

            ndrLong.encode(mockNdrBuffer);
    
            // Verify that enc_ndr_long was called exactly once with the correct value
            verify(mockNdrBuffer, times(1)).enc_ndr_long(testValue);
            // Verify that no other interactions occurred with the mock buffer
            verifyNoMoreInteractions(mockNdrBuffer);
        }
    
        @Test
        void decode_shouldCallDecNdrLongAndAssignValue() throws NdrException {
            int decodedValue = 54321;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 3.2K bytes
    - Viewed (0)
  5. src/test/java/jcifs/smb/CredentialsInternalTest.java

                if (tc == null) {
                    throw new NullPointerException("tc");
                }
                // Exercise interaction with dependency for verification purposes
                // These methods do not throw and allow interaction checks.
                tc.getConfig();
                tc.getCredentials();
    
                // Minimal behavior: return a mock SSPContext with lenient stubbing
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.9K bytes
    - Viewed (0)
  6. src/test/java/jcifs/smb/SMBSignatureValidationExceptionTest.java

            assertEquals(NtStatus.NT_STATUS_UNSUCCESSFUL, ex.getNtStatus(), "Status should default to unsuccessful for message+cause ctor");
        }
    
        // Interaction: passing a mocked cause should not trigger interactions (nothing to call)
        @Test
        @DisplayName("Mocked cause: no interactions occur when stored as cause")
        void mockedCause_isStored_withoutInteraction() {
            // Arrange
            Throwable mocked = mock(Throwable.class);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.3K bytes
    - Viewed (0)
  7. src/test/java/jcifs/smb/SSPContextTest.java

            }
        }
    
        @Nested
        @DisplayName("Mockito interactions")
        class MockitoInteractions {
    
            @Mock
            SSPContext mockCtx;
    
            // Helper exercising all SSPContext methods to verify call interactions.
            private void useContext(SSPContext ctx) throws Exception {
                ctx.getSigningKey();
                ctx.isEstablished();
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.2K bytes
    - Viewed (0)
  8. src/test/java/jcifs/smb/SmbPipeInputStreamTest.java

        }
    
        @Test
        @DisplayName("close() does nothing (no delegate interactions)")
        void close_isNoop() throws Exception {
            // Verify close() is a no-op and does not call handle/tree/fd
            SmbPipeInputStream stream = newStreamWithInit(true);
    
            // reset to ignore constructor interactions
            reset(handle, tree, fd);
    
            assertDoesNotThrow(stream::close);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.9K bytes
    - Viewed (0)
  9. src/test/java/jcifs/smb/SessionSetupHandlerTest.java

            // Assert
            assertEquals(SessionSetupHandler.class, c);
            assertTrue(c.isInterface());
        }
    
        @Mock
        SessionSetupHandler mocked;
    
        @Test
        @DisplayName("Interactions: Mockito mock has no interactions by default")
        void testMockitoNoInteractions() {
            // Intent: ensure we can mock the interface and verify no unexpected calls
            // Act & Assert
            assertNotNull(mocked);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.3K bytes
    - Viewed (0)
  10. src/test/java/jcifs/smb/SmbUnsupportedOperationExceptionTest.java

            });
            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() {
            // Arrange: Since SmbUnsupportedOperationException is a checked exception (extends IOException),
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.2K bytes
    - Viewed (0)
Back to top