Example #1
0
        public void ConstructorDefaultTest()
        {
            Base32HexEncoder decoder = new Base32HexEncoder();

            Common.AreEqual(Base32HexEncoder.StandardAlphabet, decoder.Alphabet);
            Assert.AreEqual(Base32HexEncoder.StandardPadding, decoder.Padding);
        }
Example #2
0
        public void GetDecoderTest()
        {
            Base32HexEncoder encoder = new Base32HexEncoder();
            Decoder          decoder = encoder.GetDecoder();

            Assert.IsNotNull(decoder);
            Assert.IsInstanceOf(typeof(Base32HexDecoder), decoder);
        }
Example #3
0
        public void PaddingTest()
        {
            Base32HexEncoder encoder     = new Base32HexEncoder();
            char             testPadding = '?';

            encoder.Padding = testPadding;
            Assert.AreEqual(testPadding, encoder.Padding);
        }
Example #4
0
        public void AlphabetTest()
        {
            char[]           testAlphabet = new char[] { 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'Z', 'X', 'C', 'V', 'B', 'N', 'M', '1', '2', '3', '4', '5', '6' };
            Base32HexEncoder encoder      = new Base32HexEncoder();

            encoder.Alphabet = testAlphabet;
            Common.AreEqual(testAlphabet, encoder.Alphabet);
        }
Example #5
0
        public void AlphabetShortTest()
        {
            Base32HexEncoder encoder = new Base32HexEncoder();

            encoder.Alphabet = new char[1];
        }
Example #6
0
        public void AlphabetNullTest()
        {
            Base32HexEncoder encoder = new Base32HexEncoder();

            encoder.Alphabet = null;
        }