Esempio n. 1
0
        public void ESSaveEntityFailedSavingAfterFailedPublishing()
        {
            testAction.MarkExceptionSavingDbSet <Exception>(1, false);

            FakeVersionedEntity fee = new FakeVersionedEntity();

            fee.Events.Enqueue(new FakeEvent());
            fee.Events.Enqueue(new FakeFailedEvent());
            fee.Events.Enqueue(new FakeEvent());
            FakeEventSourcedRepository.Save(fee);

            Assert.IsTrue(fee.Events.Count == 1, "One event pending in queue");
            Assert.AreEqual(Store.EnvelopeId.ToString(), typeof(FakeFailedEvent).Name);
        }