public void ProduceDictionaryOfChars_NullListProvided_ShouldNotThrowErrors() { Program.dashList = new List <char>() { }; var result = Bonus_DictionaryMatches.ProduceDictionaryOfChars(Program.dashList); Assert.AreEqual(result.Count, 0); }
public void DictionaryMatches_EmptyDashes_ShouldNotThrowError() { Program.dashList = new List <char>() { }; var dictionary = Bonus_DictionaryMatches.ProduceDictionaryOfChars(Program.dashList); var result = Bonus_DictionaryMatches.DictionaryMatches(dictionary, Program.dashList); Assert.AreEqual(result, 0); }
public void ProduceDictionaryOfChars_ShouldAddOnlyCharsToList() { Program.dashList = new List <char>() { '_', 'A', 'I', 'I' }; var result = Bonus_DictionaryMatches.ProduceDictionaryOfChars(Program.dashList); Assert.AreEqual(result.Count, 3); }
public void DictionaryMatches_MatchListCleared_ShouldNotThrowError() { Bonus_DictionaryMatches.matches.Clear(); Program.dashList = new List <char>() { 'A', 'C', 'C', '_', '_', '_', '_', '_', '_', '_' }; var dictionary = Bonus_DictionaryMatches.ProduceDictionaryOfChars(Program.dashList); var result = Bonus_DictionaryMatches.DictionaryMatches(dictionary, Program.dashList); Assert.AreEqual(result, 2); }