예제 #1
0
        public void AbsobtionTest()
        {
            const string text     = "one";
            var          alphabet = new Alphabet(text);

            for (int i = 0; i < text.Length; i++)
            {
                Assert.AreEqual(i, alphabet.IndexOf(alphabet[i]));
                Assert.AreEqual(text[i], alphabet.CharAt(
                                    alphabet.IndexOf(text[i])));
            }
        }
예제 #2
0
        public void IndexOfTest()
        {
            const string text     = "one";
            var          alphabet = new Alphabet(text);

            for (int i = 0; i < text.Length; i++)
            {
                Assert.AreEqual(i, alphabet.IndexOf(text[i]));
            }
        }