public void TestSelectManyWhenExists() { var productList = new ProductsList().GetProducts(); Func <ProductsList.Product, List <ProductsList.Ingredient> > MyFunc = x => x.Ingredients; var selectedIngredients = LinqFunctions.SelectMany(productList, MyFunc); var enumerator = selectedIngredients.GetEnumerator(); int counter = 0; while (enumerator.MoveNext()) { counter++; } Assert.Equal(7, counter); }