public void FillMsDbTest() { PrepareTest(); MsDbFiller msDbFiller = new MsDbFiller("name=StaffContextTests"); var AllStaff = getStaffListTest(); var AllClasses = getClassesListTest(); msDbFiller.FillMsDb(AllStaff, AllClasses); EmptyChecker emptyChecker = new EmptyChecker("StaffContextTests"); Assert.IsTrue(false == emptyChecker.IsTableEmpty("Schedules")); Assert.IsTrue(false == emptyChecker.IsTableEmpty("Pupils")); }
public void PrepareTest() { MsDbCleaner msDbCleaner = new MsDbCleaner("name=StaffContextTests"); msDbCleaner.clearTableDb("Pupils"); msDbCleaner.clearTableDb("Schedules"); msDbCleaner.clearTableDb("Events"); MsDbFiller msDbFiller = new MsDbFiller("name=StaffContextTests"); var AllStaff = getStaffListTest(); var AllClasses = getClassesListTest(); msDbFiller.FillMsDb(AllStaff, AllClasses); }
public void IsTableExistTest() { Boolean IsTableExist = false; ExistChecker existChecker = new ExistChecker("StaffContextTests"); MsDbFiller msDbFiller = new MsDbFiller("name=StaffContextTests"); var AllStaff = getStaffListTest(); var AllClasses = getClassesListTest(); msDbFiller.FillMsDb(AllStaff, AllClasses); IsTableExist = existChecker.IsTableExist("Pupils"); Assert.IsTrue(IsTableExist == true); IsTableExist = existChecker.IsTableExist("Events"); Assert.IsTrue(IsTableExist == true); IsTableExist = existChecker.IsTableExist("Schedules"); Assert.IsTrue(IsTableExist == true); MsDbCleaner msDbCleaner = new MsDbCleaner("name=StaffContextTests"); msDbCleaner.clearTableDb("Pupils"); msDbCleaner.clearTableDb("Schedules"); msDbCleaner.clearTableDb("Events"); }