public IntegrationTestBase()
        {
            var conf  = new ConfigurationBuilder().AddJsonFile("appsettings.json", true, true).Build();
            var rconf = RavenConfig.FromConfiguration(conf);

            DocumentStore = new RavenDocumentStoreFactory().CreateAndInitializeDocumentStore(rconf);
        }
        public IDocumentStore CreateAndInitializeDocumentStore(RavenConfig conf)
        {
            var store = new DocumentStore {
                Urls = conf.Urls
            };

            if (!string.IsNullOrWhiteSpace(conf.CertificateFilePath))
            {
                store.Certificate = new X509Certificate2(conf.CertificateFilePath, conf.CertificateFilePassword);
            }
            store.Database = conf.DatabaseName;
            store.Initialize();
            EnsureDatabaseExists(store, conf.DatabaseName, true);

            return(store);
        }