public PromocodesController(
     IRepository <PromoCode> promoCodesRepository,
     IRepository <Customer> customersRepository,
     IPreferencesGateway preferencesGateway)
 {
     _promoCodesRepository = promoCodesRepository;
     _customersRepository  = customersRepository;
     _preferencesGateway   = preferencesGateway;
 }
Example #2
0
 public CustomersController(
     IRepository <Customer> customerRepository,
     IRepository <PromoCode> promoCodeRepository,
     IPreferencesGateway preferencesGateway)
 {
     _customerRepository = customerRepository;
     // _preferenceRepository = preferenceRepository;
     _promoCodeRepository = promoCodeRepository;
     _preferencesGateway  = preferencesGateway;
 }
 public CustomersControllerTests(EfDatabaseFixture efDatabaseFixture)
 {
     _customerRepository   = new EfRepository <Customer>(efDatabaseFixture.DbContext);
     _preferenceRepository = new EfRepository <Preference>(efDatabaseFixture.DbContext);
     _promocodeRepository  = new EfRepository <PromoCode>(efDatabaseFixture.DbContext);
     _preferencesGateway   = new PreferencesGateway(new HttpClient());
     _customersController  = new CustomersController(
         _customerRepository,
         _promocodeRepository,
         _preferencesGateway);
 }
Example #4
0
 public PartnersController(IRepository <Partner> partnersRepository,
                           INotificationGateway notificationGateway,
                           IGivingPromoCodeToCustomerGateway givingPromoCodeToCustomerGateway,
                           IAdministrationGateway administrationGateway,
                           IPreferencesGateway preferencesGateway)
 {
     _partnersRepository  = partnersRepository;
     _notificationGateway = notificationGateway;
     _givingPromoCodeToCustomerGateway = givingPromoCodeToCustomerGateway;
     _administrationGateway            = administrationGateway;
     _preferencesGateway = preferencesGateway;
 }
Example #5
0
 public PreferencesController(
     IPreferencesGateway preferencesGateway)
 {
     _preferencesGateway = preferencesGateway;
 }