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); }
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); }