public void Anagram_DictionaryNull_ShouldReturnEmpty(Anagram.AnagramAlgorithm algorithm) { var input = "ABCD"; var expected = new List <string>(); var output = new Anagram().GetAnagrams(input, null); Assert.AreEqual(output.Count, 0); Console.WriteLine(String.Join("\n", output)); Assert.IsFalse(output.Except(expected).Any(), "not expected"); }
public void Anagram_Null_ShouldReturnEmpty(Anagram.AnagramAlgorithm algorithm) { string input = null; var givenDictionary = new List <string>() { "ACDB", "DADBCD", "HELLO", "DCBA" }; var expected = new List <string>(); var output = new Anagram().GetAnagrams(input, givenDictionary); Assert.AreEqual(output.Count, 0); Console.WriteLine(String.Join("\n", output)); Assert.IsFalse(output.Except(expected).Any(), "not expected"); }