public void InitializeDocumentStore_Throws_WhenUrlsIsEmptyCollection() { Assert.Throws <InvalidOperationException>(() => DocumentStoreHelper.InitializeDocumentStore(store => { store.Database = "some-database-name"; store.Urls = new string [] { }; })); }
public void InitializeDocumentStore_Throws_WhenDatabaseNameIsNotProvided() { Assert.Throws <InvalidOperationException>(() => DocumentStoreHelper.InitializeDocumentStore(store => { store.Database = null; store.Urls = new[] { "http://some-url" }; })); }
public void Certificate_IsDisposed_WhenDocumentStoreIsDisposed() { var certificate = GetCertificate(); IDocumentStore store; using (store = DocumentStoreHelper.InitializeDocumentStore(documentStore => { documentStore.Urls = new[] { "https://127.0.0.1:54987" }; documentStore.Database = "some-database"; documentStore.Certificate = certificate; })) { AssertDocumentStoreNotDisposed(store); AssertCertificateCreated(store); } AssertDocumentStoreDisposed(store); AssertCertificateDisposed(store); }
public OperationalDocumentStoreHolder(RavenDbOperationalStoreOptions options) { _documentStore = DocumentStoreHelper.InitializeDocumentStore(options.ConfigureDocumentStore); IndexHelper.ExecuteOperationalStoreIndexes(_documentStore); }