Ejemplo n.º 1
0
 public void TestAddStudentMethodToEmptyList()
 {
     List<Student> students = new List<Student>();
     Class Maths = new Class("Maths", students);
     Student Kiril=new Student("Kiril", 34);
     Maths.AddStudent(Kiril);
     students.Add(Kiril);
     Assert.AreEqual(Maths.Students[0], Kiril);
 }
Ejemplo n.º 2
0
 public void TestAddStudentMethod()
 {
     List<Student> students = new List<Student>();
     Student Ivan = new Student("Ivan", 14);
     Student Petya = new Student("Petya", 1234);
     students.Add(Ivan);
     students.Add(Petya);
     Class Maths = new Class("Maths", students);
     Maths.AddStudent(new Student("Kiril", 34));
     students.Add(new Student("Kiril", 34));
     Assert.AreEqual(Maths.Students, students);
 }