示例#1
0
            public async Task EnqueueCommitAndSync()
            {
                var mockConn = new Mock <IConnection>();
                await BoltV1.CommitTransactionAsync(mockConn.Object);

                mockConn.Verify(x => x.Enqueue(Commit, It.IsAny <BookmarkCollector>(), PullAll), Times.Once);
                mockConn.Verify(x => x.SyncAsync(), Times.Once);
            }
            public async Task EnqueueCommitAndSync()
            {
                var mockConn        = new Mock <IConnection>();
                var bookmarkTracker = new Mock <IBookmarkTracker>();

                await BoltV1.CommitTransactionAsync(mockConn.Object, bookmarkTracker.Object);

                mockConn.Verify(
                    x => x.EnqueueAsync(Commit, It.IsAny <V1.CommitResponseHandler>(), PullAllMessage.PullAll,
                                        It.IsAny <V1.CommitResponseHandler>()), Times.Once);
                mockConn.Verify(x => x.SyncAsync(), Times.Once);
            }