Ejemplo 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));
        }
Ejemplo 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));
        }
Ejemplo 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));
        }
Ejemplo 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));
        }