public void CanNotAddDifferentStudentsWithSameId() { var school = new School(); var student1 = new Student("pesho", 22222); var student2 = new Student("gosho", 22222); school.AddStudent(student1); school.AddStudent(student2); }
static void CreateStudentsIntoSchool(School school, int studentCount) { for (int j = 0; j < studentCount; j++) { school.AddStudent(CreateStudent()); } }
public void AddingStudentShouldIncreazeNumberOfStudents() { var school = new School(); var student = new Student("pesho", 22222); school.AddStudent(student); Assert.AreEqual(1, school.StudentsCount, "Student adding does not increaze count"); }
private static void Main() { var firstDiscipline = new Discipline("Mathematic", 20, 3, "Some comment for math..."); var secondDiscipline = new Discipline("Physics", 22, 4); var firstTeacher = new Teacher("Georgi Gerogiev", "Some comment for the teacher..."); var secondTeacher = new Teacher("Ivan Ivanov"); firstTeacher.AddDiscipline(null); firstTeacher.GetDisciplines().ForEach(x => System.Console.WriteLine(x.Name)); firstTeacher.AddDiscipline(secondDiscipline); secondTeacher.AddDiscipline(firstDiscipline); secondTeacher.AddDiscipline(secondDiscipline); var firstStudent = new Student("Pesho Peshov", 112, "Some comment about the student..."); var secondStudent = new Student("Gosho Goshov", 113); var exampleSchoolClass = new School("Some unique ID", "Some comment..."); exampleSchoolClass.AddStudent(firstStudent); exampleSchoolClass.AddStudent(secondStudent); exampleSchoolClass.AddTeacher(firstTeacher); exampleSchoolClass.AddTeacher(secondTeacher); }
public void AddDuplicateIDStudent() { var school = new School(); school.AddStudent(ValidName, ValidUid); school.AddStudent(ValidName, ValidUid); }
public void AddStudent() { var testSchool = new School(); testSchool.AddStudent(ValidName, ValidUid); Assert.AreEqual(ValidName, testSchool.GetStudentByUID(ValidUid).Name); }
public void AddStudent() { School school = new School(); school.AddStudent("lala", 10000); Assert.AreEqual("lala", school.GetStudentByUID(10000).Name); }
public void AddDuplicatedIDStudent() { School school = new School(); school.AddStudent("lala", 10000); school.AddStudent("2222", 10000); }
public void AddBadIDStudentLow() { School school = new School(); school.AddStudent("lala", 9999); }
public void AddBadIDStudentHigh() { School school = new School(); school.AddStudent("lala", 100000); }