public async Task ResultBuilderShouldObtainServerInfoFromConnection()
            {
                var mockConn  = SessionTests.MockedConnectionWithSuccessResponse();
                var statement = new Statement("lalala");

                await BoltV3.RunInExplicitTransactionAsync(mockConn.Object, statement, true);

                mockConn.Verify(x => x.Server, Times.Once);
            }
Beispiel #2
0
            public async Task ShouldRunPullAllSync()
            {
                var mockConn  = MockedConnectionWithSuccessResponse();
                var statement = new Statement("lalala");

                await BoltV3.RunInExplicitTransactionAsync(mockConn.Object, statement);

                mockConn.Verify(x => x.Enqueue(It.IsAny <RunWithMetadataMessage>(), It.IsAny <ResultCursorBuilder>(), PullAll), Times.Once);
                mockConn.Verify(x => x.SendAsync(), Times.Once);
            }
            public async Task ShouldRunPullAllSync()
            {
                var mockConn  = SessionTests.MockedConnectionWithSuccessResponse();
                var statement = new Statement("lalala");

                await BoltV3.RunInExplicitTransactionAsync(mockConn.Object, statement, true);

                mockConn.Verify(
                    x => x.EnqueueAsync(It.IsAny <RunWithMetadataMessage>(), It.IsAny <V3.RunResponseHandler>(),
                                        PullAllMessage.PullAll,
                                        It.IsAny <V3.PullResponseHandler>()),
                    Times.Once);
                mockConn.Verify(x => x.SendAsync(), Times.Once);
            }