public void Should_Move_Back_When_Seeing_Specific_Direction(int x, int y, Direction direction, int xExpected, int yExpected) { MarsRover marsRover = new MarsRover(x, y, direction); marsRover.GoBack(); Assert.Equal(new Point(xExpected, yExpected), marsRover.Point); }
public void Should_Move_Back_When_Out_Of_The_World(int x, int y, Direction direction, int xExpected, int yExpected) { MarsRover marsRover = new MarsRover(x, y, direction); marsRover.GoBack(); Assert.Equal(new Point(xExpected, yExpected), marsRover.Point); }
public void Should_Dont_Move_Back_When_Obstacle() { List <Point> obstacles = new List <Point>() { new Point(0, -1) }; MarsRover marsRover = new MarsRover(0, 0, Direction.North, obstacles); marsRover.GoBack(); Assert.Equal(new Point(0, 0), marsRover.Point); }