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

            Assert.AreEqual(word, result);
        }
Ejemplo n.º 2
0
        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());
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 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);
        }