public void ShouldBeInLimitCo_OrdinatesFromOutput() { var rover = TestableRover.Create(); IPosition position = new RoverPosition(1, 2); rover.PrompterMock.SetupProperty(x => x.Command, "MMMMMMMMMMMMMM"); rover.PrompterMock.Setup(x => x.IsValid()).Returns(true); _firstRover = new Rover(position, rover.PrompterMock.Object, DirectionType.N); _firstRover.Execute(); }
public void ShouldBeSecondRoverValidOutput() { var rover = TestableRover.Create(); IPosition position = new RoverPosition(3, 3); rover.PrompterMock.SetupProperty(x => x.Command, "MMRMMRMRRM"); rover.PrompterMock.Setup(x => x.IsValid()).Returns(true); _secondRover = new Rover(position, rover.PrompterMock.Object, DirectionType.E); var result = _secondRover.Execute(); Assert.AreEqual("5 1 E", result); }
public void ShouldBeFirstRoverValidOutput() { var rover = TestableRover.Create(); IPosition position = new RoverPosition(1, 2); rover.PrompterMock.SetupProperty(x => x.Command, "LMLMLMLMM"); rover.PrompterMock.Setup(x => x.IsValid()).Returns(true); _firstRover = new Rover(position, rover.PrompterMock.Object, DirectionType.N); var result = _firstRover.Execute(); Assert.AreEqual("1 3 N", result); }