public void PerformSeed_GivenEmptyDatabase_AddsUsers()
        {
            // Arrange
            using (var session = DocumentStore.OpenSession())
            {
                var sut = new DatabaseSeeder(session);

                // Act
                sut.PerformSeed();

                // Assert
                var allDatabaseUsers = session.Query<User>()
                                                     .ToList();
                Assert.Equal(sut.Users.Count, allDatabaseUsers.Count);
            }
        }
        public void PerformSeed_GivenEmptyDatabase_AddsGroups()
        {
            // Arrange
            using (var session = DocumentStore.OpenSession())
            {
                var sut = new DatabaseSeeder(session);

                // Act
                sut.PerformSeed();

                // Assert
                var allDatabaseGroups = session.Query<Group>()
                                               .ToList();
                Assert.Equal(sut.Groups.Count, allDatabaseGroups.Count);
                Assert.True(sut.Groups.All(g => g.Members.Any()));
                Assert.True(sut.Groups.All(g => g.Tags.Any()));
            }
        }
 public SeedController(DatabaseSeeder seeder)
 {
     _seeder = seeder;
 }