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 RavenDBSnapshotStore(_documentStore);

            var anId = Guid.NewGuid();
            var aVersion = 12;
            var snapshot = new Snapshot(anId, aVersion, new MySnapshot {Value = "Some value"});

            targetStore.SaveSnapshot(snapshot);

            var savedSnapshot = targetStore.GetSnapshot(anId, long.MaxValue);
            savedSnapshot.EventSourceId.Should().Be(anId);
            savedSnapshot.Version.Should().Be(aVersion);
            ((MySnapshot) savedSnapshot.Payload).Value.Should().Be("Some value");
        }
        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 RavenDBSnapshotStore(_documentStore);

            var anId     = Guid.NewGuid();
            var aVersion = 12;
            var snapshot = new Snapshot(anId, aVersion, new MySnapshot {
                Value = "Some value"
            });

            targetStore.SaveSnapshot(snapshot);

            var savedSnapshot = targetStore.GetSnapshot(anId, long.MaxValue);

            savedSnapshot.EventSourceId.Should().Be(anId);
            savedSnapshot.Version.Should().Be(aVersion);
            ((MySnapshot)savedSnapshot.Payload).Value.Should().Be("Some value");
        }