예제 #1
0
        public void ScrabbleScoreGenerator_ForUserInputAbdfkjq_33()
        {
            string        userInput         = "abdfkjq";
            ScrabbleScore testScrabbleScore = new ScrabbleScore(userInput);
            int           result            = testScrabbleScore.ScrabbleScoreGenerator();
            int           expectedResult    = 33;

            Assert.Equal(expectedResult, result);
        }
예제 #2
0
        public void ScrabbleScoreGenerator_ForUserInputNumber_0()
        {
            string        userInput         = "42";
            ScrabbleScore testScrabbleScore = new ScrabbleScore(userInput);
            int           result            = testScrabbleScore.ScrabbleScoreGenerator();
            int           expectedResult    = 0;

            Assert.Equal(expectedResult, result);
        }
예제 #3
0
        public void ScrabbleScoreGenerator_ForUserInputBody_10()
        {
            string        userInput         = "body";
            ScrabbleScore testScrabbleScore = new ScrabbleScore(userInput);
            int           result            = testScrabbleScore.ScrabbleScoreGenerator();
            int           expectedResult    = 10;

            Assert.Equal(expectedResult, result);
        }
예제 #4
0
        public void FindLetterScore_ReturnLetterScore_String()
        {
            //arrange
            string        LetterScore      = "w = 4, o = 1, r = 1, d = 2, ";
            ScrabbleScore newScrabbleScore = new ScrabbleScore("word");
            //act
            string result = newScrabbleScore.FindLetterScore();

            //assert
            Assert.Equal(LetterScore, result);
        }
예제 #5
0
        public void SplitWord_BreakUserInputUpInto_Array()
        {
            //arrange
            char[]        splitWordArray   = new char[] { 'w', 'o', 'r', 'd' };
            ScrabbleScore newScrabbleScore = new ScrabbleScore("word");

            //act
            char[] result = newScrabbleScore.SplitWord();
            //assert
            Assert.Equal(splitWordArray, result);
        }
예제 #6
0
        public void ReturnWord_ReturnUserInput_String()
        {
            //arrange
            string        word             = "word";
            ScrabbleScore newScrabbleScore = new ScrabbleScore("word");
            //act
            string result = newScrabbleScore.GetUserInput();

            //assert
            Assert.Equal(word, result);
        }
예제 #7
0
        public void FindLetterScore_ReturnTotalScore_String()
        {
            //arrange
            int           totalAddedScore  = 8;
            ScrabbleScore newScrabbleScore = new ScrabbleScore("word");
            //act
            int result = newScrabbleScore.FindTotalScore();

            //assert
            Assert.Equal(totalAddedScore, result);
            Console.WriteLine(result);
        }