public void TLocationConstructor() { MarsRover.Point point = new Point(2, 3); MarsRover.Direction direction = Direction.E; MarsRover.Location target = new MarsRover.Location(point, direction); Assert.AreEqual(target.ToString(), "2 3 E"); }
public void TGetLocation() { string directionInput = "1 2 E"; MarsRover.Location expected = new Location(new Point(1, 2), Direction.E); MarsRover.Location actual; actual = MarsRover.Location.GetLocation(directionInput); Assert.AreEqual(expected.ToString(), actual.ToString()); }
public void TLocationConstructor2() { MarsRover.Point point = new Point(2,2); MarsRover.Location target = new MarsRover.Location(point); Assert.AreEqual(target.ToString(), "2 2 N"); }
public void TGetLocation2() { try { string directionInput = string.Empty; MarsRover.Location expected = new Location(new Point(1, 2), Direction.E); MarsRover.Location actual; actual = MarsRover.Location.GetLocation(directionInput); Assert.AreEqual(expected.ToString(), actual.ToString()); } catch (Exception ex) { Assert.Fail(ex.Message); } }