Пример #1
0
        public void TestScrabbleFunction()
        {
            string userInput = "Scrabble";
            int    testScore = 14;

            Assert.AreEqual(testScore, Scrabble.ScrabbleCalc(userInput));
        }
Пример #2
0
        public void TestCalc_Pass()
        {
            Scrabble testPass    = new Scrabble();
            int      testCounter = 14;

            Assert.AreEqual(testCounter, testPass.ScrabbleCalc("Python"));
        }
Пример #3
0
        public void TestCalc_Fail()
        {
            Scrabble testFail    = new Scrabble();
            int      testCounter = 9;

            Assert.AreEqual(testCounter, testFail.ScrabbleCalc("Ruby"));
        }
Пример #4
0
        public ActionResult Display()
        {
            Scrabble.DeleteAll();
            Scrabble newScrabble = new Scrabble();
            string   userInput   = (Request.Form["scrabbleInput"]);

            Scrabble.SetUserWord(userInput);
            string userWord = Scrabble.GetUserWord();
            int    result   = Scrabble.ScrabbleCalc(userInput);

            return(View("Index", newScrabble));
        }