Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 79 for expectedTime (0.06 sec)

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

        void testSizeReturnsPositiveValue() {
            // Given
            int expectedSize = 1024;
            when(request.size()).thenReturn(expectedSize);
    
            // When
            int result = request.size();
    
            // Then
            assertEquals(expectedSize, result);
            verify(request, times(1)).size();
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.1K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/Sets.java

       *     without resizing
       * @throws IllegalArgumentException if {@code expectedSize} is negative
       */
      @SuppressWarnings("NonApiType") // acts as a direct substitute for a constructor call
      public static <E extends @Nullable Object> HashSet<E> newHashSetWithExpectedSize(
          int expectedSize) {
        return new HashSet<>(Maps.capacity(expectedSize));
      }
    
      /**
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 81.6K bytes
    - Viewed (0)
  3. src/test/java/jcifs/internal/smb2/io/Smb2ReadRequestTest.java

        class SizeCalculationTests {
    
            @Test
            @DisplayName("Should calculate size correctly")
            void testSize() {
                int expectedSize = ((Smb2Constants.SMB2_HEADER_LENGTH + 49 + 7) / 8) * 8;
                assertEquals(expectedSize, request.size());
            }
    
            @Test
            @DisplayName("Should align size to 8-byte boundary")
            void testSizeAlignment() {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 24.8K bytes
    - Viewed (0)
  4. src/test/java/jcifs/internal/smb2/Smb2EchoRequestTest.java

        class SizeTests {
    
            @Test
            @DisplayName("Should return correct size")
            void testSize() {
                int expectedSize = Smb2Constants.SMB2_HEADER_LENGTH + 4;
                // size8 rounds up to 8-byte boundary
                int expectedAlignedSize = (expectedSize + 7) & ~7;
    
                assertEquals(expectedAlignedSize, echoRequest.size());
            }
    
            @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.3K bytes
    - Viewed (0)
  5. src/main/java/jcifs/util/ServerResponseValidator.java

            }
    
            if (buffer.length < expectedSize) {
                failedValidations.incrementAndGet();
                bufferOverflowsPrevented.incrementAndGet();
                log.warn("Response buffer too small: {} < {}", buffer.length, expectedSize);
                throw new SmbException("Response buffer too small: " + buffer.length + " < " + expectedSize);
            }
    
            if (buffer.length > maxSize) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 16.6K bytes
    - Viewed (0)
  6. guava/src/com/google/common/io/ByteStreams.java

      static byte[] toByteArray(InputStream in, long expectedSize) throws IOException {
        checkArgument(expectedSize >= 0, "expectedSize (%s) must be non-negative", expectedSize);
        if (expectedSize > MAX_ARRAY_LEN) {
          throw new OutOfMemoryError(expectedSize + " bytes is too large to fit in a byte array");
        }
    
        byte[] bytes = new byte[(int) expectedSize];
        int remaining = (int) expectedSize;
    
        while (remaining > 0) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Jul 17 15:26:41 UTC 2025
    - 31.1K bytes
    - Viewed (0)
  7. src/test/java/jcifs/internal/smb2/notify/Smb2ChangeNotifyRequestTest.java

            int size = request.size();
    
            // Then
            // Size should be aligned to 8 bytes: SMB2_HEADER_LENGTH + 32
            int expectedSize = Smb2Constants.SMB2_HEADER_LENGTH + 32;
            // The size8 method aligns to 8-byte boundary
            int alignedSize = (expectedSize + 7) & ~7;
            assertEquals(alignedSize, size);
        }
    
        @Test
        @DisplayName("Should write correct bytes to wire format")
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 17.1K bytes
    - Viewed (0)
  8. src/test/java/jcifs/smb/compression/CompressionNegotiateContextTest.java

        }
    
        @Test
        @DisplayName("Test context size calculation")
        public void testContextSize() {
            int expectedSize = 8 + (3 * 2); // Header + 3 algorithms * 2 bytes each
            assertEquals(expectedSize, context.size());
        }
    
        @Test
        @DisplayName("Test context with flags")
        public void testContextWithFlags() {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 5.6K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java

        MinMaxPriorityQueue<Integer> queue = MinMaxPriorityQueue.expectedSize(8).create();
        assertEquals(8, queue.capacity());
        checkUnbounded(queue);
        checkNatural(queue);
      }
    
      public void testCreation_expectedSize_comparator() {
        MinMaxPriorityQueue<Integer> queue =
            MinMaxPriorityQueue.orderedBy(SOME_COMPARATOR).expectedSize(8).create();
        assertEquals(8, queue.capacity());
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 36K bytes
    - Viewed (0)
  10. src/test/java/jcifs/internal/smb2/tree/Smb2TreeDisconnectRequestTest.java

            // When
            int size = request.size();
    
            // Then
            // SMB2_HEADER_LENGTH + 4 bytes for tree disconnect structure
            int expectedSize = Smb2Constants.SMB2_HEADER_LENGTH + 4;
            // size8 method aligns to 8-byte boundary
            int alignedSize = (expectedSize + 7) & ~7;
            assertEquals(alignedSize, size);
        }
    
        @Test
        @DisplayName("Should write correct bytes to wire format")
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14.1K bytes
    - Viewed (0)
Back to top