public void ShouldReturnProductWithEan() { Product result = null; ProductListRepository repo = new ProductListRepository(); result = repo.GetByEan13(""); Assert.IsTrue(result == null); }
public void ShouldReturnProductList() { List <Product> result = null; ProductListRepository repo = new ProductListRepository(); result = repo.GetAll(); Assert.IsTrue(result != null && result.Count > 0); }
public void ShouldReturnProduct() { Product result = null; IProductRepository repo = new ProductListRepository(); result = repo.GetById(1); Assert.IsTrue(result != null && result is Product); }
/// <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); }
public ActionResult PurchasableProductList() { return(View("~/Views/Catalog/PurchasableProductList.cshtml", ProductListRepository.GetProductListRenderingModel())); }