Example #1
0
        public ActionResult GetAllProducts()
        {
            productContainer.ClearList();
            productContainer.AllProducts();
            List <Product> productslist = productContainer.GetList();

            return(PartialView("../Partials/_productDisplay", productslist));
        }
Example #2
0
        public void Check_Get_AllProducts_In_Container()
        {
            //Arrange
            var productDALStub   = new ProductDALStub();
            var productContainer = new ProductContainer(productDALStub);

            productDALStub.ExistReturnValue = false;

            //Act
            productContainer.AllProducts();

            //Assert
            Assert.True(productDALStub.ExistReturnValue);
        }