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 IsTableEmptyTest()
        {
            PrepareTestEvent();
            EmptyChecker EmptyChecker = new EmptyChecker("StaffContextTests");
            Boolean      IsTableEmpty = EmptyChecker.IsTableEmpty("Events");

            Assert.IsTrue(IsTableEmpty == false);
            MsDbSetter msDbSetter = new MsDbSetter("name=StaffContextTests");

            msDbSetter.SetDelAllEventsForTesting();
            IsTableEmpty = EmptyChecker.IsTableEmpty("Events");
            Assert.IsTrue(IsTableEmpty == true);
        }
        public void clearAllTablesBesidesPupilsTest()
        {
            PrepareTest();
            MsDbCleaner msDbCleaner = new MsDbCleaner("name=StaffContextTests");

            msDbCleaner.clearTableDb("Schedules");
            msDbCleaner.clearTableDb("Events");

            EmptyChecker emptyChecker = new EmptyChecker("StaffContextTests");

            Assert.IsTrue(true == emptyChecker.IsTableEmpty("Schedules"));
            Assert.IsTrue(true == emptyChecker.IsTableEmpty("Events"));
            Assert.IsTrue(false == emptyChecker.IsTableEmpty("Pupils"));
        }
        public void clearTableDbTest()
        {
            MsDbCleaner msDbCleaner = new MsDbCleaner("name=StaffContextTests");

            msDbCleaner.clearTableDb("Schedules");

            EmptyChecker emptyChecker = new EmptyChecker("StaffContextTests");

            Assert.IsTrue(true == emptyChecker.IsTableEmpty("Schedules"));
        }
Exemplo n.º 5
0
        public void CleanOldStaffTest()
        {
            OldStaffCleaner oldStaffCleaner = new OldStaffCleaner("name=StaffContextTests");
            var             AllStaff        = getStaffListTest();

            oldStaffCleaner.CleanOldStaff(AllStaff);
            EmptyChecker emptyChecker = new EmptyChecker("StaffContextTests");

            Assert.IsTrue(true == emptyChecker.IsTableEmpty("Pupils"));
        }
        public void FillSchedulesDbTest()
        {
            ScheduleFiller scheduleFiller = new ScheduleFiller("name=StaffContextTests");
            var            AllClasses     = getClassesListTest();

            scheduleFiller.FillSchedulesDb(AllClasses);

            EmptyChecker emptyChecker = new EmptyChecker("StaffContextTests");

            Assert.IsTrue(false == emptyChecker.IsTableEmpty("Schedules"));
        }
        public void FillOnlySchedulesTest()
        {
            MsDbFiller msDbFiller = new MsDbFiller("name=StaffContextTests");
            var        AllClasses = getClassesListTest();

            msDbFiller.FillOnlySchedules(AllClasses);

            EmptyChecker emptyChecker = new EmptyChecker("StaffContextTests");

            Assert.IsTrue(false == emptyChecker.IsTableEmpty("Schedules"));
        }
Exemplo n.º 8
0
        public void UpdateMsDbTest()
        {
            MsDbUpdater msDbUpdater = new MsDbUpdater("name=StaffContextTests");
            var         AllStaff    = getStaffListTest();
            var         AllClasses  = getClassesListTest();

            msDbUpdater.UpdateMsDb(AllStaff, AllClasses);

            EmptyChecker emptyChecker = new EmptyChecker("StaffContextTests");

            Assert.IsTrue(false == emptyChecker.IsTableEmpty("Schedules"));
        }
Exemplo n.º 9
0
        public void UpdateStaffDbTest()
        {
            MsDbUpdater msDbUpdater = new MsDbUpdater("name=StaffContextTests");
            var         AllStaff    = getStaffListTest();

            msDbUpdater.UpdateStaffDb(AllStaff);

            MsDbRequester msDbRequester = new MsDbRequester("name=StaffContextTests");
            String        FullFIO1      = msDbRequester.getFullFIOByPupilIdOld(5000);
            String        FullFIO2      = msDbRequester.getFullFIOByPupilIdOld(5001);
            String        FullFIO3      = msDbRequester.getFullFIOByPupilIdOld(5002);

            Assert.IsTrue(FullFIO1 == "Иванов Иван Иванович");
            Assert.IsTrue(FullFIO2 == "Петров Петр Петрович");
            Assert.IsTrue(FullFIO3 == "Сидоров Сидор Сидорович");
            EmptyChecker emptyChecker = new EmptyChecker("StaffContextTests");

            Assert.IsTrue(false == emptyChecker.IsTableEmpty("Schedules"));
        }