Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for parameterize (0.81 sec)

  1. docs/en/docs/advanced/advanced-dependencies.md

    ## Parameterize the instance { #parameterize-the-instance }
    
    And now, we can use `__init__` to declare the parameters of the instance that we can use to "parameterize" the dependency:
    
    {* ../../docs_src/dependencies/tutorial011_an_py39.py hl[9] *}
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 2.6K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/fscc/FileEndOfFileInformationTest.java

            // Verify instance is created
            assertNotNull(fileInfo);
            assertEquals(FileInformation.FILE_ENDOFFILE_INFO, fileInfo.getFileInformationLevel());
        }
    
        @Test
        @DisplayName("Test parameterized constructor with end of file value")
        void testParameterizedConstructor() {
            // Test with specific end of file value
            long endOfFile = 1024L;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.9K bytes
    - Viewed (0)
  3. src/test/java/jcifs/smb/FileEntryTest.java

                return length;
            }
    
            @Override
            public int getFileIndex() {
                return fileIndex;
            }
        }
    
        // Functional helpers for concise parameterized tests
        private interface IntGetter {
            int apply(FileEntry e);
        }
    
        private interface LongGetter {
            long apply(FileEntry e);
        }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 10K bytes
    - Viewed (0)
  4. src/test/java/jcifs/smb1/smb1/FileEntryTest.java

                assertEquals(-10L, mock.length());
            }
        }
    
        @ParameterizedTest(name = "getType returns {0}")
        @ValueSource(ints = { 0, 1, -5, Integer.MAX_VALUE })
        @DisplayName("Parameterized type values")
        void typeParameterized(int type) {
            FileEntry mock = mock(FileEntry.class);
            when(mock.getType()).thenReturn(type);
            assertEquals(type, mock.getType());
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 3K bytes
    - Viewed (0)
  5. src/test/java/jcifs/smb1/smb1/AllocInfoTest.java

            verify(mockAllocInfo, times(1)).getCapacity();
            verify(mockAllocInfo, times(1)).getFree();
        }
    
        /**
         * Parameterised test of capacity values, including edge cases such as
         * zero and negative capacities.
         */
        @ParameterizedTest
        @ValueSource(longs = { 0L, -1L, Long.MAX_VALUE })
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 2.4K bytes
    - Viewed (0)
  6. src/test/java/jcifs/smb/BufferCacheImplTest.java

            assertEquals(3, third.length, "Allocated buffer length matches configured maximum size");
        }
    
        // Parameterized: exercise small variations of cache size for a simple reuse cycle
        @ParameterizedTest
        @ValueSource(ints = { 1, 2 })
        @DisplayName("Parameterized: buffer reuse works for various small cache sizes")
        void reuseWorksForVariousCacheSizes(int cacheSize) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7.5K bytes
    - Viewed (0)
  7. src/test/java/jcifs/smb/SMBProtocolDowngradeExceptionTest.java

     */
    @ExtendWith(MockitoExtension.class)
    class SMBProtocolDowngradeExceptionTest {
    
        /**
         * Provides messages including edge cases (null and empty) for parameterized testing.
         */
        static Stream<Arguments> messages() {
            return Stream.of(Arguments.of((String) null), Arguments.of(""), Arguments.of("unexpected downgrade"));
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.4K bytes
    - Viewed (0)
  8. src/test/java/jcifs/netbios/NbtExceptionTest.java

                    "The error string should match the expected message for given error class and code");
        }
    
        /**
         * Provides arguments for the testGetErrorString parameterized test.
         * Covers all defined error classes and codes, including default cases.
         */
        private static Stream<Arguments> provideErrorClassAndCodeForGetErrorString() {
            return Stream.of(
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.9K bytes
    - Viewed (0)
  9. src/test/java/jcifs/spnego/NegTokenInitTest.java

        private static final String SPNEGO_OID_STR = SpnegoConstants.SPNEGO_MECHANISM;
    
        // Helper to build a SPNEGO NegTokenInit as per NegTokenInit#toByteArray but parameterized for tests
        private static byte[] buildInitToken(ASN1ObjectIdentifier[] mechs, Integer flags, byte[] mechToken, byte[] mic, boolean micInTag4,
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 21K bytes
    - Viewed (0)
  10. src/test/java/jcifs/smb/DosFileFilterTest.java

            new DosFileFilter("*.*", SmbFile.ATTR_ARCHIVE);
            new DosFileFilter("?", SmbFile.ATTR_DIRECTORY);
            new DosFileFilter("file.txt", SmbFile.ATTR_READONLY | SmbFile.ATTR_HIDDEN);
        }
    
        /**
         * Parameterized test for the {@link DosFileFilter#accept(SmbFile)} method.
         * This test covers various combinations of file attributes and filter attributes
         * to ensure the bitwise logic is correctly implemented.
         *
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 6.2K bytes
    - Viewed (0)
Back to top