public static CategoryTestingFixture Given_the_categories_collection_has_categories(this CategoryTestingFixture fixture, int maxCategories)
        {
            var categories = TestCategoryData.GetCategories();

            fixture.Collection.InsertMany(categories);
            return(fixture);
        }
        public static IApplicationBuilder UseTestData(this IApplicationBuilder builder)
        {
            var productsRepo = builder.ApplicationServices.GetRequiredService <IWriteProducts>();

            productsRepo.InsertAsync(TestProductData.GetProducts(2000));

            var filterRepo = builder.ApplicationServices.GetRequiredService <IWriteFilters>();

            filterRepo.InsertAsync(TestFilterData.GetFilter(4));

            var categoryRepo = builder.ApplicationServices.GetRequiredService <IWriteCategories>();

            categoryRepo.InsertAsync(TestCategoryData.GetCategories());
            return(builder);
        }