Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for testDecode (0.05 sec)

  1. src/test/java/org/codelibs/core/net/URLUtilTest.java

     *
     */
    public class URLUtilTest extends TestCase {
    
        /**
         * @throws Exception
         */
        public void testEncode() throws Exception {
            assertEquals("Program+Files", URLUtil.encode("Program Files", "UTF-8"));
        }
    
        /**
         * @throws Exception
         */
        public void testDecode() throws Exception {
            assertEquals("Program Files", URLUtil.decode("Program+Files", "UTF-8"));
        }
    
        /**
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Sat May 10 01:32:17 UTC 2025
    - 1.9K bytes
    - Viewed (0)
  2. src/test/java/org/codelibs/core/misc/Base64UtilTest.java

        /**
         * @throws Exception
         */
        public void testEncode() throws Exception {
            assertEquals("1", ENCODED_DATA, Base64Util.encode(BINARY_DATA));
            System.out.println(Base64Util.encode(new byte[] { 'a', 'b', 'c' }));
        }
    
        /**
         * @throws Exception
         */
        public void testDecode() throws Exception {
            final byte[] decodedData = Base64Util.decode(ENCODED_DATA);
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Sat May 10 01:32:17 UTC 2025
    - 1.5K bytes
    - Viewed (0)
  3. src/test/java/jcifs/dcerpc/ndr/NdrHyperTest.java

            verify(mockNdrBuffer, times(1)).enc_ndr_hyper(testValue);
            verifyNoMoreInteractions(mockNdrBuffer);
        }
    
        @Test
        void testDecode() throws NdrException {
            // Test the decode method
            long decodedValue = 112233445566778L;
            NdrHyper ndrHyper = new NdrHyper(0); // Initialize with a dummy value
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 2.2K bytes
    - Viewed (0)
  4. src/test/java/jcifs/smb1/dcerpc/msrpc/samrTest.java

                verify(mockNdrBuffer).enc_ndr_referent(null, 1);
            }
    
            @Test
            @DisplayName("Should decode entry correctly")
            void testDecode() throws NdrException {
                // Given: Mocked buffer data
                samr.SamrSamEntry entry = new samr.SamrSamEntry();
                when(mockNdrBuffer.dec_ndr_long()).thenReturn(1, 100); // idx, _name_bufferp
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 33.6K bytes
    - Viewed (0)
  5. src/test/java/jcifs/dcerpc/msrpc/samrTest.java

                verify(mockNdrBuffer).enc_ndr_referent(null, 1);
            }
    
            @Test
            @DisplayName("Should decode entry correctly")
            void testDecode() throws NdrException {
                // Given: Mocked buffer data
                samr.SamrSamEntry entry = new samr.SamrSamEntry();
                when(mockNdrBuffer.dec_ndr_long()).thenReturn(1, 100); // idx, _name_bufferp
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 33.7K bytes
    - Viewed (0)
  6. src/test/java/jcifs/dcerpc/ndr/NdrShortTest.java

            }
        }
    
        @Nested
        @DisplayName("Decoding Tests")
        class DecodingTests {
    
            @Test
            @DisplayName("Should decode value correctly")
            void testDecode() throws NdrException {
                // Given: NdrShort and mock returning specific value
                int decodedValue = 200;
                NdrShort ndrShort = new NdrShort(0);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.2K bytes
    - Viewed (0)
  7. src/test/java/jcifs/dcerpc/ndr/NdrObjectTest.java

         * Verifies that the decode method of a concrete implementation is called
         * and interacts with the NdrBuffer as expected.
         * @throws NdrException if decoding fails.
         */
        @Test
        void testDecode() throws NdrException {
            // When
            ndrObject.decode(mockBuffer);
    
            // Then
            // Verify that our mock buffer had the expected method called.
            verify(mockBuffer).dec_ndr_long();
        }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 3.4K bytes
    - Viewed (0)
  8. src/test/java/jcifs/dcerpc/ndr/NdrSmallTest.java

            verify(mockNdrBuffer, times(1)).enc_ndr_small(100);
            verifyNoMoreInteractions(mockNdrBuffer);
        }
    
        @Test
        void testDecode() throws NdrException {
            // Define the value that dec_ndr_small should return
            int decodedValue = 200;
            when(mockNdrBuffer.dec_ndr_small()).thenReturn(decodedValue);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 3.2K bytes
    - Viewed (0)
  9. src/test/java/jcifs/smb1/util/Base64Test.java

                    Arguments.of("////", new byte[] { (byte) 0xff, (byte) 0xff, (byte) 0xff })); // all 0xFF bytes
        }
    
        @ParameterizedTest(name = "decode({1}) -> {2}")
        @MethodSource("decodeProvider")
        void testDecode(String encoded, byte[] expected) {
            // Act
            byte[] actual = Base64.decode(encoded);
            // Assert
            assertArrayEquals(expected, actual, "Base64.decode should return original bytes");
        }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 3K bytes
    - Viewed (0)
  10. src/test/java/jcifs/internal/fscc/FileBasicInfoTest.java

            assertEquals(TEST_LAST_WRITE_TIME, decoded.getLastWriteTime());
            assertEquals(TEST_ATTRIBUTES, decoded.getAttributes());
        }
    
        @Test
        @DisplayName("Test decode method")
        void testDecode() throws SMBProtocolDecodingException {
            // First encode using a known FileBasicInfo
            FileBasicInfo original =
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.5K bytes
    - Viewed (0)
Back to top