public async Task SingleAsync_HasValue()
        {
            EntityMapping.RegisterType(typeof(QueryableAsyncModel));

            var connection = TestConfiguration.GetConnection();
            var context    = new MongoDbContext(connection);
            var provider   = new MongoFrameworkQueryProvider <QueryableAsyncModel>(connection);
            var queryable  = new MongoFrameworkQueryable <QueryableAsyncModel>(provider);

            context.ChangeTracker.SetEntityState(new QueryableAsyncModel {
                Title = "SingleAsync_HasValue.1"
            }, EntityEntryState.Added);
            context.SaveChanges();

            var result = await queryable.SingleAsync();

            Assert.AreEqual("SingleAsync_HasValue.1", result.Title);
        }
        public async Task SingleAsync_NoValue()
        {
            EntityMapping.RegisterType(typeof(QueryableAsyncModel));

            var connection = TestConfiguration.GetConnection();
            var provider   = new MongoFrameworkQueryProvider <QueryableAsyncModel>(connection);
            var queryable  = new MongoFrameworkQueryable <QueryableAsyncModel>(provider);

            await Assert.ThrowsExceptionAsync <InvalidOperationException>(async() => await queryable.SingleAsync());
        }