Esempio n. 1
0
        public void CheckIfAnagram_WordIsAnagram_True()
        {
            string        stringToTest = "bread";
            List <string> tempList     = new List <string> {
                "beard"
            };
            Anagram newAnagram = new Anagram("beard", tempList);

            Assert.AreEqual(true, newAnagram.CheckIfAnagram(stringToTest));
        }
Esempio n. 2
0
        public void CheckIfPartialMatch_WordIsPartialMatch_True()
        {
            string        stringToTest = "bread";
            List <string> tempList     = new List <string> {
                "red"
            };
            Anagram newAnagram = new Anagram("bread", tempList);

            Assert.AreEqual(true, newAnagram.CheckIfAnagram(stringToTest));
        }
Esempio n. 3
0
        public void CheckIfAnagram_WordLengthsDiffer_False()
        {
            string        stringToTest = "beer";
            List <string> tempList     = new List <string> {
                "bread"
            };
            Anagram newAnagram = new Anagram("bread", tempList);

            Assert.AreEqual(false, newAnagram.CheckIfAnagram(stringToTest));
        }
Esempio n. 4
0
        public void CheckIfAnagram_WordIsNotAnagram_False()
        {
            string        stringToTest = "bread";
            List <string> tempList     = new List <string> {
                "beers"
            };
            Anagram newAnagram = new Anagram("beers", tempList);

            Assert.AreEqual(false, newAnagram.CheckIfAnagram(stringToTest));
        }