public void setup()
 {
     rover_move = MockRepository.GenerateMock<IRoverMove>();
     rover = Instance.Create<Rover>();
     rover.Heading = Compass.north;
     rover_tasks = new RoverTasks(rover_move);
 }
 public void Should_be_able_deploy_robot_at_given_coordinates_in_plateau_facing_given_direction_and_instruct()
 {
     result = rover.deploy().at(coordinates).@in(plateau).facing_towards(direction).move_using(instructions);
     Assert.AreEqual(3, result.Coordinates.point_x);
     Assert.AreEqual(3, result.Coordinates.point_y);
     Assert.AreEqual('n', result.Heading.Key);
 }
 public void setup()
 {
     rover = Instance.Create<Rover>();
     coordinates = new Coordinates { point_x = 3, point_y = 2 };
     plateau = new Plateau { coordinates = new Coordinates { point_x = 5, point_y = 5 } };
     direction = 'n';
 }
 public void setup()
 {
     rover = Instance.Create<Rover>();
     plateau = new Plateau { coordinates = new Coordinates { point_x = 5, point_y = 5 } };
     coordinates = new Coordinates { point_x = 1, point_y = 2 };
     direction = 'n';
     instructions = "LMLMLMLMM";
     result = rover.deploy().at(coordinates).@in(plateau).facing_towards(direction).move_using(instructions);
 }
 public Direction(Rover rover)
 {
     this.rover = rover;
 }
 public void setup()
 {
     coordinates = new Coordinates { point_x = 1, point_y = 1 };
     rover = new Rover { Coordinates = coordinates, Heading = Compass.north };
     rover_move = new RoverMove();
 }
 public ControlRover(Rover rover)
 {
     this.rover = rover;
 }
 public void setup()
 {
     rover = Instance.Create<Rover>();
     coordinates = new Coordinates { point_x = 1, point_y = 2 };
 }
Exemple #9
0
 public RoverCoordinates(Rover rover)
 {
     rover_to_deploy = rover;
 }
 public RoverCoordinates(Rover rover)
 {
     rover_to_deploy = rover;
 }
 public void spin_right(ref Rover rover)
 {
     rover.Heading = Compass.Get(rover.Heading.right_direction);
 }
 public void spin_left(ref Rover rover)
 {
     rover.Heading = Compass.Get(rover.Heading.left_direction);
 }
 public void move_a_step(ref Rover rover)
 {
     rover.Heading.apply(rover_move, rover);
 }
 public RoverInPlateau(Rover rover_to_deploy)
 {
     this.rover_to_deploy    = rover_to_deploy;
     validate_rover_position = ValidateRoverPosition.validate;
 }
Exemple #15
0
 public ControlRover(Rover rover)
 {
     this.rover = rover;
 }