public async Task GetAsync_Test2_Lost() { //Arrange MartianRobotDTO martianRobot = new MartianRobotBuilder() .withName("") .build(); //Act var objectToTest = new List <InstructionDTO>(); objectToTest.Add(new InstructionDTO() { XPosition = 1, YPosition = 1, Direction = "E", Commands = "RFRFRFRF" }); objectToTest.Add(new InstructionDTO() { XPosition = 3, YPosition = 2, Direction = "N", Commands = "FRRFLLFFRRFLL" }); var result = await martianRobotService.GetAsync(5, 3, objectToTest); //Assert Assert.NotNull(result); Assert.True(result.Count > 1); Assert.True(result[result.Count - 1].Result == "3 3 N LOST"); }
public async Task GetAsync_Test3_OK() { //Arrange MartianRobotDTO martianRobot = new MartianRobotBuilder() .withName("") .build(); //Act var objectToTest = new List <InstructionDTO>(); objectToTest.Add(new InstructionDTO() { XPosition = 0, YPosition = 3, Direction = "W", Commands = "LLFFFLFLFL" }); var result = await martianRobotService.GetAsync(5, 3, objectToTest); //Assert Assert.NotNull(result); Assert.True(result.Count > 1); Assert.True(result[result.Count - 1].Result != "2 3 S"); }