Ejemplo n.º 1
0
        public void TestLeftCommand()
        {
            var rover = new Rover();

            rover.Stand(new Point(1, 1), Direction.NORTH);

            var cmd = new LeftCommand(rover);

            Assert.IsTrue(cmd.Validate());

            cmd.Execute();

            Assert.AreEqual(rover.Position.X, 1);
            Assert.AreEqual(rover.Position.Y, 1);
            Assert.AreEqual(rover.Direction, Direction.WEST);
        }