Beispiel #1
0
        public void TestKeyGeneration()
        {
            // cryptogambdefhijklnqsuvwxz
            Dictionary <char, int> expected = new Dictionary <char, int>
            {
                { 'c', 1 }, { 'r', 2 }, { 'y', 3 }, { 'p', 4 }, { 't', 5 },
                { 'o', 6 }, { 'g', 7 }, { 'a', 8 }, { 'm', 9 }, { 'b', 10 },
                { 'd', 11 }, { 'e', 12 }, { 'f', 13 }, { 'h', 14 }, { 'i', 15 },
                { 'j', 16 }, { 'k', 17 }, { 'l', 18 }, { 'n', 19 }, { 'q', 20 },
                { 's', 21 }, { 'u', 22 }, { 'v', 23 }, { 'w', 24 }, { 'x', 25 },
                { 'z', 26 }
            };

            //var expected = "cryptogambdefhijklnqsuvwxz";
            var actual = Kata.GetMap("cryptogram");

            //Assert.Equal(expected, actual);
            Assert.True(expected.SequenceEqual(actual));
        }