public void Ensure_Latitude_Decrements_By_One_When_Moving_West() { var latitude = 5; var lawnMower = new LawnMowerModel() { Direction = Directions.West, Position = new GeoCoordinate(latitude, 5) }; lawnMower = new LawnmowerInstructions().MoveForward(lawnMower); Assert.AreEqual(lawnMower.Position.Latitude, latitude -= 1); }
public void Ensure_Longitude_Decrements_By_One_When_Moving_South() { var longitude = 5; var lawnMower = new LawnMowerModel() { Direction = Directions.South, Position = new GeoCoordinate(2, longitude) }; lawnMower = new LawnmowerInstructions().MoveForward(lawnMower); Assert.AreEqual(lawnMower.Position.Longitude, longitude -= 1); }