Search Options

Results per page
Sort
Preferred Languages
Advance

Results 171 - 180 of 777 for When (0.4 sec)

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

        SmbTreeHandleImpl tree;
    
        private void stubValidTree(long treeId, boolean connected, boolean smb2) {
            lenient().when(tree.acquire()).thenReturn(tree);
            lenient().when(tree.getTreeId()).thenReturn(treeId);
            lenient().when(tree.isConnected()).thenReturn(connected);
            lenient().when(tree.isSMB2()).thenReturn(smb2);
        }
    
        @Test
        @DisplayName("Constructor with null tree throws NPE (byte[] fid variant)")
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.3K bytes
    - Viewed (0)
  2. src/test/java/jcifs/smb/SmbTreeHandleImplTest.java

            when(ctx.getConfig()).thenReturn(config);
            when(config.getCapabilities()).thenReturn(0);
            when(config.getFlags2()).thenReturn(0);
            when(config.getMaxMpxCount()).thenReturn(1);
            when(config.getSendBufferSize()).thenReturn(4096);
            when(config.getReceiveBufferSize()).thenReturn(4096);
            when(config.getTransactionBufferSize()).thenReturn(4096);
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14.4K bytes
    - Viewed (0)
  3. src/test/java/jcifs/smb1/smb1/Trans2QueryPathInformationResponseTest.java

                Info mockInfo = mock(Info.class);
    
                // Set up mock behavior
                when(mockInfo.getAttributes()).thenReturn(0x20);
                when(mockInfo.getSize()).thenReturn(1024L);
                when(mockInfo.getCreateTime()).thenReturn(1000000L);
                when(mockInfo.getLastWriteTime()).thenReturn(2000000L);
    
                // Use the mock
                response.info = mockInfo;
    
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.5K bytes
    - Viewed (0)
  4. src/test/java/jcifs/util/transport/RequestTest.java

            // Test case for isCancel method when it returns true
            when(mockRequest.isCancel()).thenReturn(true);
    
            assertTrue(mockRequest.isCancel(), "isCancel should return true when mocked to do so.");
            verify(mockRequest, times(1)).isCancel();
        }
    
        @Test
        void testIsCancelFalse() {
            // Test case for isCancel method when it returns false
            when(mockRequest.isCancel()).thenReturn(false);
    
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 3.6K bytes
    - Viewed (0)
  5. src/test/java/jcifs/smb/FileEntryAdapterIteratorTest.java

            }
        }
    
        @BeforeEach
        void setUp() {
            lenient().when(fileEntry.getName()).thenReturn("test");
        }
    
        @Test
        @DisplayName("Iterator without filter - simple case")
        void iteratorWithoutFilter() {
            // Setup: constructor calls advance() once
            when(delegate.hasNext()).thenReturn(true, false);
            when(delegate.next()).thenReturn(fileEntry);
    
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 10.6K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/dfs/DfsReferralDataImplTest.java

            @Test
            @DisplayName("Should use special name when no expanded names")
            void testFromReferralWithSpecialName() {
                when(mockReferral.getTtl()).thenReturn(300);
                when(mockReferral.getRFlags()).thenReturn(Trans2GetDfsReferralResponse.FLAGS_NAME_LIST_REFERRAL);
                when(mockReferral.getExpandedNames()).thenReturn(new String[0]);
                when(mockReferral.getSpecialName()).thenReturn("\\SPECIAL");
    
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 30.6K bytes
    - Viewed (0)
  7. src/test/java/jcifs/internal/smb2/info/Smb2QueryDirectoryRequestTest.java

            // Test with smaller maximum buffer size
            when(mockConfig.getMaximumBufferSize()).thenReturn(8192);
            when(mockConfig.getListSize()).thenReturn(16384);
    
            request = new Smb2QueryDirectoryRequest(mockConfig);
            assertNotNull(request);
    
            // Test with smaller list size
            when(mockConfig.getMaximumBufferSize()).thenReturn(16384);
            when(mockConfig.getListSize()).thenReturn(8192);
    
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 13.2K bytes
    - Viewed (0)
  8. src/test/java/jcifs/http/HandlerTest.java

            assertNotNull(connection, "Connection should not be null even when jcifs is in handler path.");
            assertTrue(connection instanceof NtlmHttpURLConnection, "Should use cached handler and wrap it.");
        }
    
        @Test
        void testOpenConnection_NullSystemProperty_UsesDefaultHandlers() throws Exception {
            // This test verifies that when the system property is null, the handler
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.1K bytes
    - Viewed (0)
  9. src/test/java/jcifs/pac/PacUnicodeStringTest.java

            // Current implementation throws NullPointerException when string is null
            assertThrows(NullPointerException.class, () -> {
                pacString.check(testString);
            }, "A NullPointerException is thrown when checking a null string.");
        }
    
        /**
         * Tests the {@link PacUnicodeString#check(String)} method with a non-empty string when the pointer is zero.
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.7K bytes
    - Viewed (0)
  10. src/test/java/jcifs/dcerpc/msrpc/SamrPolicyHandleTest.java

                @Override
                public int getErrorCode() {
                    return DcerpcError.DCERPC_FAULT_OP_RNG_ERROR;
                }
            }).when(mockHandle).sendrecv(any(MsrpcSamrConnect4.class));
            // Subsequent call for MsrpcSamrConnect2 should succeed
            doNothing().when(mockHandle).sendrecv(any(MsrpcSamrConnect2.class));
    
            try (SamrPolicyHandle handle = new SamrPolicyHandle(mockHandle, server, access)) {
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7.4K bytes
    - Viewed (0)
Back to top