예제 #1
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);
        }
예제 #2
0
 public CustomBundlesController(ICustomBundlesService customBundlesService)
 {
     _customBundlesService = customBundlesService;
 }