public void MakeDictionary_TestDictionaryIsMade_DictionaryPopulated() { Leetspeak testLeetspeak = new Leetspeak(); testLeetspeak.MakeDictionary(); Assert.AreEqual('3', testLeetspeak.GetDictionaryValue('e')); }
public void FoundKeyInDictionary_TestForIfKeyIsFound_True() { Leetspeak testLeetspeak = new Leetspeak(); char character = 'e'; testLeetspeak.MakeDictionary(); Assert.AreEqual(true, testLeetspeak.FoundKeyInDictionary(character)); }
public void FoundKeyInDictionary_TestForIfKeyIsNotFound_False() { Leetspeak testLeetspeak = new Leetspeak(); char character = 'M'; testLeetspeak.MakeDictionary(); Assert.AreEqual(false, testLeetspeak.FoundKeyInDictionary(character)); }
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()); }
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()); }