Пример #1
0
        public void When_a_entrant_is_attempted_to_be_added_more_than_once_it_throw_an_argument_exception() 
        {
            var game = new Game(new BuyIn());

            var entrant = new Player();
            game.AddEntrant(entrant);


            Assert.Throws<ArgumentException>(() => game.AddEntrant(entrant));            
            Assert.Contains(entrant, game.AllEntrants());
            Assert.Equal(1, game.AllEntrants().Count());
        }
Пример #2
0
        public void When_a_player_is_added_to_a_game_its_added_to_the_backing_store()
        {
            var game = new Game(new BuyIn());

            var entrant = new Player();
            game.AddEntrant(entrant);

            Assert.Contains(entrant, game.AllEntrants());
        }
Пример #3
0
        public void When_a_Game_is_constructed_it_should_start_with_zero_players()
        {
            var game = new Game(new BuyIn());

            Assert.Empty(game.AllEntrants());
        }