public void InsertAddsAPost()
 {
     var repository = new PostRepository(_db);
     repository.Insert(new Post
                           {
                               Title = "The Loneliest Title"
                           });
     var posts = (from p in _db.GetCollection<Post>("posts").AsQueryable<Post>()
                 where p.Title == "The Loneliest Title"
                 select p).ToArray();
     Assert.That(posts, Has.Exactly(1).Not.Null);
     Assert.That(posts, Has.Exactly(0).Null);
     Assert.That(posts[0].Title, Is.EqualTo("The Loneliest Title"));
 }
 public void InsertNullThrowsArgumentNullException()
 {
     var repository = new PostRepository(_db);
     Assert.That(() => repository.Insert(null), Throws.InstanceOf<ArgumentNullException>());
 }