예제 #1
0
        public void NumbersTo83AreVBalid(int prefixZeros)
        {
            var pre = new string('0', prefixZeros);

            for (var i = 0; i < 83; i++)
            {
                var encoded = Base83.Encode(i, prefixZeros + 1);

                Assert.Equal(pre + Base83.Charset[i], encoded);
            }
        }
예제 #2
0
        public void EncodeIsCorrect(int value, string expected)
        {
            var encoded = Base83.Encode(value, 2);

            Assert.Equal(expected, encoded);
        }