Example #1
0
        public void GetWord_GetWord_String()
        {
            string  word       = "Bread";
            Anagram newAnagram = new Anagram(word);
            string  result     = newAnagram.GetWord();

            Assert.AreEqual(word, result);
        }
        public void SetWord_WordPropertyIsUpdated_String()
        {
            List <string> listToCheck = new List <string> {
                "beers", "beard"
            };
            Anagram newAnagram = new Anagram("stringOne", listToCheck);

            newAnagram.SetWord("stringTwo");
            Assert.AreEqual("stringTwo", newAnagram.GetWord());
        }
        public void GetUserWord_ReturnsWordInputted_String()
        {
            string        word     = "bread";
            List <string> tempList = new List <string> {
                "beer", "beard"
            };
            Anagram newAnagram = new Anagram(word, tempList);
            string  result     = newAnagram.GetWord();

            Assert.AreEqual(word, result);
        }
Example #4
0
        public void SetWord_SetWord_String()
        {
            string  word        = "Bread";
            Anagram newAnagram  = new Anagram(word);
            string  updatedWord = "Beard";

            newAnagram.SetWord(updatedWord);
            string result = newAnagram.GetWord();

            Assert.AreEqual(updatedWord, result);
        }