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

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

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

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