Ejemplo n.º 1
0
 public void TestRemoveStudentMethodNotExixtingStudent()
 {
     List<Student> students = new List<Student>();
     Student Ivan = new Student("Ivan", 14);
     Student Petya = new Student("Petya", 1234);
     Student Kircho = new Student("Kircho", 134);
     students.Add(Ivan);
     students.Add(Petya);
     Class Maths = new Class("Maths", students);
     Maths.RemoveStudent(Kircho);
 }
Ejemplo n.º 2
0
 public void TestRemoveStudentMethod()
 {
     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.RemoveStudent(Petya);
     students.Remove(Petya);
     Assert.AreEqual(Maths.Students, students);
 }