Beispiel #1
0
        public void WhenLastRoundOfGame_ShouldLastPropertyFalse()
        {
            var gameFixture = new GameFixture();
            var game        = gameFixture.CreateGame();

            gameFixture.StartAnyGame(2);

            var round1 = game.Run(gameFixture.GetUsersInGame());

            Assert.False(round1.LastRound);

            var round2 = game.Run(gameFixture.GetUsersInGame());

            Assert.True(round2.LastRound);
        }
Beispiel #2
0
        public void DoNotRunGame_IfNotStartGameFirst()
        {
            var gameFixture = new GameFixture();
            var game        = new GameFixture().CreateGame();

            Assert.Throws <GameNotStartedException>(() => game.Run(gameFixture.GetUsersInGame()));
        }
Beispiel #3
0
        public void WhenRunTheGame_ThenCurrentRoundShouldIncrease()
        {
            var gameFixture = new GameFixture();
            var game        = gameFixture.CreateGame();

            gameFixture.StartAnyGame();

            game.Run(gameFixture.GetUsersInGame());

            Assert.Equal(1, game.CurrentRound);
        }