public void CanReportARobotsPosition() { var startPosition = SimpleVector(); var robot = new WarriorRobot(); robot.UploadArena(new Arena(1, 1)); robot.StartAt(startPosition); RobotVector reportedPosition = robot.ReportPosition(); Assert.That(reportedPosition, Is.EqualTo(startPosition)); }
public void ExecutingASingleCommandUpdatesThePositionAsExpected() { var startPosition = new RobotVector(new Position(0, 0), Heading.North); var robot = new WarriorRobot(); robot.UploadArena(new Arena(1, 1)); robot.StartAt(startPosition); var commandList = new List <RobotCommand>(); commandList.Add(new MoveForwards()); robot.ExecuteCommandList(commandList); RobotVector reportedPosition = robot.ReportPosition(); Assert.That(startPosition, Is.Not.EqualTo(reportedPosition)); }