GetScore() public method

public GetScore ( ) : string
return string
Esempio n. 1
0
        public void NonExistingNameWonPoint()
        {
            var game = new TennisGame2("player1", "player2");

            game.WonPoint("player3");
            Assert.AreEqual(game.GetScore(), "Love-All");
        }
Esempio n. 2
0
        public void TennisGame2ShouldAddScoreForPlayer1()
        {
            var game = new TennisGame2();

            game.SetP1Score(1);
            game.SetP1Score(1);

            Assert.That(game.GetScore(), Is.EqualTo("Thirty-Love"));
        }
Esempio n. 3
0
        public void ActualPlayerHasWon()
        {
            var game = new TennisGame2("Vojta", "Jakub");

            for (int i = 0; i < 6; ++i)
            {
                game.WonPoint("Vojta");
            }
            Assert.AreEqual(game.GetScore(), "Win for Vojta");
        }