public void GetCurrentUserRecipesTest() { List <Recipe> list = new List <Recipe>(); var recipe1 = new Recipe() { Description = "Test description 1", Hidden = false, Id = 1, Name = "Test Recipe Name 1", UserId = "user1" }; var recipe2 = new Recipe() { Description = "Test description 2", Hidden = false, Id = 2, Name = "Test Recipe Name 2", UserId = "user2" }; var recipe3 = new Recipe() { Description = "Test description 3", Hidden = false, Id = 3, Name = "Test Recipe Name 3", UserId = "user1" }; list.Add(recipe1); list.Add(recipe2); list.Add(recipe3); var expectedList = list.Where(o => o.UserId.Equals("user1")) .ToList(); _recipesService.Setup(i => i.GetUserRecipes("user1")) .Returns(expectedList); var resultList = _recipesController.GetCurrentUserRecipes().Value; Assert.AreEqual(expectedList, resultList); }