public void ShouldInitializeContextTwiceWithDepartmentsSeed()
        {
            // Arrange
            var dataSeed            = new IDataSeed[] { new DepartmentDataSeed() };
            var databaseInitializer = new EmployeeContextDatabaseInitializer(dataSeed);

            // Act
            List <Department> allDepartmentsFirst;

            using (var context = this.CreateContext(databaseInitializer))
            {
                allDepartmentsFirst = context.Set <Department>().ToList();
            }

            List <Department> allDepartmentsSecond;

            using (var context = this.CreateContext(databaseInitializer))
            {
                allDepartmentsSecond = context.Set <Department>().ToList();
            }

            // Assert
            allDepartmentsFirst.Should().HaveCount(2);
            allDepartmentsSecond.Should().HaveCount(2);
        }
        public void ShouldInitializeContextTwiceWithApplicationSettingSeed()
        {
            // Arrange
            var dataSeed            = new IDataSeed[] { new ApplicationSettingDataSeed() };
            var databaseInitializer = new EmployeeContextDatabaseInitializer(new EmployeeContextMigrationConfiguration(dataSeed));

            // Act
            List <ApplicationSetting> allDepartmentsFirst;

            using (var context = this.CreateContext(databaseInitializer))
            {
                allDepartmentsFirst = context.Set <ApplicationSetting>().ToList();
            }

            List <ApplicationSetting> allDepartmentsSecond;

            using (var context = this.CreateContext(databaseInitializer))
            {
                allDepartmentsSecond = context.Set <ApplicationSetting>().ToList();
            }

            // Assert
            allDepartmentsFirst.Should().HaveCount(1);
            allDepartmentsSecond.Should().HaveCount(1);
        }
        public void ShouldInitializeContextWithApplicationSettingSeed()
        {
            // Arrange
            var dataSeed            = new IDataSeed[] { new ApplicationSettingDataSeed(), };
            var databaseInitializer = new EmployeeContextDatabaseInitializer(dataSeed);

            // Act
            var context = this.CreateContext(databaseInitializer);

            // Assert
            var applicationSetting = context.Set <ApplicationSetting>().ToList();

            applicationSetting.Should().HaveCount(1);
        }
        public void ShouldInitializeContextWithDepartmentsSeed()
        {
            // Arrange
            var dataSeed            = new IDataSeed[] { new DepartmentDataSeed() };
            var databaseInitializer = new EmployeeContextDatabaseInitializer(dataSeed);

            // Act
            var context = this.CreateContext(databaseInitializer);

            // Assert
            var allDepartments = context.Set <Department>().ToList();

            allDepartments.Should().HaveCount(2);
        }
        public void ShouldInitializeContextWithEmptyDataSeed()
        {
            // Arrange
            var dataSeed            = new IDataSeed[] { };
            var databaseInitializer = new EmployeeContextDatabaseInitializer(new EmployeeContextMigrationConfiguration(dataSeed));

            // Act
            var context = this.CreateContext(databaseInitializer);

            // Assert
            var allDepartments = context.Set <Department>().ToList();

            allDepartments.Should().HaveCount(0);
        }