Class Base32SupportTest

    • Field Detail

      • INVALID_BASE32_TRAILING

        private static final String INVALID_BASE32_TRAILING
        Invalid base32 string as it has invalid trailing digits. Correctly fails with commons-codec 1.14 and greater.
        See Also:
        CODEC-270, Constant Field Values
      • INVALID_BASE32

        private static final String INVALID_BASE32
        Invalid base32, should not produce a result.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Base32SupportTest

        public Base32SupportTest()
    • Method Detail

      • testDecodeInvalidInput

        public void testDecodeInvalidInput()
                                    throws DecodingException
        Test that an invalid base32 input string does not return a response, instead throwing a DecodingException.
        Throws:
        DecodingException - when base32 decoding fails, expected.
      • testDecodeInvalidTrailingBitsInput

        public void testDecodeInvalidTrailingBitsInput()
                                                throws DecodingException
        Test that when the last encoded character (before the paddings if any) is a valid base 32 alphabet but not a possible value an DecodingException is thrown.
        Throws:
        DecodingException - when base32 decoding fails
      • testEncode

        public void testEncode()
                        throws EncodingException
        Test encoding a byte array works.
        Throws:
        EncodingException - if there is an issue encoding the byte array, should not happen.