public void SchoolTestAddCourseSecondTime()
 {
     var course = new Course("Javascript");
     var school = new School("Boby Georgiev");
     school.AddCourse(course);
     school.AddCourse(course);
 }
Beispiel #2
0
        public void TestRemoveCourseNormalRemoval()
        {
            School school = new School();
            school.AddCourse(new Course("Chemistry"));
            school.AddCourse(new Course("Geography"));

            school.RemoveCourse(new Course("Chemistry"));
            Assert.IsTrue(school.OfferedCourses.Count == 1);
        }
Beispiel #3
0
        public void TestAddCourseNormalAddition()
        {
            School school = new School();
            school.AddCourse(new Course("Chemistry"));

            Assert.IsTrue(school.OfferedCourses.Count == 1);
        }
Beispiel #4
0
        public void TestHasCourseNullObject()
        {
            School school = new School();
            school.AddCourse(new Course("Chemistry"));

            Assert.IsFalse(school.HasCourse(null));
        }
Beispiel #5
0
        public void TestHasCourseMissingCourse()
        {
            School school = new School();
            school.AddCourse(new Course("Chemistry"));

            Assert.IsFalse(school.HasCourse(new Course("Biology")));
        }
Beispiel #6
0
        public void TestHasCourseExistingCourse()
        {
            School school = new School();
            school.AddCourse(new Course("Chemistry"));

            Assert.IsTrue(school.HasCourse(new Course("Chemistry")));
        }
 public void SchoolAddCourseTest()
 {
     School school = new School();
     Course course = new Course("HQPC");
     school.AddCourse(course);
     Assert.AreEqual("HQPC", course.Name, "Adding courses to school works incorrectly.");
 }
        public void SchoolTestRemoveExistentStudent()
        {
            var course = new Course("Javascript");
            var school = new School("TUES");

            school.AddCourse(course);
            school.RemoveCourse(course);
        }
        public void SchoolTestRemoveNonExistingCourse()
        {
            var firstCourse = new Course("Javascript");
            var secondCourse = new Course("Csharp");
            var school = new School("TUES");

            school.AddCourse(firstCourse);
            school.RemoveCourse(secondCourse);
        }
        public void SchoolAddStudentInCourseTest()
        {
            School cSharpSchool = new School("C# School");
            Course cSharpCourse = new Course("C# Course");

            cSharpSchool.AddCourse(cSharpCourse);

            Assert.AreEqual(1, cSharpSchool.CountOfCourses());
        }
        public void SchoolRemoveStudentFromCourseTest()
        {
            School cSharpSchool = new School("C# School");
            Course cSharpCourse = new Course("C# Course");

            cSharpSchool.AddCourse(cSharpCourse);
            cSharpSchool.RemoveCourse(cSharpCourse);

            Assert.AreEqual(0, cSharpSchool.CountOfCourses());
        }
Beispiel #12
0
        static void Main(string[] args)
        {
            School school = new School();
            Course<Student> course = new Course<Student>();
            Student student = new Student("A",10000);

            course[0] = student;
            school.AddCourse(course);

        }
Beispiel #13
0
        public void School_ChecIsNotkUniqeNumber()
        {
            School school = new School();
            Course<Student> course = new Course<Student>();
            Student student = new Student("Anonymouse",10000);

            course[0] = student;
            school.AddCourse(course);

            bool falseCondition = School.CheckForTrueUniqeNumber(10000);

            Assert.IsFalse(falseCondition,"Probably Uniqe Number funcionalty issue in the School class.");
        }
Beispiel #14
0
 public void TestAddCourseAlreadyAddedCourse()
 {
     School school = new School();
     school.AddCourse(new Course("Chemistry"));
     school.AddCourse(new Course("Chemistry"));
 }
 public void SchoolAddCourseNullTest()
 {
     School school = new School();
     school.AddCourse(null);
 }
Beispiel #16
0
 public void TestRemoveCourseMissingCourse()
 {
     School school = new School();
     school.AddCourse(new Course("Chemistry"));
     school.RemoveCourse(new Course("Geography"));
 }
Beispiel #17
0
 public void TestAddCourseNullObject()
 {
     School school = new School();
     school.AddCourse(null);
 }
Beispiel #18
0
        public void TestToString()
        {
            School school = new School();
            Course course = new Course("Chemistry");
            course.AddStudent(new Student("Hari", 123));
            course.AddStudent(new Student("Joe", 124));
            school.AddCourse(course);

            string expectedOutput = "Course name: Chemistry" + Environment.NewLine +
                "Student: Hari, number: 123." + Environment.NewLine +
                "Student: Joe, number: 124.";
            Assert.AreEqual(expectedOutput, school.ToString());
        }