private void SeedDatabase() { AuthorCollection.InsertOne(new Author { Id = Guid.NewGuid(), DisplayName = "Author 1", UserName = "******" }); }
public AuthorRepositoryTests() { AuthorCollection.InsertOne(new Author { Id = Guid.NewGuid(), DisplayName = "Bob Ross", UserName = "******" }); var uow = ServiceProvider.GetService <IBlogUnitOfWork>(); _repository = uow.Authors; }
private void SeedDatabase() { _authorId = Guid.NewGuid(); AuthorCollection.InsertOne(new Author { Id = _authorId, DisplayName = "Author 1", UserName = "******" }); PostCollection.InsertOne(CreatePost(0, _authorId, true, false, "cat1")); PostCollection.InsertOne(CreatePost(1, _authorId, true, true, "cat1")); PostCollection.InsertOne(CreatePost(2, _authorId, true, true, "cat1,cat2")); PostCollection.InsertOne(CreatePost(3, _authorId, true, true, "cat2")); PostCollection.InsertOne(CreatePost(4, _authorId, true, true, "cat1,cat2,cat3")); PostCollection.InsertOne(CreatePost(5, _authorId, false, true, "cat3")); }
private void SeedDatabase() { var authorId = Guid.NewGuid(); AuthorCollection.InsertOne(new Author { Id = authorId, DisplayName = "Author 1", UserName = "******" }); PostCollection.InsertOne(CreatePost(0, authorId, "cata")); PostCollection.InsertOne(CreatePost(1, authorId, "cata")); PostCollection.InsertOne(CreatePost(2, authorId, "cata,catb")); PostCollection.InsertOne(CreatePost(3, authorId, "catb")); PostCollection.InsertOne(CreatePost(4, authorId, "cata,catb,catc")); PostCollection.InsertOne(CreatePost(5, authorId, "catc")); }