Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 31 - 40 of 3,180 for when (0.03 seconds)

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

        void mockReturnsConfiguredValues() {
            FileEntry mock = mock(FileEntry.class);
            when(mock.getName()).thenReturn("test.txt");
            when(mock.getType()).thenReturn(1);
            when(mock.getAttributes()).thenReturn(128);
            when(mock.createTime()).thenReturn(1_500L);
            when(mock.lastModified()).thenReturn(1_800L);
            when(mock.length()).thenReturn(100L);
    
            assertEquals("test.txt", mock.getName());
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 3K bytes
    - Click Count (0)
  2. src/test/java/jcifs/internal/smb2/notify/Smb2ChangeNotifyRequestTest.java

        void testConstructor() {
            // Given
            Configuration config = mock(Configuration.class);
            when(config.getNotifyBufferSize()).thenReturn(8192);
    
            // When
            Smb2ChangeNotifyRequest req = new Smb2ChangeNotifyRequest(config, testFileId);
    
            // Then
            assertNotNull(req);
            assertTrue(req instanceof ServerMessageBlock2Request);
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 17.1K bytes
    - Click Count (0)
  3. src/test/java/jcifs/dcerpc/ndr/NdrShortTest.java

                NdrBuffer decodeBuffer = mock(NdrBuffer.class);
                when(decodeBuffer.dec_ndr_short()).thenReturn(originalValue);
    
                // When: Encoding then decoding
                ndrShort1.encode(encodeBuffer);
    
                NdrShort ndrShort2 = new NdrShort(0);
                ndrShort2.decode(decodeBuffer);
    
                // Then: Values should match
                verify(encodeBuffer).enc_ndr_short(originalValue);
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 11.2K bytes
    - Click Count (0)
  4. build-tools-internal/src/test/groovy/org/elasticsearch/gradle/internal/test/rerun/executer/RerunTestResultProcessorTestSpec.groovy

            def testCompleteEvent = Mock(TestCompleteEvent)
    
            when:
            processor.started(testDesciptorInternal, testStartEvent)
            then:
            1 * delegate.started(testDesciptorInternal, testStartEvent)
    
            when:
            processor.output(testId, testOutputEvent)
            then:
            1 * delegate.output(testId, testOutputEvent)
    
            when:
            processor.completed(testId, testCompleteEvent)
            then:
    Created: Wed Apr 08 16:19:15 GMT 2026
    - Last Modified: Tue Jun 01 09:19:30 GMT 2021
    - 4.9K bytes
    - Click Count (0)
  5. src/test/java/jcifs/config/DelegatingConfigurationTest.java

            // Given
            when(mockDelegate.isUseSMB2OnlyNegotiation()).thenReturn(true);
            when(mockDelegate.isRequireSecureNegotiate()).thenReturn(false);
            when(mockDelegate.isSendNTLMTargetName()).thenReturn(true);
            when(mockDelegate.isPort139FailoverEnabled()).thenReturn(false);
            when(mockDelegate.isDfsStrictView()).thenReturn(true);
    
            // When
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 20.7K bytes
    - Click Count (0)
  6. src/test/java/jcifs/SmbTransportPoolTest.java

            void testFullConnectionLifecycle() throws Exception {
                // Given
                when(transportPool.getSmbTransport(context, TEST_HOST, DEFAULT_PORT, false, false)).thenReturn(transport);
                doNothing().when(transportPool).removeTransport(transport);
                when(transportPool.close()).thenReturn(false);
    
                // When - complete lifecycle
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 22.6K bytes
    - Click Count (0)
  7. src/test/java/jcifs/smb/SmbSessionInternalTest.java

        }
    
        // Error propagation: connect to logon share throws SmbException
        @Test
        @DisplayName("treeConnectLogon throws SmbException when underlying call fails")
        void treeConnectLogon_throws() throws SmbException {
            doThrow(new SmbException("logon failed")).when(session).treeConnectLogon();
            SmbException ex = assertThrows(SmbException.class, () -> session.treeConnectLogon());
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 6.8K bytes
    - Click Count (0)
  8. src/test/java/org/codelibs/fess/mylasta/direction/sponsor/FessCurtainBeforeHookTest.java

                TimeZone.setDefault(testTimeZone);
    
                // When
                DfFinalTimeZoneProvider provider = curtainBeforeHook.createFinalTimeZoneProvider();
    
                // Then
                // Provider should still use FessUserTimeZoneProcessProvider.centralTimeZone
                // which was set when the class was loaded
                TimeZone providedTimeZone = provider.provide();
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Fri Mar 13 23:01:26 GMT 2026
    - 8.4K bytes
    - Click Count (0)
  9. src/test/java/jcifs/internal/smb2/io/Smb2ReadResponseTest.java

            headerStartField.setAccessible(true);
            headerStartField.set(response, 0);
    
            // When
            int bytesRead = response.readBytesWireFormat(buffer, bodyStart);
    
            // Then
            // When dataLength is 0, it returns max(16, dataOffset + 0 - bodyStart) = max(16, 80) = 80
            assertEquals(80, bytesRead);
            assertEquals(0, response.getDataLength());
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sun Aug 31 08:00:57 GMT 2025
    - 22.1K bytes
    - Click Count (0)
  10. src/test/java/jcifs/CIFSUnsupportedCryptoExceptionTest.java

        void testMessageConstructor() {
            // Given & When
            CIFSUnsupportedCryptoException exception = new CIFSUnsupportedCryptoException(CRYPTO_ERROR_MESSAGE);
    
            // Then
            assertEquals(CRYPTO_ERROR_MESSAGE, exception.getMessage(), "Message should be preserved");
            assertNull(exception.getCause(), "Cause should be null when not specified");
        }
    
        @ParameterizedTest
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 4.1K bytes
    - Click Count (0)
Back to Top