Ejemplo n.º 1
0
        public void MakeDictionary_TestDictionaryIsMade_DictionaryPopulated()
        {
            Leetspeak testLeetspeak = new Leetspeak();

            testLeetspeak.MakeDictionary();
            Assert.AreEqual('3', testLeetspeak.GetDictionaryValue('e'));
        }
Ejemplo n.º 2
0
        public void FoundKeyInDictionary_TestForIfKeyIsFound_True()
        {
            Leetspeak testLeetspeak = new Leetspeak();
            char      character     = 'e';

            testLeetspeak.MakeDictionary();
            Assert.AreEqual(true, testLeetspeak.FoundKeyInDictionary(character));
        }
Ejemplo n.º 3
0
        public void FoundKeyInDictionary_TestForIfKeyIsNotFound_False()
        {
            Leetspeak testLeetspeak = new Leetspeak();
            char      character     = 'M';

            testLeetspeak.MakeDictionary();
            Assert.AreEqual(false, testLeetspeak.FoundKeyInDictionary(character));
        }
Ejemplo n.º 4
0
        public void ReplaceValues_TestValuesAreReplaced_PhraseIsConverted()
        {
            Leetspeak testLeetspeak = new Leetspeak();

            testLeetspeak.MakeDictionary();
            testLeetspeak.SetUserInput("sleets");
            List <char> leetWord = new List <char>()
            {
                's', 'l', '3', '3', '7', 'z'
            };

            CollectionAssert.AreEqual(leetWord, testLeetspeak.ReplaceValues());
        }
Ejemplo n.º 5
0
        public void CreateLeetspeak_TestValuesAreReplaced_PhraseIsConverted()
        {
            Leetspeak testLeetspeak = new Leetspeak();

            testLeetspeak.SetUserInput("sleets");
            testLeetspeak.MakeDictionary();
            testLeetspeak.CreateLeetspeak();
            List <char> leetPhrase = new List <char> {
                's', 'l', '3', '3', '7', 'z'
            };

            CollectionAssert.AreEqual(leetPhrase, testLeetspeak.GetModifiedPhrase());
        }