示例#1
0
        private static List <string> CreateProducts(int count, GetProduct addProduct)
        {
            var names = GetRandomProductsNames(count);

            names.ForEach(n => addProduct?.Invoke(n));

            return(names);
        }
示例#2
0
        private static void FullRemoveProductTest(string name, string key, GetProduct getProductByName,
                                                  GetProduct getProductByKey, GetProductNameByKey getNameByKey)
        {
            var product = getProductByName?.Invoke(name);

            Assert.Null(product);

            product = getProductByKey?.Invoke(key);
            Assert.Null(product);

            name = getNameByKey?.Invoke(key);
            Assert.Null(name);
        }
示例#3
0
        private static Product CreateProduct(GetProduct addProduct)
        {
            var name = RandomGenerator.GetRandomString();

            return(addProduct?.Invoke(name));
        }