public void CreatingCourseShouldThrowArgumentExceptionWhenProvidedTooLongName() { var tooLongName = new string('a', 101); var course = new Course(tooLongName); }
public void CreatingCourseShouldThrowArgumentExceptionWhenProvidedNameWithNullValue() { var course = new Course(null); }
private Course GetValidCourse() { var course = new Course("Valid"); return course; }
public void CreatingCourseShouldThrowArgumentExceptionWhenProvidedEmptyName() { var course = new Course(string.Empty); }
public void RemoveCourseShouldRemoveRightCourseWhenRemovingFromMultiple() { var validNames = new string[3] { "Java", "C#", "C++" }; var school = GetValidSchool(); var firstCourse = new Course(validNames[0]); var secondCourse = new Course(validNames[1]); var thirdCourse = new Course(validNames[2]); school.AddCourse(firstCourse); school.AddCourse(secondCourse); school.AddCourse(thirdCourse); school.RemoveCourse(firstCourse); for (int i = 0; i < school.Courses.Count; i++) { var currCourse = school.Courses[i]; Assert.AreNotEqual(firstCourse, currCourse, "Removing course failed."); } }