Class Base64SupportTest

    • Constructor Detail

      • Base64SupportTest

        public Base64SupportTest()
    • Method Detail

      • setUp

        @BeforeClass
        public void setUp()
                   throws org.apache.commons.codec.DecoderException
        Throws:
        org.apache.commons.codec.DecoderException
      • testEncodeEmptyByteArray

        public void testEncodeEmptyByteArray()
                                      throws EncodingException
        Test encoding an empty byte array produces an empty string and does not throw any exceptions.
        Throws:
        EncodingException - on encoding failure. Should not happen.
      • testEmptyDecodedOutput

        public void testEmptyDecodedOutput()
                                    throws DecodingException
        Test that an empty input produces a byte array of 0 length.
        Throws:
        DecodingException - on decoding failure.
      • testDecodeInvalidTrailingBitsInput

        public void testDecodeInvalidTrailingBitsInput()
                                                throws DecodingException
        Test that when the last encoded character (before the paddings if any) is a valid base 64 alphabet but not a possible value, a DecodingException is thrown.
        Throws:
        DecodingException - on decoding failure.
      • testEncodeURLSafe

        public void testEncodeURLSafe()
                               throws EncodingException
        Test Base64 encoding content.
        Throws:
        EncodingException - thrown if failure to base64 encode