예제 #1
0
        public void GiveToAllPlayersOneOtherPlayerTest()
        {
            _game.AddPlayer("Horse");
            _target.Execute(_player);

            var expected = _initialCash + Amount;

            foreach (var player in _game.GetPlayers().Where(p => p != _player))
            {
                Assert.AreEqual(expected, player.Cash);
            }

            Assert.AreEqual(GetExpectedReducedCash(), _player.Cash);
        }
예제 #2
0
        public void ReceiveFromAllPlayersTwoOtherPlayersTest()
        {
            _target = new GiveToAllPlayers(_game, -Amount);
            _game.AddPlayer("Horse");
            _game.AddPlayer("Thimble");
            _target.Execute(_player);

            var expected = _initialCash - Amount;

            foreach (var player in _game.GetPlayers().Where(p => p != _player))
            {
                Assert.AreEqual(expected, player.Cash);
            }

            Assert.AreEqual(GetExpectedAdddCash(), _player.Cash);
        }