예제 #1
0
 public void Test1540()
 {
     Game game = new Game();
     game.PlayerTwoWinsPoint();
     game.PlayerOneWinsPoint();
     game.PlayerTwoWinsPoint();
     game.PlayerTwoWinsPoint();
     Assert.AreEqual("15 - 40", game.Score());
 }
예제 #2
0
        public void TestAdvP2()
        {
            Game game = new Game();
            for (int i = 0; i < 3; i++)
            {
                game.PlayerOneWinsPoint();
                game.PlayerTwoWinsPoint();
            }
            game.PlayerTwoWinsPoint();

            Assert.AreEqual("advantage player two", game.Score());
        }
예제 #3
0
        public void TestDeuce()
        {
            Game game = new Game();
            for (int i = 0; i < 5; i++)
            {
                game.PlayerOneWinsPoint();
                game.PlayerTwoWinsPoint();
            }

            Assert.AreEqual("deuce", game.Score());
        }
예제 #4
0
        public void Test3030()
        {
            Game game = new Game();
            for (int i = 0; i < 2; i++)
            {
                game.PlayerOneWinsPoint();
                game.PlayerTwoWinsPoint();
            }

            Assert.AreEqual("30 all", game.Score());
        }
예제 #5
0
 public void TestGameOver()
 {
     Game game = new Game();
     game.PlayerTwoWinsPoint();
     game.PlayerOneWinsPoint();
     game.PlayerTwoWinsPoint();
     game.PlayerTwoWinsPoint();
     game.PlayerTwoWinsPoint();
     Assert.AreEqual(true, game.GameOver);
 }
예제 #6
0
        public void TestP2Wins()
        {
            Game game = new Game();
            for (int i = 0; i < 3; i++)
            {
                game.PlayerOneWinsPoint();
                game.PlayerTwoWinsPoint();
            }
            game.PlayerTwoWinsPoint();
            game.PlayerTwoWinsPoint();

            Assert.AreEqual("player two wins", game.Score());
        }