public async void Test11()
        {
            GetAllProducts getAllProducts = new GetAllProducts();
            await getAllProducts.GetAllProductsList();

            var            productsCount  = GetAllProducts.productList.Count;
            RemoveAProduct removeAProduct = new RemoveAProduct();
            await removeAProduct.RemoveAProductByID("P114");

            await getAllProducts.GetAllProductsList();

            var productsCountAfterRemoving = GetAllProducts.productList.Count;

            Assert.Equal(productsCount - 1, productsCountAfterRemoving);
        }
Пример #2
0
        public async void AllProducts()
        {
            GetAllProducts products = new GetAllProducts();
            await products.GetAllProductsList();

            AddImages(GetAllProducts.productList);
        }
        public async void Test1()
        {
            GetAllProducts getAllProducts = new GetAllProducts();
            await getAllProducts.GetAllProductsList();

            var products = GetAllProducts.productList;

            Assert.NotEmpty(products);
        }
        public async void Test7()
        {
            GetAllProducts getAllProducts = new GetAllProducts();
            await getAllProducts.GetAllProductsList();

            var      productsCount = GetAllProducts.productList.Count;
            Products product       = new Products()
            {
                Id          = "P115",
                Name        = "DemoProduct2",
                Features    = new[] { "Alarm" },
                Services    = new[] { "ESN" },
                DisplaySize = "upto 10"
            };
            Add_Product addProduct = new Add_Product();
            await addProduct.AddAProduct(product);

            await getAllProducts.GetAllProductsList();

            var productsCountAfterAdding = GetAllProducts.productList.Count;

            Assert.Equal(productsCount + 1, productsCountAfterAdding);
        }