public void Test_RunCommand() {
     Robot robot = new Robot();
     RemoteController controller = new RemoteController(robot);
     controller.RunCommand("Place 1,2,EAST");
     controller.RunCommand("Move");
     controller.RunCommand("Move");
     controller.RunCommand("LEFT");
     controller.RunCommand("Move");
     
     Assert.AreEqual(robot.Report(), "Output: 3,3,NORTH");
 }
Beispiel #2
0
 public void Test_ReportAfterPlaceCmd()
 {
     Robot robot = new Robot();
     PlaceAtOrigin(robot);
     robot.Move();
     robot.Right();
     Assert.AreEqual(robot.Report(), "Output: 0,1,EAST");
 }
Beispiel #3
0
 public void Test_ReportBeforePlaceCmd()
 {
     Robot robot = new Robot();
     Assert.AreEqual(robot.Report(),"Error");
 }