public void GoForwardButNowIsHeadingNorthEdgeShouldThrowException() { IPosition position = new Position(0, 5); IHeading heading = new HeadingNorth(); IList<char> MovingInstruction = new List<char>(); MovingInstruction.Add('M'); var robot = new Robot(0, position, heading, MovingInstruction, _targetPlateau); robot.Move(); }
public void GoForwardToNorth() { IPosition position = new Position(1, 2); IHeading heading = new HeadingNorth(); IList<char> MovingInstruction = new List<char>(); MovingInstruction.Add('M'); var robot = new Robot(0, position, heading, MovingInstruction, _targetPlateau); robot.Move(); Assert.AreEqual(1, robot.CurrentPosition.X); Assert.AreEqual(3, robot.CurrentPosition.Y); Assert.AreEqual(typeof(HeadingNorth), robot.Heading.GetType()); }