public async void GetScenariosForProject_ValidProjectId_ReturnsScenarioModelList() { // Assert var projectId = "623be379-ed40-49f3-bdd8-416f8cd0faa6"; var httpService = new HttpService(new HttpClient()); var scenarioClient = new ScenarioClient( httpService ); // Act var result = await scenarioClient.GetScenariosForProject(projectId); // Assert Assert.NotEmpty(result); }
public async void GetScenariosForProject_OkStatusCode_ReturnsScenarioModelList() { // Arrange var httpResponseMessage = new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(ScenarioModelDataMocks.MockScenarioModelListJson) }; var httpService = new Mock <IHttpService>(); httpService .Setup(m => m.GetAsync(It.IsAny <string>())) .ReturnsAsync(httpResponseMessage); var scenarioClient = new ScenarioClient(httpService.Object); // Act var result = await scenarioClient.GetScenariosForProject(It.IsAny <string>()); // Assert Assert.NotEmpty(result); }