Search Options

Results per page
Sort
Preferred Languages
Advance

Results 121 - 130 of 773 for When (0.25 sec)

  1. src/test/java/jcifs/context/BaseContextTest.java

            when(configWithCreds.getDefaultUsername()).thenReturn("testuser");
            when(configWithCreds.getDefaultPassword()).thenReturn("testpass");
            when(configWithCreds.getDefaultDomain()).thenReturn("TESTDOMAIN");
            when(configWithCreds.getBufferCacheSize()).thenReturn(16);
            when(configWithCreds.getMaximumBufferSize()).thenReturn(65536);
    
            // When
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 15.1K bytes
    - Viewed (0)
  2. src/test/java/jcifs/dcerpc/DcerpcHandleTest.java

                // When/Then: Should throw DcerpcException for invalid URLs
                assertThrows(DcerpcException.class, () -> DcerpcHandle.parseBinding(url));
            }
    
            @Test
            @DisplayName("Should handle binding URLs without endpoints correctly")
            void testParseBindingWithoutEndpoint() {
                // When/Then: URLs without proper endpoints should fail
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.3K bytes
    - Viewed (0)
  3. src/test/java/jcifs/CredentialsTest.java

            // Given
            when(mockCredentials.isAnonymous()).thenReturn(true);
    
            // When
            boolean isAnonymous = mockCredentials.isAnonymous();
    
            // Then
            assertTrue(isAnonymous);
            verify(mockCredentials).isAnonymous();
        }
    
        @Test
        @DisplayName("Should check for guest credentials")
        void testIsGuest() {
            // Given
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 2.5K bytes
    - Viewed (0)
  4. src/test/java/jcifs/internal/AllocInfoTest.java

            @DisplayName("Should handle multiple invocations")
            void shouldHandleMultipleInvocations() {
                // Given
                when(mockAllocInfo.getCapacity()).thenReturn(1000L, 2000L, 3000L);
                when(mockAllocInfo.getFree()).thenReturn(500L, 1000L, 1500L);
    
                // When & Then
                assertEquals(1000L, mockAllocInfo.getCapacity());
                assertEquals(500L, mockAllocInfo.getFree());
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.8K bytes
    - Viewed (0)
  5. src/test/java/jcifs/internal/smb2/tree/Smb2TreeDisconnectRequestTest.java

            CIFSContext mockContext = mock(CIFSContext.class);
            when(mockContext.getConfig()).thenReturn(mockConfig);
            Smb2TreeDisconnectRequest request = new Smb2TreeDisconnectRequest(mockConfig);
    
            // When
            Smb2TreeDisconnectResponse response = request.createResponse(mockContext, request);
    
            // Then
            assertNotNull(response);
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14.1K bytes
    - Viewed (0)
  6. src/test/java/jcifs/smb/DirFileEntryEnumIterator2Test.java

            // Setup required for this test
            when(parent.getLocator()).thenReturn(locator);
            when(locator.getUNCPath()).thenReturn("\\\\server\\share\\dir\\");
            when(tree.getConfig()).thenReturn(config);
            when(config.getMaximumBufferSize()).thenReturn(65535);
            when(config.getListSize()).thenReturn(65535);
    
            // Arrange: initial page with two entries, then one more entry, then no more files
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 13.7K bytes
    - Viewed (0)
  7. src/test/java/jcifs/internal/smb2/tree/Smb2TreeDisconnectResponseTest.java

            SMBUtil.writeInt2(4, buffer, 0);
            SMBUtil.writeInt2(0, buffer, 2);
    
            // When
            int bytesRead = response.readBytesWireFormat(buffer, 0);
    
            // Then
            assertEquals(4, bytesRead);
        }
    
        @Test
        @DisplayName("Should throw exception when buffer too small for reading")
        void testReadBytesWireFormatBufferTooSmall() {
            // Given
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14.1K bytes
    - Viewed (0)
  8. src/test/java/jcifs/internal/fscc/BasicFileInformationTest.java

        void testInterfaceMock() {
            // Given
            when(mockBasicFileInfo.getAttributes()).thenReturn(TEST_ATTRIBUTES);
            when(mockBasicFileInfo.getCreateTime()).thenReturn(TEST_CREATE_TIME);
            when(mockBasicFileInfo.getLastWriteTime()).thenReturn(TEST_LAST_WRITE_TIME);
            when(mockBasicFileInfo.getLastAccessTime()).thenReturn(TEST_LAST_ACCESS_TIME);
            when(mockBasicFileInfo.getSize()).thenReturn(1024L);
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 13K bytes
    - Viewed (0)
  9. src/test/java/jcifs/internal/smb1/com/SmbComTreeDisconnectTest.java

        public void testConstructorWithMockConfig() {
            // Setup mock to return a valid PID
            when(mockConfig.getPid()).thenReturn(1234);
    
            // When
            smbComTreeDisconnect = new SmbComTreeDisconnect(mockConfig);
    
            // Then
            assertNotNull(smbComTreeDisconnect);
            assertEquals(ServerMessageBlock.SMB_COM_TREE_DISCONNECT, smbComTreeDisconnect.getCommand());
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.5K bytes
    - Viewed (0)
  10. src/test/java/jcifs/smb/SmbExceptionTest.java

        void testSmbExceptionWithNTStatus() {
            // Given
            int ntStatus = NtStatus.NT_STATUS_ACCESS_DENIED;
    
            // When
            SmbException exception = new SmbException(ntStatus, false);
    
            // Then
            assertNotNull(exception);
            assertEquals(ntStatus, exception.getNtStatus());
            assertTrue(exception.getMessage().contains("Access is denied"));
        }
    
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7.9K bytes
    - Viewed (0)
Back to top