public void Ctor_should_set_DocumentStore_field()
        {
            var bus  = new Mock <IEventDispatcher>().Object;
            var mock = new Mock <EmbeddableDocumentStore>().Object;
            var sut  = new EmbeddedRavenDbEventStore(mock, bus);

            Assert.Equal(mock, EmbeddedRavenDbEventStore.DocumentStore);
        }
        public void Ctor_should_not_register_PatchDomainEventsApplyingMementoMetadata_listener_more_than_once()
        {
            var bus    = new Mock <IEventDispatcher>().Object;
            var store1 = new EmbeddedRavenDbEventStore(documentStore, bus);
            var store2 = new EmbeddedRavenDbEventStore(documentStore, bus);

            Assert.Single(documentStore.Listeners.StoreListeners.OfType <PatchDomainEventsApplyingMementoMetadata>());
        }
        public void SetUp()
        {
            documentStore = new EmbeddableDocumentStore
            {
                RunInMemory = true
            };
            //documentStore.Configuration.RunInUnreliableYetFastModeThatIsNotSuitableForProduction = true;
            documentStore.Configuration.Storage.Voron.AllowOn32Bits = true;
            documentStore.Initialize();
            new RavenDocumentsByEntityName().Execute(documentStore);

            var bus        = new Mock <IEventDispatcher>().Object;
            var eventStore = new EmbeddedRavenDbEventStore(documentStore, bus);

            EventStore = eventStore;
        }