public static void Initialize(TestContext testContext) { var context = new CVProjectContext(); context.Database.Delete(); var config = new TestMigrationConfiguration(); var migrator = new DbMigrator(config); migrator.Update(); }
public void GetAllEducationReturnsNotNull() { using (var context = new CVProjectContext()) { var uow = new UnitOfWork(context); var educationList = uow.EducationRepository.GetAllEducation(); educationList.Should().NotBeNull(); } }
public UnitOfWork(CVProjectContext context) { this.CVProjectContext = context; SkillRepository = new SkillRepository(context); TechnologyRepository = new TechnologyRepository(context); MaterialRepository = new MaterialRepository(context); CourseRepository = new CourseRepository(context); WorkExperienceRepository = new WorkExperienceRepository(context); EducationRepository = new EducationRepository(context); }
public static void CleanUp() { var context = new CVProjectContext(); context.Database.Delete(); }