コード例 #1
0
        void PrepareTestPupil()
        {
            MsDbSetter msDbSetter = new MsDbSetter("name=StaffContextTests");
            Pupil      TestPupil  = new Pupil();

            TestPupil.PupilIdOld     = 5005;
            TestPupil.FirstName      = "Тест";
            TestPupil.LastName       = "Тестов";
            TestPupil.MiddleName     = "Тестович";
            TestPupil.FullFIO        = "Тестов Тест Тестович";
            TestPupil.Clas           = "1Б";
            TestPupil.EljurAccountId = 666;
            msDbSetter.SetDelAllPupilsForTesting();
            msDbSetter.SetOneTestPupilForTesting(TestPupil);
        }
コード例 #2
0
        public void SetClasByPupilIdOldTest()
        {
            PrepareTestPupil();
            MsDbSetter msDbSetter = new MsDbSetter("name=StaffContextTests");
            int        PupilIdOld = 5005;
            String     Clas       = "1А";

            msDbSetter.SetClasByPupilIdOld(PupilIdOld, Clas);

            MsDbRequester msDbRequester = new MsDbRequester("name=StaffContextTests");
            String        ReqClas       = msDbRequester.getClasByPupilIdOld(5005);

            msDbSetter.SetDelAllPupilsForTesting();

            Assert.IsTrue(Clas == ReqClas);
        }