public async Task ShouldThrowExceptionIfNullResult()
            {
                IStatementResultCursor result = null;
                var exception = await Record.ExceptionAsync(() => result.SingleAsync());

                exception.Should().BeOfType <ArgumentNullException>();
            }
        protected async Task <int> CountPersonAsync(string name)
        {
            var session = Driver.Session();

            try
            {
                return(await session.ReadTransactionAsync(async tx =>
                {
                    IStatementResultCursor result =
                        await tx.RunAsync("MATCH (a:Person {name: $name}) RETURN count(a)", new { name });

                    return (await result.SingleAsync())[0].As <int>();
                }));
            }
            finally
            {
                await session.CloseAsync();
            }
        }