public async Task ResultBuilderShouldObtainServerInfoFromConnection() { var mockConn = AsyncSessionTests.MockedConnectionWithSuccessResponse(); var query = new Query("lalala"); var V3 = new BoltProtocolV3(); await V3.RunInExplicitTransactionAsync(mockConn.Object, query, true); mockConn.Verify(x => x.Server, Times.Once); }
public async Task ShouldRunPullAllSync() { var mockConn = AsyncSessionTests.MockedConnectionWithSuccessResponse(); var query = new Query("lalala"); var V3 = new BoltProtocolV3(); await V3.RunInExplicitTransactionAsync(mockConn.Object, query, 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); }