private static List <string> CreateProducts(int count, GetProduct addProduct) { var names = GetRandomProductsNames(count); names.ForEach(n => addProduct?.Invoke(n)); return(names); }
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); }
private static Product CreateProduct(GetProduct addProduct) { var name = RandomGenerator.GetRandomString(); return(addProduct?.Invoke(name)); }