public void load_a_store_with_explicit_port_see_the_hosted_url() { var settings = new RavenDbSettings { RunInMemory = true, Port = 8082, UseEmbeddedHttpServer = true }; using (var store = settings.Create()) { store.Initialize(); using (var session = store.OpenSession()) { session.Store(new House { Whose = "Mine", Id = Guid.NewGuid() }); session.SaveChanges(); } Process.Start("http://localhost:8082"); Thread.Sleep(30000); } }
public void build_in_memory() { var settings = new RavenDbSettings { RunInMemory = true }; settings.Create().ShouldBeOfType <EmbeddableDocumentStore>() .RunInMemory.ShouldBeTrue(); }
private T createStore <T>(Action <RavenDbSettings> setup) where T : IDocumentStore { var settings = new RavenDbSettings(); if (setup != null) { setup(settings); } return(settings.Create().ShouldBeOfType <T>()); }
public void uses_the_port_number_if_it_is_non_zero() { var settings = new RavenDbSettings { RunInMemory = true, Port = 8081 }; using (var store = settings.Create()) { store.ShouldBeOfType <EmbeddableDocumentStore>() .Configuration.Port.ShouldBe(8081); } }
public void uses_default_port_number_if_none() { var settings = new RavenDbSettings { RunInMemory = true }; using (var store = settings.Create()) { // 8080 is RavenDb's default port number store.ShouldBeOfType <EmbeddableDocumentStore>() .Configuration.Port.ShouldBe(8080); } }