Beispiel #1
0
        public async Task CommitTransactionAsync(IConnection connection, IBookmarkTracker bookmarkTracker)
        {
            var handler = new V1.CommitResponseHandler(bookmarkTracker);
            await connection.EnqueueAsync(Commit, handler, PullAll, handler)
            .ConfigureAwait(false);

            await connection.SyncAsync().ConfigureAwait(false);
        }
        public void ShouldUpdateBookmark()
        {
            var tracker = new Mock <IBookmarkTracker>();
            var handler = new CommitResponseHandler(tracker.Object);

            handler.OnSuccess(new[] { BookmarkCollectorTests.TestMetadata }.ToDictionary());

            tracker.Verify(
                x => x.UpdateBookmark(BookmarkCollectorTests.TestMetadataCollected),
                Times.Once);
        }