Exemplo n.º 1
0
 public void RemoveNonExistingCourseTest()
 {
     List<Course> courses = new List<Course>();
     School school = new School();
     Course javascript = new Course("Javascript");
     school.RemoveCourse(javascript);
 }
Exemplo n.º 2
0
 public void TestAddStudentExceptionWhenAlreadyAdded()
 {
     School school = new School("GLFL Simeon Radev");
     Course course = new Course("There is such course in the school!");
     school.AddCourse(course);
     school.AddCourse(course);
 }
Exemplo n.º 3
0
 public void AddCourseTest()
 {
     List<Course> courses = new List<Course>();
     Course javascript = new Course("Javascript");
     School school = new School();
     school.AddCourse(javascript);
     Assert.AreEqual(javascript.Name, school.Courses[0].Name);
 }
Exemplo n.º 4
0
 public void TestRemoveStudentExceptionWhenNotExisting()
 {
     School school = new School("GLFL Simeon Radev");
     Course courseOne = new Course("Math");
     Course courseTwo = new Course("Physics");
     school.AddCourse(courseOne);
     school.RemoveCourse(courseTwo);
 }
Exemplo n.º 5
0
 public void RemoveCourseTest()
 {
     List<Course> courses = new List<Course>();
     School school = new School();
     Course javascript = new Course("Javascript");
     school.AddCourse(javascript);
     school.RemoveCourse(javascript);
     Assert.IsTrue(school.Courses.Count == 0);
 }
Exemplo n.º 6
0
        public void TestAddCourseRemoveCourse()
        {
            School school = new School("GLFL Simeon Radev");
            Course course = new Course("Math");

            school.AddCourse(new Course("Physics"));
            Assert.AreEqual(school.Courses.Count, 1);

            school.AddCourse(course);
            Assert.AreEqual(school.Courses.Count, 2);
            Assert.AreEqual(school.Courses[1].Name, "Math");

            school.RemoveCourse(course);
            Assert.AreEqual(school.Courses.Count, 1);
            Assert.AreEqual(school.Courses[0].Name, "Physics");
        }
Exemplo n.º 7
0
 public void SchoolConstructorTest()
 {
     List<Course> courses = new List<Course>();
     School school = new School();
     Assert.IsNotNull(school);
 }
Exemplo n.º 8
0
 public void TestAddCourseExceptionWhenNull()
 {
     School school = new School("GLFL Simeon Radev");
     school.AddCourse(null);
 }
Exemplo n.º 9
0
 public void TestConstructor()
 {
     School course = new School("GLFL Simeon Radev");
     Assert.AreEqual(course.Name, "GLFL Simeon Radev");
 }
Exemplo n.º 10
0
 public void TestNameExceptionWhenNull()
 {
     School school = new School(null);
 }
Exemplo n.º 11
0
 public void TestNameExceptionWhenEmpty()
 {
     School school = new School("");
 }