Ejemplo n.º 1
0
        public async Task <bool> AddToCart(AddCart cart)
        {
            bool buyercart = await _iitemRepository.AddToCart(cart);

            if (buyercart)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 2
0
        public async Task AddToCart_Successfull(int cartId, int buyerId, int itemid, int price, string itemName, string description, int stockno, string remarks, string imageName)
        {
            try
            {
                var cart = new AddToCart {
                    cartId = cartId, buyerId = buyerId, itemId = itemid, price = price, itemName = itemName, description = description, stockNo = stockno, remarks = remarks, imageName = imageName
                };
                var result = await iitemRepository.AddToCart(cart);

                Assert.NotNull(result);
            }
            catch (Exception e)
            {
                Assert.Fail(e.Message);
            }
        }