Example #1
0
        public void EditProductNameSuccessfully()
        {
            userService.SignIn("Arik1", "123");
            StoreManagementService liorSession = (StoreManagementService)market.GetStoreManagementService(userService, "X");

            liorSession.AddNewProduct("GOLD", 5, "NONO", 8);
            MarketAnswer ans  = liorSession.EditProduct("GOLD", "MOMO", "5", "NONO");
            Product      find = handler.GetProductByNameFromStore(liorSession._storeName, "MOMO");

            Assert.IsNotNull(find);
            Assert.AreEqual((int)StoreEnum.Success, ans.Status);
        }
Example #2
0
        protected void IsProductNameAvailableInStore(string name)
        {
            Product P = DataLayerInstance.GetProductByNameFromStore(_storeName, name);

            if (P == null)
            {
                throw new StoreException(StoreEnum.ProductNotFound, "Product Name is already Exists In Shop");
            }
        }
Example #3
0
        private bool IsProductNameAvailableInStore(string storeName, string productName)
        {
            Product product = storeLogic.GetProductByNameFromStore(storeName, productName);

            return(product == null);
        }