public async Task TestConvertNotExist(string type, string from, string to, decimal value) { var httpClient = new IntergrationTestProvider().Client; var response = await Record.ExceptionAsync(() => httpClient.GetAsync($"api/convert/{type}/{from}/{to}/{value}")); Assert.Equal(typeof(ConversionNotFoundException), response.GetType()); }
public async Task TestConvertEndpointSuccess(string type, string from, string to, decimal value) { var httpClient = new IntergrationTestProvider().Client; var response = await httpClient.GetAsync($"api/convert/{type}/{from}/{to}/{value}"); response.EnsureSuccessStatusCode(); Assert.Equal(HttpStatusCode.OK, response.StatusCode); }