public void TestStudentConstructorName()
 {
     string name = "Biliana Georgieva";
     int idNumber = 1;
     Student student = new Student(name, idNumber);
     Assert.AreEqual(student.Name, "Biliana Georgieva");
 }
 public void TestStudentGetNumberID()
 {
     string name = "Biliana Georgieva";
     int idNumber = 1;
     Student student = new Student(name, idNumber);
     int studentNumberID = student.NumberID;
     Assert.AreEqual(studentNumberID, 1);
 }
 public void TestClassConstructorNullName()
 {
     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(null, students);
 }
 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);
 }
 static void Main(string[] args)
 {
     Student student = new Student("Ivan Ivanov", 98);
     List<Student> students = new List<Student>();
     students.Add(student);
     Class Maths = new Class("Math", students);
     Console.WriteLine(student.Name);
     Console.WriteLine(Maths);
 }
 public void TestClassConstructorName()
 {
     string name = "Biology";
     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 Biology = new Class(name, students);
     Assert.AreEqual(Biology.ClassName, "Biology");
 }
 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);
 }
        public List<Student> AddStudent(Student student)
        {
            if (students.Count == 0)
            {
                students = new List<Student>();
            }
            if (this.students.Count < MAX_NUMBER - 1)
            {
                students.Add(student);
            }

            return students;
        }
 public void TestClassConstructorStudents()
 {
     List<Student> students = new List<Student>();
     Student Ivan = new Student("Ivan", 14);
     Student Petya = new Student("Petya", 1234);
     students.Add(Ivan);
     students.Add(Petya);
     students.Add(new Student("Name", 678));
     students.Add(new Student("Name", 678));
     students.Add(new Student("Name", 678));
     students.Add(new Student("Name", 678));
     students.Add(new Student("Name", 678));
     students.Add(new Student("Name", 678));
     students.Add(new Student("Name", 678));
     students.Add(new Student("Name", 678));
     students.Add(new Student("Name", 678));
     students.Add(new Student("Name", 678));
     students.Add(new Student("Name", 678));
     students.Add(new Student("Name", 678));
     students.Add(new Student("Name", 678));
     students.Add(new Student("Name", 678));
     students.Add(new Student("Name", 678));
     students.Add(new Student("Name", 678));
     students.Add(new Student("Name", 678));
     students.Add(new Student("Name", 678));
     students.Add(new Student("Name", 678));
     students.Add(new Student("Name", 678));
     students.Add(new Student("Name", 678));
     students.Add(new Student("Name", 678));
     students.Add(new Student("Name", 678));
     students.Add(new Student("Name", 678));
     students.Add(new Student("Name", 678));
     students.Add(new Student("Name", 678));
     students.Add(new Student("Name", 678));
     students.Add(new Student("Name", 678));
     students.Add(new Student("Name", 678));
     students.Add(new Student("Name", 678));
     students.Add(new Student("Name", 678));
     Class maths = new Class("Math", students);
 }
 public void TestStudentConstructorIDnumberNegative()
 {
     Student student = new Student("Biliana", -23);
 }
 public void TestStudentConstructorIDnumberBiggerThanMax()
 {
     Student student = new Student("Biliana", 100000);
 }
 public void TestStudentToStringNumber()
 {
     string name = "Biliana Georgieva";
     int idNumber = 1;
     Student student = new Student(name, idNumber);
     Assert.AreEqual(student.ToString(), "NumberID: 1, Name: Biliana Georgieva");
 }
 public void TestStudentSetOneLetterName()
 {
     string name = "Biliana Georgieva";
     int idNumber = 1;
     Student student = new Student(name, idNumber);
     student.Name = "B";
 }
 public void TestStudentConstructorOneLetterName()
 {
     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("M", students);;
 }
 public void TestStudentSetEmptyNameSpace()
 {
     string name = "Biliana Georgieva";
     int idNumber = 1;
     Student student = new Student(name, idNumber);
     student.Name = " ";
 }
 public void TestStudentConstructorOneLetterName()
 {
     Student student = new Student("I", 10);
 }
 public void TestStudentSetIDnumberNegative()
 {
     Student student = new Student("Biliana", 2344);
     student.NumberID = -34;
 }
 public List<Student> RemoveStudent(Student student)
 {
     bool findStudent = false;
     for (int i = 0; i < this.students.Count; i++)
     {
         if ((student.Name == students[i].Name && (student.NumberID == students[i].NumberID)))
         {
             students.Remove(student);
             findStudent = true;
             break;
         }
     }
     if (findStudent == false)
     {
         throw new ArgumentException("No such person in class");
     }
     return students;
 }
 public void TestStudentSetIDnumber()
 {
     string name = "Biliana Georgieva";
     int idNumber = 1;
     Student student = new Student(name, idNumber);
     student.NumberID = 34;
     Assert.AreEqual(student.NumberID, 34);
 }
 public void TestClassSetStudents()
 {
     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);
     List<Student> otherStudents = new List<Student>();
     Student Ivanka = new Student("Ivanka", 140);
     Student Petka = new Student("Petka", 234);
     otherStudents.Add(Ivanka);
     otherStudents.Add(Petka);
     Maths.Students = otherStudents;
     Assert.AreEqual(Maths.Students[0], Ivanka);
 }
 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);
 }
 public void TestClassSetName()
 {
     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.ClassName = "OtherMaths";
     Assert.AreEqual(Maths.ClassName, "OtherMaths");
 }
 public void TestStudentSetName()
 {
     string name = "Biliana Georgieva";
     int idNumber = 1;
     Student student = new Student(name, idNumber);
     student.Name = "Ivan Ivanov";
     Assert.AreEqual(student.Name, "Ivan Ivanov");
 }
 public void TestStudentConstructorNullName()
 {
     Student student = new Student(null, 1);
 }
 public void TestStudentSetNullName()
 {
     string name = "Biliana Georgieva";
     int idNumber = 1;
     Student student = new Student(name, idNumber);
     student.Name = null;
 }
 public void TestClassConstructorStudentsList()
 {
     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("Math", students);
     Assert.AreEqual(students, maths.Students);
 }
 public void TestStudentConstructorEmptyName()
 {
     Student student = new Student("", 1);
 }
 public void TestStudentSetIDnumberBigger()
 {
     Student student = new Student("Biliana", 2344);
     student.NumberID = 200000;
 }
 public void TestStudentToStringNumber()
 {
     List<Student> students = new List<Student>();
     Student Ivan = new Student("Ivan", 14);
     students.Add(Ivan);
     Class Maths = new Class("Maths", students);
     StringBuilder classToString = new StringBuilder();
     classToString.Append("Class Maths:");
     classToString.AppendLine();
     classToString.Append("NumberID: 14, Name: Ivan");
     classToString.AppendLine();
     Assert.AreEqual(Maths.ToString(),classToString.ToString() );
 }