public void ToString_Returns_Coordinates_And_Orientation_As_String() { // Arrange _sut = new Position(3, 5, 90); // Act var result = _sut.ToString(); // Assert Assert.AreEqual("3 5 E ", result); }
public void ToString_Returns_String_With_LOST_When_Position_Invalid() { // Arrange _sut = new Position(3, 5, 90); _sut.IsValid = false; // Act var result = _sut.ToString(); // Assert Assert.AreEqual("3 5 E LOST", result); }
public Robot(int x, int y, string orientation, IInstructionsParser instructionsParser, Grid grid) { Position = new Position(x, y, orientation.ToDegrees()); _instructionsParser = instructionsParser; _grid = grid; }