コード例 #1
0
        public void GetEncoderTest()
        {
            Base32HexDecoder decoder = new Base32HexDecoder();
            Encoder          encoder = decoder.GetEncoder();

            Assert.IsNotNull(encoder);
            Assert.IsInstanceOf(typeof(Base32HexEncoder), encoder);
        }
コード例 #2
0
        public void PaddingTest()
        {
            Base32HexDecoder decoder     = new Base32HexDecoder();
            char             testPadding = '?';

            decoder.Padding = testPadding;
            Assert.AreEqual(testPadding, decoder.Padding);
        }
コード例 #3
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' };
            Base32HexDecoder decoder      = new Base32HexDecoder();

            decoder.Alphabet = testAlphabet;
            Common.AreEqual(testAlphabet, decoder.Alphabet);
        }
コード例 #4
0
        public void InvalidCharacterTest()
        {
            Base32HexDecoder decoder = new Base32HexDecoder();

            decoder.Decode("ABCDE!");
        }
コード例 #5
0
        public void IsCaseSensitiveTest()
        {
            Base32HexDecoder decoder = new Base32HexDecoder();

            Assert.IsFalse(decoder.IsCaseSensitive);
        }
コード例 #6
0
        public void AlphabetShortTest()
        {
            Base32HexDecoder decoder = new Base32HexDecoder();

            decoder.Alphabet = new char[1];
        }
コード例 #7
0
        public void AlphabetNullTest()
        {
            Base32HexDecoder decoder = new Base32HexDecoder();

            decoder.Alphabet = null;
        }