public void Success_Normal_NoCheckCartItems()
 {
     foreach (ProductIdentifiable product in ProductsRemove)
     {
         Assert.IsTrue(MarketBridge.RemoveProductFromUserCart(product.ProductId));
     }
 }
 public override void Teardown()
 {
     base.Teardown();
     _ = UserBridge.AssureLogin(UserInfo);
     foreach (ProductId productId in ProductsAdditionalTeardown.Select(x => x.ProductId))
     {
         _ = MarketBridge.RemoveProductFromUserCart(productId);
     }
     useCase_addProductToCart.Teardown();
 }
Esempio n. 3
0
 public void Failure_NoShoppingBasket()
 {
     Success_Normal_CheckCartItems();
     Assert.IsFalse(MarketBridge.RemoveProductFromUserCart(ShopImage.ShopProducts[1].ProductId));
     new Assert_SetEquals <ProductId, ProductInCart>
     (
         Enumerable.Empty <ProductInCart>(),
         x => x.ProductId
     ).AssertEquals(MarketBridge.GetShoppingCartItems());
 }
 public override void Teardown()
 {
     base.Teardown();
     if (productsForEdit != null && productsForEdit.ProductsAdd != null)
     {
         foreach (ProductInCart product in productsForEdit.ProductsAdd)
         {
             MarketBridge.RemoveProductFromUserCart(product.ProductId);
         }
     }
     useCase_viewShoppingCart.Teardown();
 }
        public override void Teardown()
        {
            if (UserInfo == null)
            {
                throw new InvalidOperationException("A user which to add the products to his cart must be specified.");
            }

            _ = UserBridge.AssureLogin(UserInfo);
            IEnumerable <ProductId>?productsTeardown = Products.Select(x => x.ProductId);

            foreach (ProductId productId in productsTeardown)
            {
                _ = MarketBridge.RemoveProductFromUserCart(productId);
            }
            useCase_login_buyer?.Teardown();
        }
Esempio n. 6
0
 public void Failure_ProductDoesntExist()
 {
     Assert.IsFalse(MarketBridge.RemoveProductFromUserCart(new ProductId(Guid.NewGuid())));
     AssertCartDidntChange();
 }
Esempio n. 7
0
 public void Failure_NotInCart()
 {
     Assert.IsFalse(MarketBridge.RemoveProductFromUserCart(ShopImage.ShopProducts[1].ProductId));
     AssertCartDidntChange();
 }