예제 #1
0
 protected override void Context()
 {
     _streamId = Guid.NewGuid().ToString();
     _oldest   = Persistence.CommitSingle(_streamId);
     _oldest2  = Persistence.CommitNext(_oldest);
     Persistence.AddSnapshot(new Snapshot(_streamId, _oldest2.StreamRevision, SnapshotData));
 }
예제 #2
0
        protected override void Context()
        {
            _streamId = Guid.NewGuid().ToString();
            _snapshot = new Snapshot(_streamId, 1, "Snapshot");
            Persistence.CommitSingle(_streamId);

            Persistence.AddSnapshot(_snapshot);
        }
예제 #3
0
        protected override void Because()
        {
            var           streamId = Guid.NewGuid().ToString();
            CommitAttempt attempt  = streamId.BuildAttempt();

            Persistence.Commit(streamId.BuildAttempt());

            _ex = Catch.Exception(() => Persistence.AddSnapshot(new Snapshot(streamId, 1, new object())));
        }
예제 #4
0
        protected override void Context()
        {
            _streamId = Guid.NewGuid().ToString();
            ICommit commit1 = Persistence.CommitSingle(_streamId);             // rev 1-2
            ICommit commit2 = Persistence.CommitNext(commit1);                 // rev 3-4

            Persistence.CommitNext(commit2);                                   // rev 5-6

            Persistence.AddSnapshot(new Snapshot(_streamId, 1, string.Empty)); //Too far back
            Persistence.AddSnapshot(_correct       = new Snapshot(_streamId, 3, "Snapshot"));
            Persistence.AddSnapshot(_tooFarForward = new Snapshot(_streamId, 5, string.Empty));
        }
예제 #5
0
        protected override void Context()
        {
            streamId = Guid.NewGuid();
            var commit1 = Persistence.CommitSingle(streamId); // rev 1-2
            var commit2 = Persistence.CommitNext(commit1);    // rev 3-4

            Persistence.CommitNext(commit2);                  // rev 5-6

            Persistence.AddSnapshot(tooFarBack    = new Snapshot(streamId, 1, string.Empty));
            Persistence.AddSnapshot(correct       = new Snapshot(streamId, 3, "Snapshot"));
            Persistence.AddSnapshot(tooFarForward = new Snapshot(streamId, 5, string.Empty));
        }
예제 #6
0
 protected override void Because()
 {
     Persistence.AddSnapshot(_snapshot);
 }
예제 #7
0
 protected override void Because()
 {
     Persistence.AddSnapshot(new Snapshot(_streamId, _newest.StreamRevision, SnapshotData));
 }
 protected override void Context()
 {
     _commit = Persistence.CommitSingle(Guid.NewGuid().ToString());
     Persistence.AddSnapshot(new Snapshot(_commit.BucketId, _commit.StreamId, _commit.StreamRevision, "SnapshotData"));
 }
예제 #9
0
 protected override void Because()
 {
     added = Persistence.AddSnapshot(snapshot);
 }
예제 #10
0
 protected override Task Because()
 {
     return(Persistence.AddSnapshot(_snapshot));
 }
예제 #11
0
 protected override async Task Because()
 {
     await Persistence.AddSnapshot(new Snapshot(_streamId, _newest.StreamRevision, SnapshotData));
 }
예제 #12
0
 protected override async Task Because()
 {
     _added = await Persistence.AddSnapshot(_snapshot);
 }
예제 #13
0
 protected override void Because()
 {
     _updatedSnapshot = new Snapshot(_streamId, 1, "Updated Snapshot");
     _thrown          = Catch.Exception(() => _added = Persistence.AddSnapshot(_updatedSnapshot));
 }