public async Task ValidaDivisao(int numeroA, int numeroB, int resultadoEsperado) { using var client = new TestClientProvider("Development").Client; var response = await client.GetStringAsync($"/calculos/divide/{numeroA}/{numeroB}"); response.Should().NotBeNull(); response.Should().NotBeEmpty(); response.Should().Be(resultadoEsperado.ToString()); int.Parse(response).Should().BePositive(); }
public async Task ValidaDivisao(int numeroA, int numeroB, int resultadoEsperado) { //Arrange using var client = new TestClientProvider("Development").Client; //Act var response = await client.GetStringAsync($"/calculos/divide/{numeroA}/{numeroB}"); //Assert Assert.NotNull(response); Assert.IsType <string>(response); Assert.Equal(resultadoEsperado, int.Parse(response)); }