public void GetProductInfoNoPremmision() { userService.SignIn("Big Smoke", "123"); StoreManagementService service = (StoreManagementService)market.GetStoreManagementService(userService, "X"); MarketAnswer ans = service.GetProductInfo("name0"); Assert.AreEqual((int)ViewProductInfoStatus.NoAuthority, ans.Status); }
public void ProductInfoProductNotAvailable() { userService.SignIn("Arik1", "123"); StoreManagementService service = (StoreManagementService)market.GetStoreManagementService(userService, "X"); MarketAnswer ans = service.GetProductInfo("name0"); Assert.AreEqual((int)StoreEnum.ProductNotFound, ans.Status); }
public void GetProductInfoStoreNotExists() { userService.SignIn("Arik1", "123"); StoreManagementService service = (StoreManagementService)market.GetStoreManagementService(userService, "storeNotExists"); MarketAnswer ans = service.GetProductInfo("name0"); Assert.AreEqual((int)StoreEnum.StoreNotExists, ans.Status); }
public void GetProductInfoSuccess() { userService.SignIn("Arik1", "123"); StoreManagementService service = (StoreManagementService)market.GetStoreManagementService(userService, "X"); service.AddNewProduct("GOLD", 5, "NONO", 8); MarketAnswer ans = service.GetProductInfo("GOLD"); Assert.AreEqual((int)ViewProductInfoStatus.Success, ans.Status); string expected = " name: GOLD base price: 5 description: NONO"; Assert.AreEqual(expected, ans.ReportList[0]); }