Пример #1
0
        public void WordScore_CanUserEnterAWord_Hello()
        {
            string input  = "hi";
            int    result = Scrabble.WordScore(input);

            Assert.AreEqual(5, result);
        }
Пример #2
0
    static void Main()
    {
        Console.WriteLine("Enter a word and find out how many points this word is worth in Scrabble!");
        string input  = Console.ReadLine();
        Regex  regex  = new Regex(@"[^a-zA-Z]+");
        Match  result = regex.Match(input);

        Console.WriteLine("Your word score is: " + Scrabble.WordScore(input));
    }
Пример #3
0
        public void WordScore_CanUserEnterALetter_A()
        {
            //Arrange
            string input = "a";
            //Act
            int result = Scrabble.WordScore(input);

            //Assert
            Assert.AreEqual(1, result);
        }