Exemplo n.º 1
0
 public void Get_Rover_Location_Without_Commands()
 {
     result       = new Result();
     rover        = new Rover(new Position(2, 2), Direction.N);
     roverService = new RoverService(rover, new Plateau(5, 5, new Result()), new Result());
     Assert.AreEqual(roverService.GetCurrentLocation(), "2 2 N");
 }
Exemplo n.º 2
0
 public void When_Command_Exceeds_The_Limits()
 {
     result       = new Result();
     rover        = new Rover(new Position(3, 3), Direction.N);
     roverService = new RoverService(rover, new Plateau(5, 5, new Result()), new Result());
     roverService.Process("MMMMMMMMMMR");
     Assert.AreEqual(roverService.GetCurrentLocation(), "3 5 E");
 }
Exemplo n.º 3
0
 public void Rover_Check_Location_Success()
 {
     result       = new Result();
     rover        = new Rover(new Position(1, 1), Direction.N);
     roverService = new RoverService(rover, new Plateau(5, 5, new Result()), new Result());
     roverService.Process("MRML");
     Assert.AreEqual(roverService.GetCurrentLocation(), "2 2 N");
 }
Exemplo n.º 4
0
 public void Second_Rover_Check_Location_Success()
 {
     result       = new Result();
     rover        = new Rover(new Position(3, 3), Direction.E);
     roverService = new RoverService(rover, new Plateau(5, 5, new Result()), new Result());
     roverService.Process("MMRMMRMRRM");
     Assert.AreEqual(roverService.GetCurrentLocation(), "5 1 E");
 }