Execute() public method

public Execute ( Game game, IMessageLog log ) : void
game Game
log IMessageLog
return void
        public void MoveCommandWritesToLog()
        {
            player1.JumpTo(1, 1);
            var command = new PlayerMoveCommand { Player = player1, Direction = Direction.Up };
            command.Execute(game, log);

            Assert.AreEqual(1, log.Messages.Count);
        }
        public void NoLogWrittenForNullMove()
        {
            player1.JumpTo(0, 1);
            var command = new PlayerMoveCommand { Player = player1, Direction = Direction.Left };
            command.Execute(game, log);

            Assert.AreEqual(0, log.Messages.Count);
        }
        public void MoveCommandTriggersPlayerMove()
        {
            player1.JumpTo(1, 1);
            var command = new PlayerMoveCommand { Player = player1, Direction = Direction.Up };
            command.Execute(game, log);

            Assert.AreEqual(game.Board.SlotAt(1, 0), player1.Position);
        }