Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for getCapacity (0.24 sec)

  1. src/test/java/jcifs/internal/AllocInfoTest.java

            }
    
            @Test
            @DisplayName("Should define getCapacity method")
            void shouldDefineGetCapacityMethod() throws NoSuchMethodException {
                // Verify method exists with correct signature
                assertNotNull(AllocInfo.class.getMethod("getCapacity"));
                assertEquals(long.class, AllocInfo.class.getMethod("getCapacity").getReturnType());
            }
    
            @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.8K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/smb1/trans2/Trans2QueryFSInformationResponseTest.java

            assertTrue(response.getInfo() instanceof SmbInfoAllocation);
    
            SmbInfoAllocation info = (SmbInfoAllocation) response.getInfo();
            assertEquals(8L * 1000000L * 512L, info.getCapacity());
            assertEquals(8L * 500000L * 512L, info.getFree());
        }
    
        @Test
        void testReadDataWireFormat_FileFsSizeInformation() throws Exception {
            // Test reading FS_SIZE_INFO data
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 17.9K bytes
    - Viewed (0)
  3. src/test/java/jcifs/internal/fscc/FileFsSizeInformationTest.java

                // When
                fileFsSizeInfo.decode(buffer.array(), 0, 24);
                double percentFree = (fileFsSizeInfo.getFree() * 100.0) / fileFsSizeInfo.getCapacity();
                double percentUsed = ((fileFsSizeInfo.getCapacity() - fileFsSizeInfo.getFree()) * 100.0) / fileFsSizeInfo.getCapacity();
    
                // Then
                assertEquals(25.0, percentFree, 0.001);
                assertEquals(75.0, percentUsed, 0.001);
            }
        }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 25.9K bytes
    - Viewed (0)
  4. src/test/java/jcifs/internal/fscc/FileFsFullSizeInformationTest.java

                double percentFree = (fileFsFullSizeInfo.getFree() * 100.0) / fileFsFullSizeInfo.getCapacity();
                double percentUsed =
                        ((fileFsFullSizeInfo.getCapacity() - fileFsFullSizeInfo.getFree()) * 100.0) / fileFsFullSizeInfo.getCapacity();
    
                // Then
                assertEquals(25.0, percentFree, 0.001);
                assertEquals(75.0, percentUsed, 0.001);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 30.5K bytes
    - Viewed (0)
  5. src/test/java/jcifs/internal/fscc/SmbInfoAllocationTest.java

            long expectedCapacity = alloc * sectPerAlloc * bytesPerSect;
            assertEquals(expectedCapacity, smbInfoAllocation.getCapacity());
    
            long expectedFree = free * sectPerAlloc * bytesPerSect;
            assertEquals(expectedFree, smbInfoAllocation.getFree());
        }
    
        @Test
        @DisplayName("Test getCapacity with zero values")
        void testGetCapacityWithZeroValues() throws SMBProtocolDecodingException {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14.2K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/fscc/FileSystemInformationTest.java

                assertEquals(4L * 8192L * 1024L, smbInfoAllocation.getCapacity());
            }
    
            @Test
            @DisplayName("Should handle zero values")
            void testZeroValues() throws SMBProtocolDecodingException {
                byte[] buffer = new byte[24];
    
                smbInfoAllocation.decode(buffer, 0, buffer.length);
    
                assertEquals(0, smbInfoAllocation.getCapacity());
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.1K bytes
    - Viewed (0)
  7. src/test/java/jcifs/dcerpc/ndr/NdrBufferTest.java

            assertEquals(50, ndrBuffer.getIndex());
        }
    
        @Test
        void testGetCapacity() {
            assertEquals(buffer.length, ndrBuffer.getCapacity());
    
            NdrBuffer offsetBuffer = new NdrBuffer(buffer, 100);
            assertEquals(buffer.length - 100, offsetBuffer.getCapacity());
        }
    
        @Test
        void testGetTailSpace() {
            ndrBuffer.setIndex(100);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14.3K bytes
    - Viewed (0)
  8. src/main/java/jcifs/smb1/dcerpc/ndr/NdrBuffer.java

        public void setIndex(final int index) {
            this.index = index;
        }
    
        /**
         * Returns the capacity of the buffer.
         *
         * @return the buffer capacity
         */
        public int getCapacity() {
            return buf.length - start;
        }
    
        /**
         * Returns the available space at the tail of the buffer.
         *
         * @return the available tail space
         */
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 10.4K bytes
    - Viewed (0)
  9. src/main/java/jcifs/dcerpc/ndr/NdrBuffer.java

        public void setIndex(final int index) {
            this.index = index;
        }
    
        /**
         * Returns the capacity of the buffer.
         *
         * @return the buffer capacity
         */
        public int getCapacity() {
            return this.buf.length - this.start;
        }
    
        /**
         * Returns the available space at the tail of the buffer.
         *
         * @return the available tail space
         */
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 10.7K bytes
    - Viewed (0)
Back to top