static void Main() { School newSchool = new School(); newSchool.AddCourse("test"); var foundCourse = newSchool.Courses.Find(x => x.CourseName == "test"); foundCourse.AddStudent("Gaco", newSchool); }
public static void Main() { var st = new Student("dada", 33424); var st1 = new Student("d22ada", 31424); var languageSchool = new School(); languageSchool.AddStudent(st); languageSchool.AddStudent(st1); var math = new Course(); math.AddStudent(st); math.AddStudent(st1); math.RemoveStudent(new Student("dddd", 23232)); languageSchool.AddCourse(math); languageSchool.RemoveCourse(math); languageSchool.AddCourse(math); }
public void CreateCourseWithNameAndCheckit() { School school = new School(); school.AddCourse("test"); var expected = "test"; var actual = school.Courses.Find(x => x.CourseName == "test").CourseName; Assert.AreEqual(expected, actual); }
public void CreateCourseWithName() { School school = new School(); school.AddCourse("test"); var expected = 1; var actual = school.Courses.Count; Assert.AreEqual(expected, actual); }
public void Add31NewStudents() { School school = new School(); school.AddCourse("test"); var course = school.Courses.Find(x => x.CourseName == "test"); for (int i = 0; i <= 31; i++) { course.AddStudent("Gosho", school); } }
public void AddNewStudent() { School school = new School(); school.AddCourse("test"); var course = school.Courses.Find(x => x.CourseName == "test"); course.AddStudent("Gosho", school); var expected = "Gosho"; var foundCourse = school.Courses.Find(x => x.CourseName == "test"); var foundStuden = foundCourse.Students.Find(x => x.Name == "Gosho"); var actual = foundStuden.Name; Assert.AreEqual(expected, actual); }
public void CreateCourseWithNoName() { School school = new School(); school.AddCourse(""); }