public async Task <ActionResult> Get(double valorinicial, int meses) { InterestRateAPIService interestRateServiceApi = new InterestRateAPIService(); ShowInterestCalculationService InterestCalculationService = new ShowInterestCalculationService(interestRateServiceApi); InterestRateDTO interestRate = await InterestCalculationService.Execute(valorinicial, meses); return(Ok(interestRate)); }
public async void Make_the_calc() { ShowInterestCalculationService interestCalculationService = new ShowInterestCalculationService(fakeInterestRateAPIService); var result = await interestCalculationService.Execute(100, 5); var expected = 105.10; expected.Should().Be(result.value); }