示例#1
0
        public ActionResult Input()
        {
            AnagramProgram myWordVariable = new AnagramProgram();

            myWordVariable.SetWord1(Request.Query["Word1"]);
            myWordVariable.SetWord2(Request.Query["Word2"]);
            return(View("Input", myWordVariable));
        }
示例#2
0
        public void CompareSortedWords_WillReturnBool_CompareWords()
        {
            AnagramProgram TestAnagram = new AnagramProgram();

            TestAnagram.SetWord1("save");
            var tempList = new List <string> {
                "vase"
            };

            string[] testArray = { " vase", " ghost", " apple" };
            CollectionAssert.AreEqual(tempList, TestAnagram.Compare(testArray));
        }