public void TestForCorrectSetFirstAndLastNameInWelcomeStudentForm() { var register = new StudentFormController(); string egnPass = "******"; string result = register.SetFirstLastName(egnPass); string actions = "Julia James"; Assert.AreEqual(result, actions, "Correct set first and last name on Student"); }
public void TestForCorrectContactInfo() { var register = new StudentFormController(); string egnPass = "******"; register.InitializeStudent(egnPass); string correct = "Annette O'Connell Email: W Phone number: 672-292-5299 Birthdate: 25.11.1965 г."; List <string> Lists = register.ContactInfo(); var action = Lists[0]; Assert.AreEqual(correct, action, "Correct set contact info list"); }
public void TestForCorrectInitializeCurrentStudentCheckByPersonalNumber() { var register = new StudentFormController(); var student = new Student(); student.PersonalNumber = "3376299241"; string egnPass = "******"; register.InitializeStudent(egnPass); var result = register.CurrentStudent.PersonalNumber; Assert.AreEqual(student.PersonalNumber, result, "Correct Initialize Student by personalNumber"); }
public void TestForCorrectHeadTeacherContactInfo() { var register = new StudentFormController(); string egnPass = "******"; register.InitializeStudent(egnPass); string action = "Raquel Cardenas Curry Email: [email protected] Phone number: 0888811111 Birthdate: 8.2.1969 г."; string result = register.HTeacherContactInfo(); Assert.AreEqual(action, result, "Correct add teacher info"); }
public void TestForCorrectInitializeStudentSubjects() { var register = new StudentFormController(); var subject = new Subject(); subject.Name = "Physics"; string egnPass = "******"; register.InitializeStudent(egnPass); var result = register.StudentSubjects[0]; Assert.AreEqual(subject.Name, result.Name, "Correct initialize student subject chek by subject.name"); }
public void TestForCorrectInitializeSubjects() { var register = new StudentFormController(); var subject = new Subject(); subject.Name = "Physics"; string selectedSubjectName = "Physics"; register.InitializeSubject(selectedSubjectName); var result = register.CurrentselectedSubject.Name; Assert.AreEqual(subject.Name, result, "Correct initialize student subject chek by subject.name"); }
public void TestForCorrectCalculateAllSetMarks() { var register = new StudentFormController(); string egnPass = "******"; register.InitializeStudent(egnPass); string selectedSubjectName = "Health and hygiene"; register.InitializeSubject(selectedSubjectName); register.StudentMarksToInsert(); var action = "3,32"; string result = register.AvarageMark(); Assert.AreEqual(action, result, "Correct calculated all marks "); }
public void TestForCorrectStudentMarksToInsert() { var register = new StudentFormController(); string egnPass = "******"; register.InitializeStudent(egnPass); string selectedSubjectName = "Physics"; register.InitializeSubject(selectedSubjectName); List <string> Lists = register.StudentMarksToInsert(); var action = "Bad 2,71 Teacher: Marissa Clarke Sutton Date: 8.6.2022 г."; var result = Lists[0]; Assert.AreEqual(action, result, "Correct set marks and teacher name in list box"); }
private void studentSubjectsComboBox_SelectedValueChanged(object sender, EventArgs e) { // Clears all the subjects from selected marks list box and gets the selected subject name SelectedMarksListBox.Items.Clear(); string selectedSubjectName = StudentSubjectsComboBox.SelectedItem.ToString(); // Load controller and make sure we are using the correct student and subject StudentFormController sfc = new StudentFormController(); sfc.InitializeStudent(egnPass); sfc.InitializeSubject(selectedSubjectName); // Inserts Studentmarks into the selectedMarksListBox List <string> StudentMarksToInsert = sfc.StudentMarksToInsert(); StudentMarksToInsert.ForEach(w => SelectedMarksListBox.Items.Add(w)); // Sets average mark with the avarage mark of all marks from the selected subject AvarageMark = "Average: " + sfc.AvarageMark(); averageMark.Visible = true; }
public StudentForm(Student student, StudentBll studentBll, CourseBll courseBll) { _student = student; InitializeComponent(); _studentFormController = new StudentFormController(this, studentBll, courseBll); }