public PagamentoController(IPagamentoService pagamentoService, IAluguelService aluguelService, IMapper mapper) { _pagamentoService = pagamentoService; _aluguelService = aluguelService; _mapper = mapper; }
public void Initialize() { //Arrange var builder = new DbContextOptionsBuilder <alugaiContext>(); builder.UseInMemoryDatabase("alugai"); var options = builder.Options; _context = new alugaiContext(options); _context.Database.EnsureDeleted(); _context.Database.EnsureCreated(); var alugueis = new List <Aluguel> { new Aluguel { CodigoAluguel = 1, Descricao = "Aluguel da Maria", CodigoStatusPagamento = 1 }, new Aluguel { CodigoAluguel = 2, Descricao = "Aluguel do João", CodigoStatusPagamento = 2 }, new Aluguel { CodigoAluguel = 3, Descricao = "Aluguel do josé", CodigoStatusPagamento = 3 }, }; _context.AddRange(alugueis); _context.SaveChanges(); _aluguelService = new AluguelService(_context); }
public AluguelController(IAluguelService aluguelService, IStatuspagamentoService statuspagamentoService, IMapper mapper) { _aluguelService = aluguelService; _statusPagamentoService = statuspagamentoService; _mapper = mapper; }
public AluguelController(IAluguelService service) { this.service = service; }
public void Initialize() { service = new AluguelService(aluguelRepository, veiculoRepository); }