private static void FullSeveralProductsTest(List <string> names, GetProduct getProductByName, GetProduct getProductByKey, GetProductNameByKey getNameByKey) { foreach (var name in names) { FullProductTest(name, getProductByName, getProductByKey, getNameByKey); } }
private static void FullProductTest(string name, GetProduct getProductByName, GetProduct getProductByKey, GetProductNameByKey getNameByKey) { var product = TestProductByName(name, getProductByName); TestProductByKey(name, product.Key, getProductByKey); TestProductNameByKey(product.Name, product.Key, getNameByKey); }
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); }