public void Setup()
        {
            MapperConfig.RegisterMappings();

            _taxaRepository = new TaxaRepository(new DataContext());
            _taxaService    = new TaxaService(_taxaRepository);
        }
        public JurosService(ITaxaService taxaService)
        {
            if (taxaService == null)
            {
                throw new ArgumentNullException(nameof(taxaService));
            }

            _taxaService = taxaService;
        }
Example #3
0
        public void GetTaxaJuros()
        {
            var _taxaJurosEsperada = 0.01M;

            _serviceMock = new Mock <ITaxaService>();
            _serviceMock.Setup(m => m.GetTaxaJuros()).Returns(new TaxaJurosDto()
            {
                Valor = _taxaJurosEsperada
            });
            _service = _serviceMock.Object;

            var _result = _service.GetTaxaJuros();

            Assert.NotNull(_result);
            Assert.Equal(_taxaJurosEsperada, _result.Valor);
        }
Example #4
0
 public void Setup()
 {
     _mock = Substitute.For <ITaxaRepository>();
     _mock.GetAll().Returns(new List <Taxa>());
     _taxaService = new TaxaService(_mock);
 }
Example #5
0
 public JurosController(ILogger <JurosController> logger, IJurosService service, ITaxaService taxaService)
 {
     _taxaService = taxaService;
     _service     = service;
     _logger      = logger;
 }
 public TaxaController(ITaxaService taxaService) : base(taxaService)
 {
 }
Example #7
0
 public TaxaJurosAppService(ITaxaService taxaService)
 {
     _taxaService = taxaService;
 }
Example #8
0
 //construtor
 public AluguelService(double precohora, double precodia, ITaxaService taxaService)
 {
     PrecoHora    = precohora;
     PrecoDia     = precodia;
     _taxaService = taxaService;
 }
Example #9
0
 public TaxaController(ILogger <TaxaController> logger, ITaxaService service)
 {
     _service = service;
     _logger  = logger;
 }
Example #10
0
 public GerenciarTaxaController(ITaxaService taxaService)
 {
     _taxaService = taxaService;
 }
Example #11
0
 public TaxaController(ITaxaService taxaService)
 {
     _taxaService = taxaService;
 }
 public CalulaJurosControllerTest()
 {
     _service    = new TaxaServiceFake();
     _controller = new CalculaJurosController(_service);
 }
 public JurosService(ITaxaService taxaService,
                     INotificador notificador) : base(notificador)
 {
     _taxaService = taxaService;
 }
 public JurosController(ICalculadorService calculadorService, ITaxaService taxaService)
 {
     _calculadorService = calculadorService;
     _taxaService       = taxaService;
 }
 public CalculaJurosController(ITaxaService taxaService)
 {
     _taxaService = taxaService;
 }