Exemplo n.º 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])));
            }
        }
Exemplo n.º 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]));
            }
        }