public void ReturnSpecifiedValueOfFeeWhenRequestGetFeeValue() { InterestCalculatorModel icModel = new InterestCalculatorModel(); var result = icModel.GetFeeValue(); Assert.Equal(0.01M, result); Assert.IsType <decimal>(result); }
public async Task GetFeeValue() { var client = _factory.CreateClient(); var response = await client.GetAsync("interestCalculator/taxaJuros"); var valueString = await response.Content.ReadAsStringAsync(); InterestCalculatorModel icModel = new InterestCalculatorModel(); response.EnsureSuccessStatusCode(); NumberStyles style = NumberStyles.AllowDecimalPoint; CultureInfo provider = new CultureInfo("en-US"); Assert.Equal(icModel.GetFeeValue(), Decimal.Parse(valueString, style, provider)); }