コード例 #1
0
        public CategoriesControllerTest()
        {
            var options = new DbContextOptionsBuilder <WebShopContext>()
                          .UseInMemoryDatabase("TestDb")
                          .Options;

            _context = new WebShopContext(options);
            TestDbInitializer.Initialize(_context);
            _service    = new WebShopServices(_context);
            _controller = new CategoriesController(_service);
        }
コード例 #2
0
        public ProductsControllerTest()
        {
            var options = new DbContextOptionsBuilder <WebShopContext>()
                          .EnableSensitiveDataLogging()
                          .UseInMemoryDatabase("TestDb")
                          .Options;

            _context = new WebShopContext(options);
            TestDbInitializer.Initialize(_context);
            _service    = new WebShopServices(_context);
            _controller = new ProductsController(_service);
        }
コード例 #3
0
 public OrderController(AccountService accountService, WebShopServices service)
     : base(accountService, service)
 {
 }
コード例 #4
0
 public BaseController(AccountService accountService, WebShopServices service)
 {
     _accountService = accountService;
     _service        = service;
 }
コード例 #5
0
 public ProductsController(WebShopServices service)
 {
     _service = service;
 }
コード例 #6
0
 public OrderController(WebShopServices service)
 {
     _service = service;
 }
コード例 #7
0
 public CategoriesController(WebShopServices service)
 {
     _service = service;
 }
コード例 #8
0
 public CategoriesController(AccountService accountService, WebShopServices service)
     : base(accountService, service)
 {
 }