Esempio n. 1
0
        public void AddProductToCategorySuccess()
        {
            _userService.EnterSystem();
            _userService.SignIn("Arik1", "123");
            StoreManagementService liorSession = (StoreManagementService)_market.GetStoreManagementService(_userService, "T");
            MarketAnswer           ans         = liorSession.AddProductToCategory("WanderlandItems", "OnePunchManPoster");

            Assert.AreEqual((int)StoreEnum.Success, ans.Status);
        }
Esempio n. 2
0
        public void AddProductToCategoryWhenHasNoPremmision()
        {
            _userService.EnterSystem();
            _userService.SignIn("Big Smoke", "123");
            StoreManagementService liorSession = (StoreManagementService)_market.GetStoreManagementService(_userService, "X");
            MarketAnswer           ans         = liorSession.AddProductToCategory("WanderlandItems", "BOX");

            Assert.AreEqual((int)StoreEnum.NoPermission, ans.Status);
        }
Esempio n. 3
0
        public void AddProductToCategoryWhenStoreNotExists()
        {
            _userService.EnterSystem();
            _userService.SignIn("Arik1", "123");
            StoreManagementService liorSession = (StoreManagementService)_market.GetStoreManagementService(_userService, "storeNotExists");
            MarketAnswer           ans         = liorSession.AddProductToCategory("WanderlandItems", "BOX");

            Assert.AreEqual((int)StoreEnum.StoreNotExists, ans.Status);
        }
Esempio n. 4
0
        public void AddProductToCategoryWhenProductInCategory()
        {
            _userService.EnterSystem();
            _userService.SignIn("Arik1", "123");
            StoreManagementService liorSession =
                (StoreManagementService)_market.GetStoreManagementService(_userService, "T");
            MarketAnswer ans = liorSession.AddProductToCategory("WanderlandItems", "Fraid Egg");

            Assert.AreEqual((int)StoreEnum.ProductAlreadyInCategory, ans.Status);
        }