Example #1
0
        public HomeModule()
        {
            Get["/"] = _ => View["index.cshtml"];

            Post["/move_form"] = _ => {
                ScrabbleApp obj    = new ScrabbleApp();
                int         output = obj.MoveScore(Request.Form["playerMove"]);
                return(View["index.cshtml", output]);
            };
        }
Example #2
0
        public void MoveScore_EachLetterTotal_allPossibleEquals33()
        {
            //Arrange
            ScrabbleApp testScrabble = new ScrabbleApp();

            //Act
            int testResult = testScrabble.MoveScore("adbfkjq");

            //Accept
            Assert.Equal(33, testResult);
        }
Example #3
0
        public void MoveScore_EachLetterEqualsOne_aeEquals2()
        {
            //Arrange
            ScrabbleApp testScrabble = new ScrabbleApp();

            //Act
            int testResult = testScrabble.MoveScore("ae");

            //Accept
            Assert.Equal(2, testResult);
        }