public void SchoolShouldThrowExceptionWhenAddingExistingStudent() { var school = new School("Telerik Academy"); var student = new Student("Daniel Popov", 10000); school.AddStudent(student); school.AddStudent(student); }
public void TestSchoolAddingNewCourseShouldProperlyUpdateList() { School school = new School("OMG"); school.AddCourse(new Course("JS-OOP")); school.AddCourse(new Course("JS-Basic")); Assert.AreEqual(2, school.Courses.Count, "List of courses is icorrect"); }
public void TestSchoolAddingCourseWithSameNameToThrow() { School school = new School("OMG"); Course js = new Course("JS-OOP"); school.AddCourse(js); school.AddCourse(js); }
public void SchoolShouldRemoveStudentCorrectly() { var school = new School("Telerik Academy"); var student = new Student("Daniel Popov", 10000); school.AddStudent(student); school.RemoveStudent(student); Assert.AreEqual(0, school.Students.Count); }
public void SchoolShouldRemoveCourseCorrectly() { var school = new School("Telerik Academy"); var course = new Course("High Quality Code"); school.AddCourse(course); school.RemoveCourse(course); Assert.AreEqual(0, school.Courses.Count); }
public void AddCourseShouldAddTheCourse() { List<Course> courses = new List<Course>(); List<Student> students = new List<Student>(); School IodaSchool = new School(courses); string name = "Math"; Course newCourse = new Course(students, name); IodaSchool.AddCourse(newCourse); }
public void RemoveCourseShouldRemoveCourseThatAlreadyExist() { string name = "English"; List<Student> students = new List<Student>(); Course newCourse = new Course(students,name); List<Course> courses = new List<Course>(); School IodaSchool = new School(courses); IodaSchool.AddCourse(newCourse); IodaSchool.RemoveCourse(newCourse); }
public void RemoveCourseShouldThrowErrorIfCourseDoesNotExist() { string name = "English"; List<Student> students = new List<Student>(); Course newCourse = new Course(students, name); Course newCourse2 = new Course(students, name + 2); List<Course> courses = new List<Course>(); School IodaSchool = new School(courses); IodaSchool.AddCourse(newCourse); IodaSchool.RemoveCourse(newCourse2); }
public void AddCoursesShouldThrowErrorIfCoursesAreMoreThanMaxCourses() { List<Course> courses = new List<Course>(); School IodaSchool = new School(courses); List<Student> students = new List<Student>(); for (int i = 0; i < 35; i++) { Course newCourse = new Course(students, ("English"+i)); IodaSchool.AddCourse(newCourse); } }
public void TestCoursesAndStudents() { School academy = new School(); string[] letters = new string[] { "s", "a", "e", "ela", "ina", "ka", "ona", }; for (int i = 0; i < 5; i++) { Course pesho = new Course("Course #" + i); for (int j = 0; j < 30; j++) { Student thisStudent = new Student("Ivan" + letters[i % letters.Length], (10344 * (i + 1)) + j); pesho.AddStudent(thisStudent); academy.AddStudentToSchool(thisStudent); } academy.AddCourseToSchool(pesho); } Assert.AreEqual(this.RetutnInfo(150, 5), academy.ShowInformationAboutSchool()); }
public void SchoolShouldThrowExceptionWhenNullCourseAdded() { var school = new School("Telerik Academy"); var course = new Course(null); school.AddCourse(course); }
public void SchoolShouldThrowWhenRemovingNotExistingCourse() { var school = new School("Telerik Academy"); var course = new Course("High Quality Code"); school.RemoveCourse(course); }
public void SchoolShouldReturnNameCorrectly() { var school = new School("Telerik Academy"); Assert.AreEqual("Telerik Academy", school.Name); }
public void SchoolShouldNotThrowException() { var school = new School("Telerik Academy"); }
public void SchoolShouldAddStudentCorrectly() { var school = new School("Telerik Academy"); var student = new Student("Daniel Popov", 10000); school.AddStudent(student); }
public void SchoolShoudThrowWhenNullStudentAdded() { var school = new School("Telerik Academy"); Student student = null; school.AddStudent(student); }
public void StudentShouldAddCourseCorrectly() { var school = new School("Telerik Academy"); var course = new Course("High Quality Code"); school.AddCourse(course); Assert.AreSame(course, school.Courses.First()); }
public void TestSchoolAddingCourseToBeValid() { School school = new School("OMG"); school.AddCourse(new Course("JS")); }
public void TestSchoolAddingCoursetWithNull() { School school = new School("OMG"); school.AddCourse(null); }
public void TestSchoolCreateNewToBeValid() { School school = new School("OMG"); }
public void TestSchoolNameIsNull() { School school = new School(null); }
public void SchoolShouldThrowExceptionWhenRemovingNullCourse() { var school = new School("Telerik Academy"); Course course = null; school.RemoveCourse(course); }
public void TestSchoolNameIsEmptyString() { School school = new School(string.Empty); }
public void SchoolShouldThrowExceptionWhenExistingCourseAdded() { var school = new School("Telerik Academy"); var course = new Course("High Quality Code"); school.AddCourse(course); school.AddCourse(course); }
public void TestSchoolNameToBeSameAsArgument() { School school = new School("OMG"); Assert.AreEqual("OMG", school.SchoolName); }
public void SchoolShouldThrowExceptionWhenNameIsEmpty() { var school = new School(string.Empty); }
public void TestSchool() { School academy = new School(); Assert.AreEqual(this.RetutnInfo(0, 0), academy.ShowInformationAboutSchool()); }
public void SchoolShouldThrowExceptionWhenNameIsNull() { var school = new School(null); }