public void DoCommand_ValidReportSampleFromAssessment_Equal_1() { // arrange IToyRobot robot = new ToyRobot(new TableSurface(5, 5)); // act robot.DoCommand("PLACE 0,0,NORTH"); robot.DoCommand("MOVE"); var output = robot.DoCommand("REPORT"); // assert Assert.AreEqual("Report: 0,1,NORTH", output); }
public void DoCommand_ValidPlace_LocationValid() { // arrange IToyRobot robot = new ToyRobot(new TableSurface(5, 5)); // act robot.DoCommand("PLACE 2,2,SOUTH"); // assert Assert.AreEqual(2, robot.Location.X); Assert.AreEqual(2, robot.Location.Y); Assert.AreEqual(Location.Direction.SOUTH, robot.Location.F); }
public void DoCommand_ValidReport_Equal() { // arrange IToyRobot robot = new ToyRobot(new TableSurface(5, 5)); // act robot.DoCommand("PLACE 4,3,WEST"); robot.DoCommand("MOVE"); robot.DoCommand("MOVE"); robot.DoCommand("LEFT"); robot.DoCommand("MOVE"); var output = robot.DoCommand("REPORT"); // assert Assert.AreEqual("Report: 2,2,SOUTH", output); }