Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 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);
 }
Exemplo n.º 3
0
 public void Setup()
 {
     this._repository = new FakeAppointmentRepository();
     this._service    = new AppointmentDeleteService(_repository);
 }