Exemplo n.º 1
0
        public void A_game_is_concerted_started_when_a_payout_structure_has_been_assign()
        {
            var game = new Game(new BuyIn(20));

            game.AddEntrant(new Player());
            game.AddEntrant(new Player());
            game.AddEntrant(new Player());

            Assert.False(game.IsStarted());


            game.AddPayouts(TwoPlayerPayout());

            Assert.True(game.IsStarted());
        }
Exemplo n.º 2
0
        public void Cannot_assign_a_new_payout_structure_if_the_game_has_started()
        {
            var game = new Game(new BuyIn(20));

            game.AddEntrant(new Player());
            game.AddEntrant(new Player());
            game.AddEntrant(new Player());


            game.AddPayouts(TwoPlayerPayout());

            Assert.True(game.IsStarted());
            Assert.Throws<ArgumentException>(() => game.AddPayouts(TwoPlayerPayout()));
            Assert.True(game.IsStarted());
        }