public AppointmentsController(ILogger <AppointmentsController> logger, ContextEntity context) { _logger = logger; _context = new AppointmentRepositoryEntity(context); _contextClient = new ClientRepositoryEntity(context); _contextOperator = new OperatorRepositoryEntity(context); _contextCar = new CarRepositoryEntity(context); _save = new AppointmentSaveService(_context, _contextCar, _contextClient, _contextOperator); _list = new AppointmentListService(_context); _delete = new AppointmentDeleteService(_context); }
public AppointmentsController(ILogger <AppointmentsController> logger, ContextEntity context) { _logger = logger; _context = new AppointmentRepositorySQLDriver(); _contextClient = new ClientRepositorySQLDriver(); _contextOperator = new OperatorRepositorySQLDriver(); _contextCar = new CarRepositorySQLDriver(); _save = new AppointmentSaveService(_context, _contextCar, _contextClient, _contextOperator, new PDFWriter()); _list = new AppointmentListService(_context); _delete = new AppointmentDeleteService(_context); _listCarAvailable = new ListAppointmentByPeriod(_context); _userListAppointment = new ListAppointmentClientsService(_context); _simulate = new AppointmentSimulateService(_context, _contextCar); }
public void Setup() { this._repository = new FakeAppointmentRepository(); this._service = new AppointmentListService(_repository); }