public void RoverController_LostCommand() { Guid id = new Guid("67968965-e69a-420c-a28a-9e7109692140"); RoverCommandRequest request = new RoverCommandRequest { Commands = "RMMLMMRMMMM" }; RoverController controller = new RoverController(); RoverCommandResponse response = controller.PostCommand(id, request); Assert.IsNotNull(response.Rover); Assert.AreEqual(response.Success, false); Assert.AreEqual(response.FinalCoordinates, "15, 12, E"); Assert.AreEqual(response.Rover.State, RoverState.Lost); }
public void RoverController_SuccessCommand() { Guid id = new Guid("ac077fdf-ca63-45b2-9c63-74f73383d8c8"); RoverCommandRequest request = new RoverCommandRequest { Commands = "LMMRMMR" }; RoverController controller = new RoverController(); RoverCommandResponse response = controller.PostCommand(id, request); Assert.IsNotNull(response.Rover); Assert.AreEqual(response.Success, true); Assert.AreEqual(response.FinalCoordinates, "3, 7, E"); Assert.AreEqual(response.Rover.State, RoverState.Active); }