Ejemplo n.º 1
0
        public void Saving_snapshot_should_not_throw_an_exception_when_snapshot_is_valid()
        {
            var targetStore = new RavenDBSnapshotStore(_documentStore);

            var anId = Guid.NewGuid();
            var aVersion = 12;
            var snapshot = new MySnapshot { EventSourceId = anId, EventSourceVersion = aVersion };

            targetStore.SaveShapshot(snapshot);

            var savedSnapshot = targetStore.GetSnapshot(anId);
            savedSnapshot.EventSourceId.Should().Be(anId);
            savedSnapshot.EventSourceVersion.Should().Be(aVersion);
        }
        public void Saving_snapshot_should_not_throw_an_exception_when_snapshot_is_valid()
        {
            var targetStore = new SimpleMicrosoftSqlServerEventStore(DEFAULT_CONNECTION);

            var anId = Guid.NewGuid();
            var aVersion = 12;
            var snapshot = new MySnapshot{EventSourceId=anId, EventSourceVersion=aVersion};

            targetStore.SaveShapshot(snapshot);

            var savedSnapshot = targetStore.GetSnapshot(anId);
            savedSnapshot.EventSourceId.Should().Be(anId);
            savedSnapshot.EventSourceVersion.Should().Be(aVersion);
        }