Search Options

Results per page
Sort
Preferred Languages
Advance

Results 141 - 150 of 773 for When (0.5 sec)

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

            SmbFile file = mock(SmbFile.class);
            when(file.getAttributes()).thenReturn(SmbFile.ATTR_NORMAL);
            assertTrue(filter.accept(file), "Attributes match should be accepted");
            verify(file, times(1)).getAttributes();
        }
    
        @Test
        public void testAcceptReturnsFalseWhenAttributesDoNotMatch() throws Exception {
            SmbFile file = mock(SmbFile.class);
            when(file.getAttributes()).thenReturn(SmbFile.ATTR_HIDDEN);
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 1.8K bytes
    - Viewed (0)
  2. src/test/java/jcifs/smb/SmbUnsupportedOperationExceptionTest.java

            // Assert
            assertEquals(msg, ex.getMessage(), "Constructor should preserve the provided message (including null)");
            assertNull(ex.getCause(), "No cause expected when only message is provided");
    
            // toString behavior mirrors Throwable: includes message when not null
            String ts = ex.toString();
            assertTrue(ts.contains("SmbUnsupportedOperationException"), "toString should contain class name");
            if (msg != null) {
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.2K bytes
    - Viewed (0)
  3. src/test/java/jcifs/internal/smb1/com/SmbComCloseTest.java

            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
            int fid = 123;
            long lastWriteTime = System.currentTimeMillis();
    
            // When
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 6.4K bytes
    - Viewed (0)
  4. src/test/java/jcifs/smb1/smb1/SmbComTreeDisconnectTest.java

     */
    class SmbComTreeDisconnectTest {
    
        /**
         * Test the constructor of SmbComTreeDisconnect.
         */
        @Test
        void testConstructor() {
            // When
            SmbComTreeDisconnect smbComTreeDisconnect = new SmbComTreeDisconnect();
    
            // Then
            assertEquals(ServerMessageBlock.SMB_COM_TREE_DISCONNECT, smbComTreeDisconnect.command, "Command should be SMB_COM_TREE_DISCONNECT");
        }
    
        /**
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 2.8K bytes
    - Viewed (0)
  5. src/test/java/jcifs/internal/smb2/session/Smb2SessionSetupResponseTest.java

            assertTrue(resp.isLoggedInAsGuest(), "Guest/anonymous should be detected");
    
            // prepare should propagate session id when received
            CIFSContext mockCtx = mock(CIFSContext.class);
            when(mockCtx.getConfig()).thenReturn(mock(Configuration.class));
            Smb2SessionSetupRequest nextReq = new Smb2SessionSetupRequest(mockCtx, 0, 0, 0L, null);
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.7K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/fscc/FileFsSizeInformationTest.java

                buffer.putInt(512); // Bytes per sector
                byte[] bufferArray = buffer.array();
    
                // When
                int bytesConsumed = fileFsSizeInfo.decode(bufferArray, 0, bufferArray.length);
    
                // Then
                assertEquals(24, bytesConsumed);
                assertEquals(1048576L * 8 * 512, fileFsSizeInfo.getCapacity());
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 25.9K bytes
    - Viewed (0)
  7. src/test/java/jcifs/EmptyIteratorTest.java

        void testNextReturnsNull() {
            // When
            SmbResource result = emptyIterator.next();
    
            // Then
            assertNull(result, "next() should return null for empty iterator");
        }
    
        @Test
        @DisplayName("next should not throw NoSuchElementException")
        void testNextDoesNotThrowException() {
            // When & Then
            assertDoesNotThrow(() -> {
                emptyIterator.next();
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12K bytes
    - Viewed (0)
  8. src/test/java/jcifs/internal/smb2/ioctl/SrvCopychunkTest.java

                // Given
                long sourceOffset = 1024L;
                long targetOffset = 2048L;
                int length = 4096;
    
                // When
                SrvCopychunk chunk = new SrvCopychunk(sourceOffset, targetOffset, length);
    
                // Then
                assertNotNull(chunk);
            }
    
            @ParameterizedTest
            @DisplayName("Should create instance with various offset values")
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.4K bytes
    - Viewed (0)
  9. src/test/java/jcifs/context/SingletonContextTest.java

            // Test registerSmbURLHandler when java.protocol.handler.pkgs is null
            System.clearProperty("java.protocol.handler.pkgs");
            SingletonContext.registerSmbURLHandler();
            assertEquals("jcifs", System.getProperty("java.protocol.handler.pkgs"));
        }
    
        @Test
        void testRegisterSmbURLHandlerWhenPkgsDoesNotContainJcifs() {
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7.9K bytes
    - Viewed (0)
  10. src/test/java/jcifs/RuntimeCIFSExceptionTest.java

        @Test
        @DisplayName("Should create RuntimeCIFSException with default constructor")
        void testDefaultConstructor() {
            // When
            RuntimeCIFSException exception = new RuntimeCIFSException();
    
            // Then
            assertNotNull(exception);
            assertNull(exception.getMessage());
            assertNull(exception.getCause());
            assertTrue(exception instanceof RuntimeException);
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 10.2K bytes
    - Viewed (0)
Back to top