public async Task ApiPortService_GetAvailableFormatsAsync(ApiPortService apiPortService, EndpointStatus expectedStatus) { var expected = new List<string> { "Json", "HTML", "Excel" }; var serviceResponse = await apiPortService.GetResultFormatsAsync(); var headers = serviceResponse.Headers; var result = serviceResponse.Response; Assert.Equal(expectedStatus, headers.Status); Assert.Equal(expected.Count(), result.Count()); Assert.Equal(0, expected.Except(result.Select(r => r.DisplayName)).Count()); }
public void ApiPortService_GetAvailableFormats() { var expected = new List<string> { "Json", "HTML", "Excel" }; var apiPortService = new ApiPortService( ServiceEndpoint, new ProductInformation("ApiPort_Tests", typeof(ApiPortServiceTests))); var result = apiPortService.GetResultFormatsAsync().Result.Response; Assert.Equal(expected.Count(), result.Count()); Assert.Equal(0, expected.Except(result.Select(r => r.DisplayName)).Count()); }
public async Task ApiPortService_GetAvailableFormatsAsync() { var expected = new List <string> { "Json", "HTML", "Excel" }; var serviceResponse = await _apiPortService.GetResultFormatsAsync(); var result = serviceResponse.Response; Assert.Equal(expected.Count(), result.Count()); Assert.Empty(expected.Except(result.Select(r => r.DisplayName))); }
public void ApiPortService_GetAvailableFormats() { var expected = new List <string> { "Json", "HTML", "Excel" }; var apiPortService = new ApiPortService( ServiceEndpoint, new ProductInformation("ApiPort_Tests", typeof(ApiPortServiceTests))); var result = apiPortService.GetResultFormatsAsync().Result.Response; Assert.Equal(expected.Count(), result.Count()); Assert.Equal(0, expected.Except(result.Select(r => r.DisplayName)).Count()); }
public async Task ApiPortService_GetAvailableFormatsAsync(ApiPortService apiPortService, EndpointStatus expectedStatus) { var expected = new List <string> { "Json", "HTML", "Excel" }; var serviceResponse = await apiPortService.GetResultFormatsAsync(); var headers = serviceResponse.Headers; var result = serviceResponse.Response; Assert.Equal(expectedStatus, headers.Status); Assert.Equal(expected.Count(), result.Count()); Assert.Equal(0, expected.Except(result.Select(r => r.DisplayName)).Count()); }