public void TestCourseIfFullWith30Students() { Course english = new Course("English"); english.StudentsCount = 30; bool courseFull = english.CheckIfCourseIsFull(); Assert.IsTrue(courseFull); }
public void TestCourseIfFullWithNegativeStudents() { Course english = new Course("English"); english.StudentsCount = -5; bool courseFull = english.CheckIfCourseIsFull(); Assert.IsFalse(courseFull); }
public void TestCourseAddStudentWhenMaxedOut() { Course english = new Course("English"); english.StudentsCount = 30; int studentCount = 30; Assert.AreEqual(studentCount, english.StudentsCount, "Student count is different"); }
public void TestCourseRemoveStudent() { Course english = new Course("English"); Student misho = new Student("Misho"); english.AddStudent(misho); english.Remove(misho); Assert.AreEqual(0, english.StudentsCount, "Student count is different!"); }
public void TestCourseAddStudent() { Student misho = new Student("Misho"); Course english = new Course("English"); english.AddStudent(misho); int studentCount = 1; Assert.AreEqual(studentCount, english.StudentsCount, "Student count is different"); }
public void TestSchoolAddCourse() { Course english = new Course("English"); School hornsworth = new School("Hornsworth High"); hornsworth.AddCourse(english); int cousesCount = 1; Assert.AreEqual(cousesCount, hornsworth.Courses.Count, "Courses count is different!"); }
public void RemoveCourse(Course course) { if (course != null) { this.courses.Remove(course); } else { throw new NullReferenceException("Course does not exist"); } }
public void TestCourseGetStudents() { //how to test this Course english = new Course("English"); Student misho = new Student("Misho"); english.AddStudent(misho); List<Student> testList = new List<Student>(); testList.Add(misho); Assert.AreEqual(testList[0], english.Students[0], "Students in course are not the same"); //CollectionAssert.AreEqual(testList, english.Students, //"Students in course are not the same"); }
public void AddCourse(Course course) { this.courses.Add(course); }
public void RemoveCourse(Course course) { this.courses.Remove(course); }