Ejemplo n.º 1
0
        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());
        }
Ejemplo n.º 2
0
        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);
        }