public async Task <IActionResult> GetJuros() { TaxaJurosService taxaJurosService = new TaxaJurosService(); var txJuros = await taxaJurosService.RetornaTaxaJuros(); return(new JsonResult(txJuros)); }
public TaxaJurosServiceUnitTest() { _mockHtppHandler = new Mock <HttpMessageHandler>(); var httpClient = new HttpClient(_mockHtppHandler.Object); _service = new TaxaJurosService(new Uri(_baseEndpoint), httpClient); }
public void TaxaJurosController_ObterTaxaJuros_Sucesso() { TaxaJurosService taxaJurosService = new TaxaJurosService(); var taxajuros = taxaJurosService.ObterTaxaJuros(); Assert.Contains($"0,01", taxajuros.ToString()); }
public void GetTaxaJuros_E_Igual_1Porcento() { var taxaJurosService = new TaxaJurosService(new TaxaJurosRepository()); decimal valor = 0.01m; Assert.Equal(taxaJurosService.GetTaxaJuros().Result, valor); }
public void TestTaxaJuros() { decimal decToCompare = 0.01m; TaxaJurosService objTaxaJurosService = new TaxaJurosService(new TaxaJurosRepository()); decimal decResultado = objTaxaJurosService.GetTaxaJuros().ValorTaxa; Assert.AreEqual(decToCompare, decResultado); }
public async Task ReturnsCorrectValue(decimal valor) { var options = OptionsHelper.CreateOptionSnapshotMock(new TaxaJurosOptions { Valor = valor }); var sut = new TaxaJurosService(options); decimal result = await sut.GetTaxaAtual(); result.Should().Be(valor); }
public void Result_Should_Be_Equal() { //Arrange var service = new TaxaJurosService(); var esperado = 0.01m; //Act var resultado = service.ObterTaxaJuros(); //Assert Assert.AreEqual(esperado, resultado); }
public TaxaJurosServiceUnitTest() { _service = new TaxaJurosService(); }
public IActionResult Get([FromServices] TaxaJurosService taxaJurosService) { var taxaJuros = taxaJurosService.ObterTaxaJuros(); return(new OkObjectResult(taxaJuros.ToString())); }
public DefaultFixtures() { this.TaxaJurosService = new TaxaJurosService(); }
public TaxaJurosServiceTests() { _taxaJurosService = new TaxaJurosService(); }
public void GetTaxaJuros_RetornaDecimal() { var taxaJurosService = new TaxaJurosService(new TaxaJurosRepository()); Assert.IsType <Task <decimal> >(taxaJurosService.GetTaxaJuros()); }
public TaxaJurosServiceTests() { _repository = Substitute.For <ITaxaJurosRepository>(); _service = new TaxaJurosService(_repository); }
public TaxaJurosAppServiceTests() { _taxaJurosService = new TaxaJurosService(); _taxaJurosAppService = new TaxaJurosAppService(_taxaJurosService); }