コード例 #1
0
        public static void Initialize(TestContext testContext)
        {
            var context = new CVProjectContext();
            context.Database.Delete();

            var config = new TestMigrationConfiguration();
            var migrator = new DbMigrator(config);
            migrator.Update();
        }
コード例 #2
0
 public void GetAllEducationReturnsNotNull()
 {
     using (var context = new CVProjectContext())
     {
         var uow = new UnitOfWork(context);
         var educationList = uow.EducationRepository.GetAllEducation();
         educationList.Should().NotBeNull();
     }
 }
コード例 #3
0
ファイル: UnitOfWork.cs プロジェクト: MissKalani/CVProject
 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);
 }
コード例 #4
0
 public static void CleanUp()
 {
     var context = new CVProjectContext();
     context.Database.Delete();
 }