Beispiel #1
0
 public CustomBundlesService(ICustomBundlesRepository customBundlesRepository, IBundlesRepository bundlesRepository, IQuestionsRepository questionsRepository, IProductsRepository productsRepository)
 {
     _customBundlesRepository = customBundlesRepository;
     _bundlesRepository       = bundlesRepository;
     _questionsRepository     = questionsRepository;
     _productsRepository      = productsRepository;
 }
Beispiel #2
0
        public CustomBundlesControllerTest()
        {
            _contextOptions = new DbContextOptionsBuilder <DefaultContext>()
                              .UseSqlServer(connectionString)
                              .Options;

            _context = new DefaultContext(_contextOptions);

            customBundlesRepository = new CustomBundlesRepository(_context);
            bundlesRepository       = new BundlesRepository(_context);
            questionsRepository     = new QuestionsRepository(_context);
            productsRepository      = new ProductsRepository(_context);

            _service    = new CustomBundlesService(customBundlesRepository, bundlesRepository, questionsRepository, productsRepository);
            _controller = new CustomBundlesController(_service);
        }