示例#1
0
        public void LessThanTwoPlayersThrowsException()
        {
            Mock<IRoundManager> mockRoundManager = new Mock<IRoundManager>();
            var car = new Player("Car");
            var players = new List<Player>() { car };
            var game = new Game(mockRoundManager.Object, players);

            game.PlayGame();
        }
示例#2
0
        public void MoreThanEightPlayersThrowsException()
        {
            Mock<IRoundManager> mockRoundManager = new Mock<IRoundManager>();

            var car1 = new Player("Car");
            var car2 = new Player("Car");
            var car3 = new Player("Car");
            var car4 = new Player("Car");
            var car5 = new Player("Car");
            var car6 = new Player("Car");
            var car7 = new Player("Car");
            var car8 = new Player("Car");
            var car9 = new Player("Car");

            var players = new List<Player>() { car1, car2, car3, car4, car5, car6, car7, car8, car9 };

            var game = new Game(mockRoundManager.Object, players);

            game.PlayGame();
        }