Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for testDecode (0.25 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/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)
  5. 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)
  6. 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)
  7. okhttp-hpacktests/src/test/java/okhttp3/internal/http2/HpackDecodeInteropTest.kt

      @ArgumentsSource(StoriesTestProvider::class)
      fun testGoodDecoderInterop(story: Story) {
        assumeFalse(
          story === Story.MISSING,
          "Test stories missing, checkout git submodule",
        )
        testDecoder(story)
      }
    
      internal class StoriesTestProvider : SimpleProvider() {
        override fun arguments(): List<Any> = createStories(HpackJsonUtil.storiesForCurrentDraft())
      }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  8. okhttp-hpacktests/src/test/java/okhttp3/internal/http2/HpackRoundTripTest.kt

        )
    
        val newCases = mutableListOf<Case>()
        for (case in story.cases) {
          hpackWriter.writeHeaders(case.headersList)
          newCases += case.copy(wire = bytesOut.readByteString())
        }
    
        testDecoder(story.copy(cases = newCases))
      }
    
      companion object {
        private val RAW_DATA = arrayOf("raw-data")
      }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2K bytes
    - Viewed (0)
  9. src/test/java/org/codelibs/fess/filter/EncodingFilterTest.java

            paramMap = filter.parseQueryString("=", "UTF-8");
            assertEquals(1, paramMap.size());
            assertEquals("", paramMap.get("")[0]);
    
        }
    
        public void test_decode() throws IOException {
            final EncodingFilter filter = new EncodingFilter();
            Map<String, String[]> paramMap;
    
            paramMap = filter.parseQueryString("a=%E3%83%86%E3%82%B9%E3%83%88", "UTF-8");
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Sat Mar 15 06:53:53 UTC 2025
    - 3.3K bytes
    - Viewed (0)
  10. okhttp-hpacktests/src/test/java/okhttp3/internal/http2/HpackDecodeTestBase.kt

     */
    open class HpackDecodeTestBase {
      private val bytesIn = Buffer()
      private val hpackReader = Hpack.Reader(bytesIn, 4096)
    
      protected fun testDecoder(story: Story) {
        for (testCase in story.cases) {
          val encoded = testCase.wire ?: continue
          bytesIn.write(encoded)
          hpackReader.readHeaders()
          assertSetEquals(
            "seqno=$testCase.seqno",
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.2K bytes
    - Viewed (0)
Back to top