Esempio n. 1
0
        protected SearchRepositoryQueryTestsBase()
        {
            var searchConfig = LocalConfiguration.Get().GetSection("Search");
            var logger       = Substitute.For <ILogger>();

            SearchRepository = new SearchRepository(logger);

            SeedSearchBooks(searchConfig);

            SeedBookReviewers(searchConfig);
        }
        protected Dictionary <string, object> GetBaseConfigurations <TSource>(MemberExpression memberExpression)
        {
            var config         = LocalConfiguration.Get().GetSection("TableStorage");
            var configurations = new Dictionary <string, object>();

            configurations.Add <TSource>(TableStorageConstants.ConnectionString, config["ConnectionString"]);
            configurations.Add <TSource>(TableStorageConstants.PartitionMemberExpression, memberExpression);


            return(configurations);
        }
        protected Dictionary <string, object> GetBaseConfigurations <TSource>(MemberExpression memberExpression)
        {
            var config = LocalConfiguration.Get().GetSection("TableStorage");

            "TableStorage loaded.".Log();
            $"Development = {config["ConnectionString"] == "UseDevelopmentStorage=true" }".Log();

            var configurations = new Dictionary <string, object>();

            configurations.Add <TSource>(TableStorageConstants.ConnectionString, config["ConnectionString"]);
            configurations.Add <TSource>(TableStorageConstants.PartitionMemberExpression, memberExpression);

            return(configurations);
        }
        protected Dictionary <string, object> GetBaseConfigurations <TSource>(MemberExpression memberExpression)
        {
            var config = LocalConfiguration.Get().GetSection("DocumentDb");

            var configurations = new Dictionary <string, object>();

            configurations.Add <TSource>(DocumentDbConstants.Database, DatabaseId);
            configurations.Add <TSource>(DocumentDbConstants.Url, config["Url"]);
            configurations.Add <TSource>(DocumentDbConstants.Key, config["Key"]);
            configurations.Add <TSource>(DocumentDbConstants.RequestUnit, config["RequestUnits"]);

            configurations.Add <TSource>(DocumentDbConstants.PartitionMemberExpression, memberExpression);

            return(configurations);
        }