コード例 #1
0
ファイル: KuhlschrankTest.cs プロジェクト: pr0z/Kuhlschrank
        public void ShouldReturnProductWithEan()
        {
            Product result             = null;
            ProductListRepository repo = new ProductListRepository();

            result = repo.GetByEan13("");

            Assert.IsTrue(result == null);
        }
コード例 #2
0
ファイル: KuhlschrankTest.cs プロジェクト: pr0z/Kuhlschrank
        public void ShouldReturnProductList()
        {
            List <Product>        result = null;
            ProductListRepository repo   = new ProductListRepository();

            result = repo.GetAll();

            Assert.IsTrue(result != null && result.Count > 0);
        }
コード例 #3
0
ファイル: KuhlschrankTest.cs プロジェクト: pr0z/Kuhlschrank
        public void ShouldReturnProduct()
        {
            Product            result = null;
            IProductRepository repo   = new ProductListRepository();

            result = repo.GetById(1);

            Assert.IsTrue(result != null && result is Product);
        }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UnitOfWork"/> class.
 /// </summary>
 /// <param name="context">Database context.</param>
 public UnitOfWork(PayingSystemDataBaseContext context)
 {
     Context               = context;
     AccountRepository     = new AccountRepository(context);
     ClientRepository      = new ClientRepository(context);
     AddressRepository     = new AddressRepository(context);
     ShopRepository        = new ShopRepository(context);
     ProductListRepository = new ProductListRepository(context);
     ProductRepository     = new ProductRepository(context);
 }
コード例 #5
0
 public ActionResult PurchasableProductList()
 {
     return(View("~/Views/Catalog/PurchasableProductList.cshtml", ProductListRepository.GetProductListRenderingModel()));
 }