public void Should_MoveForward_OneStep()
        {
            // Arrange
            _machine.CurrentLocation = new Location()
            {
                X = 0, Y = 0
            };
            _machine.direction = Direction.North;
            _machine.MaxX      = 10;
            _machine.MaxY      = 10;
            // Act
            _machine.MoveForward(1);

            // Assert
            Assert.AreEqual(_machine.CurrentLocation.X, 0);
            Assert.AreEqual(_machine.CurrentLocation.Y, 1);
        }
Exemple #2
0
 public void Execute(ILawnMowerMachine machine)
 {
     machine.MoveForward(MoveBy);
 }