protected override void Context() { _streamId = Guid.NewGuid().ToString(); _oldest = Persistence.CommitSingle(_streamId); _oldest2 = Persistence.CommitNext(_oldest); Persistence.AddSnapshot(new Snapshot(_streamId, _oldest2.StreamRevision, SnapshotData)); }
protected override void Context() { _streamId = Guid.NewGuid().ToString(); _snapshot = new Snapshot(_streamId, 1, "Snapshot"); Persistence.CommitSingle(_streamId); Persistence.AddSnapshot(_snapshot); }
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()))); }
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)); }
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)); }
protected override void Because() { Persistence.AddSnapshot(_snapshot); }
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")); }
protected override void Because() { added = Persistence.AddSnapshot(snapshot); }
protected override Task Because() { return(Persistence.AddSnapshot(_snapshot)); }
protected override async Task Because() { await Persistence.AddSnapshot(new Snapshot(_streamId, _newest.StreamRevision, SnapshotData)); }
protected override async Task Because() { _added = await Persistence.AddSnapshot(_snapshot); }
protected override void Because() { _updatedSnapshot = new Snapshot(_streamId, 1, "Updated Snapshot"); _thrown = Catch.Exception(() => _added = Persistence.AddSnapshot(_updatedSnapshot)); }