public void getAmountOfLessonsOfStudentTest()
        {
            initMocks();
            int les = GeneralFuntion.getAmountOfLessonsOfStudent(std.Object);

            Assert.AreEqual(3, les);
        }
        public void CapitalizeFirstLetterEachWordTest1()
        {
            string s1 = GeneralFuntion.CapitalizeFirstLetterEachWord("hadriel benjo");
            string s2 = "Hadriel Benjo";

            Assert.AreEqual(s1, s2, false, CultureInfo.CurrentCulture);
        }
        public void compareCompleteDateFromDateTimeTest()
        {
            DateTime a = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 12, 6, 0);
            DateTime b = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 12, 6, 0);

            Assert.IsTrue(GeneralFuntion.compareCompleteDateFromDateTime(a, b));
        }
        public void getTotalHourOfAllLessonOfLecturerTest()
        {
            initMocks();
            int h = GeneralFuntion.getTotalHourOfAllLessonOfLecturer(lec.Object);

            Assert.AreEqual(11, h);
        }
        public void getAgeFromDateTest()
        {
            DateTime a   = new DateTime(1990, 10, 29, 0, 0, 0);
            int      age = 27;

            Assert.IsTrue(age == GeneralFuntion.getAgeFromDate(a));
        }
        public void getAgeFromStringDateTest()
        {
            string strdate = "10.10.1990";
            int    age     = 27;

            Assert.IsTrue(age == GeneralFuntion.getAgeFromStringDate(strdate));
        }
        public void LecturerHaveNoMore12WeeklyHoursLessonsTest()
        {
            initMocks();
            int h = GeneralFuntion.getTotalHourOfAllLessonOfLecturer(lec.Object);

            Assert.IsTrue(h <= 12);
        }
        public void PractitionerHaveNoMore16WeeklyHoursLessonsTest()
        {
            initMocks();
            int h = GeneralFuntion.getTotalHourOfAllLessonOfPractitioner(prac.Object);

            Assert.IsTrue(h <= 16);
        }
        public void getTotalHourOfAllLessonOfPractitionerTest()
        {
            initMocks();
            int h = GeneralFuntion.getTotalHourOfAllLessonOfPractitioner(prac.Object);

            Assert.AreEqual(15, h);
        }
 public void isOutstandStudentTest()
 {
     initMocks();
     std.Object.Enrollments.Add(new Enrollment {
         CourseId = c4.Object.ID, StudentId = std.Object.ID, Grade = 100
     });
     Assert.IsTrue(GeneralFuntion.isOutstandStudent(std.Object));
 }
        public void thisLesson1NotConflitWithLesson2Test()
        {
            DateTime s1 = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 10, 0, 0);
            DateTime e1 = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 12, 0, 0);
            DateTime s2 = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 12, 0, 0);
            DateTime e2 = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 13, 0, 0);

            Assert.IsTrue(GeneralFuntion.thisLesson1NotConflitWithLesson2(s1, e1, s2, e2));
        }
        public void ConvertStringToDateTest()
        {
            DateTime a = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 15, 0, 0);

            Assert.IsNotNull(GeneralFuntion.ConvertStringToDate("15:00"));
        }
 public void removeCourseFromPractitionerTest()
 {
     initMocks();
     Assert.IsTrue(GeneralFuntion.removeCourseFromPractitioner(prac.Object, c3.Object));
 }
 public void getAmountOfLessonsOfPractitionerTest()
 {
     initMocks();
     Assert.AreEqual(7, GeneralFuntion.getAmountOfLessonsOfPractitioner(prac.Object));
 }
        public void checkIfEmailValidTest()
        {
            string email = "*****@*****.**";

            Assert.IsTrue(GeneralFuntion.checkIfEmailValid(email));
        }
 public void studentHasPassCourseTest()
 {
     initMocks();
     Assert.IsTrue(GeneralFuntion.studentHasPassCourse(std.Object, c2.Object));
 }
 public void getAmountOfLecturesOfLecturerTest()
 {
     initMocks();
     Assert.AreEqual(4, GeneralFuntion.getAmountOfLecturesOfLecturer(lec.Object));
 }
 public void AddCourseToStudentTest()
 {
     initMocks();
     Assert.IsTrue(GeneralFuntion.AddCourseToStudent(std.Object, c4.Object));
 }
 public void removeCourseFromStudentTest()
 {
     initMocks();
     Assert.IsTrue(GeneralFuntion.removeCourseFromStudent(std.Object, c1.Object));
 }
 public void averageOfStudentOfHisCoursesTest()
 {
     initMocks();
     Assert.AreEqual(80, GeneralFuntion.averageOfStudentOfHisCourses(std.Object));
 }
 public void AddCourseToPractitionerTest()
 {
     initMocks();
     Assert.IsTrue(GeneralFuntion.AddCourseToPractitioner(prac.Object, c4.Object));
 }
 public void AllLessonsTimeDontClashOfPractitionerTest()
 {
     initMocks();
     Assert.IsTrue(GeneralFuntion.AllLessonsTimeDontClashOfPractitioner(prac.Object));
 }
 public void getGradeOfCourseofStudentTest()
 {
     initMocks();
     Assert.AreEqual(70, GeneralFuntion.getGradeOfCourseofStudent(std.Object, c3.Object));
 }
 public void getAmountOfApprovedCourseofPractitionerTest()
 {
     initMocks();
     Assert.AreEqual(1, GeneralFuntion.getAmountOfApprovedCourseofPractitioner(prac.Object));
 }
 public void getAmountOfApprovedCourseofLecturerTest()
 {
     initMocks();
     Assert.AreEqual(2, GeneralFuntion.getAmountOfApprovedCourseofLecturer(lec.Object));
 }
 public void getAmountOfCourseofStudentTest()
 {
     initMocks();
     Assert.AreEqual(3, GeneralFuntion.getAmountOfCourseofStudent(std.Object));
 }
 public void AllLessonsTimeDontClashOfLecturerTest()
 {
     initMocks();
     Assert.IsTrue(GeneralFuntion.AllLessonsTimeDontClashOfLecturer(lec.Object));
 }
 public void AddCourseToLecturerTest()
 {
     initMocks();
     Assert.IsTrue(GeneralFuntion.AddCourseToLecturer(lec.Object, c4.Object));
 }
 public void removeCourseFromLecturerTest()
 {
     initMocks();
     Assert.IsTrue(GeneralFuntion.removeCourseFromLecturer(lec.Object, c3.Object));
 }
        public void convertToDateTimeTest()
        {
            DateTime a = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 15, 0, 0);

            Assert.IsTrue(GeneralFuntion.compareCompleteDateFromDateTime(a, GeneralFuntion.convertToDateTime(15)));
        }