public void editProductInStoreWithManagerPermission() { ProductInStore pis = ProductManager.getInstance().getProductInStore(ss.addProductInStore("cola", 10, 4, zahi, store.getStoreId(), "Drink")); Assert.AreEqual(1, store.getProductsInStore().Count); ss.removeManagerPermission("editProductInStore", store.getStoreId(), "aviad", zahi); ss.editProductInStore(aviad, store.getStoreId(), pis.getProductInStoreId(), 13, 4.5); Assert.AreEqual(10, pis.getPrice()); Assert.AreEqual(4, pis.getAmount()); }
public void simpleEditProductInStore() { Assert.AreEqual(ss.editProductInStore(zahi, store.getStoreId(), cola.getProductInStoreId(), 100, 5.2), 0); Assert.AreEqual(cola.getAmount(), 100); Assert.AreEqual(cola.getPrice(), 5.2); }