public void ReturnsListOfIds_WhenCategories_Present()
        {
            var options            = DbContextMock.GetOptions("ReturnsListOfIds_WhenCategories_Present");
            var searchedCategories = new List <string>()
            {
                "Test1", "Test2", "TestTest"
            };

            using (var context = new BubaTubeDbContext(options))
            {
                context.Categories.AddRange(CategoryMockData.GetListOfCategoryModels());
                context.SaveChanges();

                var categoryGetService = new CategoryQueries(context, fakeMapper);
                var result             = categoryGetService.TakeApprovedCategoryIds(searchedCategories);

                var test1FromDb = context.Categories
                                  .FirstOrDefault(x => x.CategoryName == "Test1");

                var test2FromDb = context.Categories
                                  .FirstOrDefault(x => x.CategoryName == "Test2");

                Assert.NotEmpty(result);
                Assert.Equal(2, result.Count());
                Assert.Contains(result, x => x == test1FromDb.Id);
                Assert.Contains(result, x => x == test2FromDb.Id);
            }
        }
        public void ReturnsEmptyList_WhenCategory_NotApproved()
        {
            var options            = DbContextMock.GetOptions("ReturnsEmptyList_WhenCategory_NotApproved");
            var searchedCategories = new List <string>()
            {
                "Test0"
            };

            using (var context = new BubaTubeDbContext(options))
            {
                context.Categories.AddRange(CategoryMockData.GetListOfCategoryModels());
                context.SaveChanges();

                var categoryGetService = new CategoryQueries(context, fakeMapper);
                var result             = categoryGetService.TakeApprovedCategoryIds(searchedCategories);

                Assert.Empty(result);
            }
        }