public void Setup()
 {
     _repository         = new FakeAppointmentRepository();
     _repositoryCar      = new FakeCarRepository();
     _repositoryClient   = new FakeClientRepository();
     _repositoryOperator = new FakeOperatorRepository();
     _repositoryCategory = new FakeBaseRepository <CarCategory>();
     _service            = new AppointmentSaveService(_repository, _repositoryCar, _repositoryClient, _repositoryOperator);
 }
Exemple #2
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);
 }
Exemple #3
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);
 }