public void CheckTimeTest()
        {
            TimeSpan    now                  = DateTime.Now.TimeOfDay;
            TimeSpan    nowPlusMinute        = now.Add(new TimeSpan(0, 1, 0));
            TimeSpan    nowMinusMinute       = now.Add(new TimeSpan(0, -1, 0));
            TimeChecker timeCheckerWithParam = new TimeChecker(nowMinusMinute, nowPlusMinute);

            timeCheckerWithParam.CheckTime(new Action(delegate {
                MsDbCleaner msDbCleaner = new MsDbCleaner("name=StaffContextTests");
                MsDbUpdater msDbUpdater = new MsDbUpdater("name=StaffContextTests");
                msDbCleaner.clearAllTablesBesidesPupils();

                var AllStaff   = new List <object[]>();
                AllStaff       = getStaffListTest();
                var AllClasses = getClassesListTest();
                msDbUpdater.UpdateMsDb(AllStaff, AllClasses);
            }));

            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 == "Сидоров Сидор Сидорович");
        }
        public void PrepareTest()
        {
            MsDbCleaner msDbCleaner = new MsDbCleaner("name=StaffContextTests");

            msDbCleaner.clearTableDb("Pupils");
            msDbCleaner.clearTableDb("Schedules");
            msDbCleaner.clearTableDb("Events");
        }
        public void clearTableDbTest()
        {
            MsDbCleaner msDbCleaner = new MsDbCleaner("name=StaffContextTests");

            msDbCleaner.clearTableDb("Schedules");

            EmptyChecker emptyChecker = new EmptyChecker("StaffContextTests");

            Assert.IsTrue(true == emptyChecker.IsTableEmpty("Schedules"));
        }
        void PrepareTest()
        {
            MsDbCleaner msDbCleaner = new MsDbCleaner("name=StaffContextTests");

            msDbCleaner.clearTableDb("Pupils");
            StaffFiller staffFiller = new StaffFiller("name=StaffContextTests");
            var         AllStaff    = getStaffListTestOld();

            staffFiller.FillStaffDb(AllStaff);
        }
        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 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 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");
        }
 public EljurBaseClass(Message Message, Config Config, Firebird Firebird, AllStaffAdder allStaffAdder, MsDbChecker MsDbChecker, MsDbUpdater MsDbUpdater, MsDbCleaner MsDbCleaner, EventHandlerEljur EventHandlerEljur)
 {
     this.message           = new Message();
     this.config            = new Config();
     this.firebird          = new Firebird();
     this.allStaffAdder     = new AllStaffAdder();
     this.msDbChecker       = new MsDbChecker();
     this.msDbUpdater       = new MsDbUpdater();
     this.msDbCleaner       = new MsDbCleaner();
     this.eventHandlerEljur = new EventHandlerEljur();
 }
 public MsDbBaseClass(ScheduleFiller ScheduleFiller, MainStaffUpdater MainStaffUpdater, MsDbCleaner MsDbCleaner)
 {
     this.scheduleFiller   = ScheduleFiller;
     this.mainStaffUpdater = MainStaffUpdater;
     this.msDbCleaner      = MsDbCleaner;
 }
        void PrepareTest()
        {
            MsDbCleaner msDbCleaner = new MsDbCleaner("name=StaffContextTests");

            msDbCleaner.clearTableDb("Pupils");
        }