Search Options

Results per page
Sort
Preferred Languages
Advance

Results 211 - 220 of 239 for thenReturn (0.06 sec)

  1. 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);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.9K bytes
    - Viewed (0)
  2. 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);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.5K bytes
    - Viewed (0)
  3. 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
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 6.4K bytes
    - Viewed (0)
  4. src/test/java/jcifs/internal/smb2/lock/Smb2LockRequestTest.java

        private Smb2Lock[] testLocks;
        private Smb2LockRequest request;
    
        @BeforeEach
        void setUp() {
            MockitoAnnotations.openMocks(this);
            when(mockContext.getConfig()).thenReturn(mockConfig);
    
            testFileId = new byte[16];
            new SecureRandom().nextBytes(testFileId);
    
            testLocks = new Smb2Lock[] { new Smb2Lock(0L, 100L, Smb2Lock.SMB2_LOCKFLAG_EXCLUSIVE_LOCK) };
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 25.3K bytes
    - Viewed (0)
  5. 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);
    Registered: Sun Sep 07 03:35:12 UTC 2025
    - Last Modified: Fri Mar 21 04:56:21 UTC 2025
    - 5.2K bytes
    - Viewed (0)
  6. 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();
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 21 04:51:33 UTC 2025
    - 6.6K bytes
    - Viewed (0)
  7. src/test/java/jcifs/smb1/util/transport/TransportExceptionTest.java

            void testCircularReferenceInRootCause() {
                // Create a mock exception that could have circular reference
                Exception rootCause = mock(Exception.class);
                when(rootCause.getMessage()).thenReturn("Mocked exception");
    
                TransportException exception = new TransportException("Test", rootCause);
    
                assertEquals(rootCause, exception.getRootCause());
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.5K bytes
    - Viewed (0)
  8. src/test/java/jcifs/internal/smb1/com/SmbComNegotiateResponseTest.java

        }
    
        @Test
        public void testIsValid() {
            SmbNegotiationRequest request = mock(SmbNegotiationRequest.class);
            when(request.isSigningEnforced()).thenReturn(true);
            response.getServerData().signaturesEnabled = true;
    
            assertTrue(response.isValid(mockContext, request));
            assertTrue(response.isSigningNegotiated());
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.4K bytes
    - Viewed (0)
  9. 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();
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7K bytes
    - Viewed (0)
  10. src/test/java/jcifs/internal/smb2/Smb2SigningDigestTest.java

                    mockedKeyDerivation.when(
                            () -> Smb3KeyDerivation.deriveSigningKey(eq(Smb2Constants.SMB2_DIALECT_0300), any(byte[].class), any(byte[].class)))
                            .thenReturn(derivedKey);
    
                    Smb2SigningDigest digest = new Smb2SigningDigest(sessionKey, Smb2Constants.SMB2_DIALECT_0300, null);
                    assertNotNull(digest);
    
                    mockedKeyDerivation.verify(
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 43.7K bytes
    - Viewed (0)
Back to top