static void Main(string[] args) { Student.Student Akim = new Student.Student("Akim", "Lyubchenko", 4, 5, 6, 7); Student.Student Artem = new Student.Student("Artem", "Maklakov", 7, 8, 9, 10); Student.Student Nikita = new Student.Student("Nikita", "Makeychik", 3, 6, 9); Group.Group group2 = new Group.Group(2); group2.AddStudent(Akim); group2.AddStudent(Artem); group2.AddStudent(Nikita); System.Console.WriteLine($"AverageScore of group 2: {group2.AverageScore()}"); System.Console.WriteLine($"AverageScore of Akim 2: {Akim.AverageScore()}"); System.Console.ReadKey(); }
public void TestAddStudent_NumberStudentsIsNull_Exception(int numberStudents, Type result) { ResetStandart(); Type exception = null; var group = new Group.Group(standatrNameGroup, standatrCoursGroup, standatrSeminarGroup, standatrTypeStudyGroup); //arrange try { //act group.AddStudent(numberStudents); } catch (Exception ex) { exception = ex.GetType(); } finally { //assert Assert.AreEqual(result, exception); Assert.AreEqual(0, group.NumberOfStutents); Assert.AreEqual(standatrNameGroup, group.NameGroup); Assert.AreEqual(standatrCoursGroup, group.Cours); Assert.AreEqual(standatrSeminarGroup, group.Seminar); Assert.AreEqual(standatrTypeStudyGroup, group.TypeOfTraining); } }
public void TestAddStudent_NumberStudentsIsNotNull_True(int numberStudents1, int numberStudents2, int result) { ResetStandart(); //arrange var group = new Group.Group(standatrNameGroup, standatrCoursGroup, standatrSeminarGroup, standatrTypeStudyGroup, numberStudents1); //act group.AddStudent(numberStudents2); Assert.AreEqual(result, group.NumberOfStutents); Assert.AreEqual(standatrNameGroup, group.NameGroup); Assert.AreEqual(standatrCoursGroup, group.Cours); Assert.AreEqual(standatrSeminarGroup, group.Seminar); Assert.AreEqual(standatrTypeStudyGroup, group.TypeOfTraining); }