public void MarsRover_CurrentDirectionIsEast_RotateRight_TurnsToSouth() { IDirection direction = new East(); Mock <IGrid> grid = new Mock <IGrid>(); MarsRover marsRover = new MarsRover(direction, new Coordinates(0, 0), grid.Object); marsRover.RotateRight(); Assert.That(marsRover.CurrentDirection, Is.TypeOf <South>()); }
public void Rotate_Right(string initialDirection, string expectedDirection) { var direction = Direction.FromCode(initialDirection); var position = Position.Create(0, 0); var sut = new MarsRover(direction, position); sut.RotateRight(); var expected = Direction.FromCode(expectedDirection); sut.Direction.Should().Be(expected); }
public void Invoke(MarsRover marsRover) { marsRover.RotateRight(); }