Exemplo n.º 1
0
        public void FindUsingPrimeNumberHashingEmptyListIfNull()
        {
            var anagram = new Anagram(null);

            var result = anagram.FindUsingPrimeNumberHashing();

            Assert.IsNotNull(result);
            Assert.AreEqual(0, result.Count());
        }
Exemplo n.º 2
0
        public void FindUsingPrimeNumberHashingOneAnagram()
        {
            var anagram = new Anagram(new[] { "word", "drwo" });

            var result = anagram.FindUsingPrimeNumberHashing();

            Assert.IsNotNull(result);
            Assert.AreEqual(1, result.Count());
            Assert.AreEqual(2, result.ElementAt(0).Count());
            Assert.AreEqual("word", result.ElementAt(0).ElementAt(0));
            Assert.AreEqual("drwo", result.ElementAt(0).ElementAt(1));
        }