using System.Collections.Generic;
public class GroceryProduct
public string ProductName { get; set; }
public string AreaOfTheStore { get; set; }
public static List<string> GetStoreAreasForGroceryList(List<GroceryProduct> allGroceryProducts, List<string> groceryList)
return new List<string>();
public static void Main()
Console.WriteLine("Running Tests!");
var allGroceryProducts = GetGroceryProducts();
var groceryList = new List<string> {"Oranges", "Apples", "Canned Beans"};
var expectedResult = "Produce Area, 2";
var result = GetStoreAreasForGroceryList(allGroceryProducts, groceryList);
var resultString = String.Join(", ", result);
if (!String.Equals(resultString, expectedResult))
throw new Exception($"The result '{resultString}' did not match the expected '{expectedResult}'");
groceryList = new List<string> {"Oranges", "Pasta", "Canned Beans"};
expectedResult = "Produce Area, 2, 5";
result = GetStoreAreasForGroceryList(allGroceryProducts, groceryList);
resultString = String.Join(", ", result);
if (!String.Equals(resultString, expectedResult))
throw new Exception($"The result '{resultString}' did not match the expected '{expectedResult}'");
Console.WriteLine("Tests were successful!");
private static List<GroceryProduct> GetGroceryProducts()
return new List<GroceryProduct> {
AreaOfTheStore = "Produce Area"
AreaOfTheStore = "Produce Area"
AreaOfTheStore = "Produce Area"
ProductName = "Almond Milk",
AreaOfTheStore = "Dairy Area"
ProductName = "Mac and Cheese",
ProductName = "Canned Beans",
ProductName = "Hamburger Buns",
ProductName = "Tortillas",
ProductName = "Frozen Dinners",
AreaOfTheStore = "Freezer Area"