public void CheckEnumOfCourseTypeIsReturned()
        {
            //Arrange
            var repository         = A.Fake <IFindACourseRepository>();
            var findACourseService = new FindACourseService(repository);
            var returnList         = new List <CourseType> {
                CourseType.All, CourseType.ClassroomBased, CourseType.ClassroomBased, CourseType.WorkBased,
            };

            A.CallTo(() => repository.GetFilter <CourseType>()).Returns(returnList);

            //Act
            var result = findACourseService.GetFilterByName <CourseType>();

            //Assert
            Assert.Equal(4, result.Count);
        }
        public void CheckEnumOfCourseStudyTypeIsReturned()
        {
            //Arrange
            var repository         = A.Fake <IFindACourseRepository>();
            var findACourseService = new FindACourseService(repository);
            var returnList         = new List <Fac.StudyMode> {
                Fac.StudyMode.Flexible, Fac.StudyMode.FullTime, Fac.StudyMode.PartTime, Fac.StudyMode.Undefined,
            };

            A.CallTo(() => repository.GetFilter <Fac.StudyMode>()).Returns(returnList);

            //Act
            var result = findACourseService.GetFilterByName <Fac.StudyMode>();

            //Assert
            Assert.Equal(4, result.Count);
        }
        public void CheckEnumOfCourseHoursIsReturned()
        {
            //Arrange
            var repository         = A.Fake <IFindACourseRepository>();
            var findACourseService = new FindACourseService(repository);
            var returnList         = new List <CourseHours> {
                CourseHours.All, CourseHours.Flexible, CourseHours.Fulltime, CourseHours.PartTime
            };

            A.CallTo(() => repository.GetFilter <CourseHours>()).Returns(returnList);

            //Act
            var result = findACourseService.GetFilterByName <CourseHours>();

            //Assert
            Assert.Equal(4, result.Count);
        }
        public void CheckEnumOfCourseStartDateIsReturned()
        {
            //Arrange
            var repository         = A.Fake <IFindACourseRepository>();
            var findACourseService = new FindACourseService(repository);
            var returnList         = new List <StartDate> {
                StartDate.Anytime, StartDate.FromToday, StartDate.SelectDateFrom,
            };

            A.CallTo(() => repository.GetFilter <StartDate>()).Returns(returnList);

            //Act
            var result = findACourseService.GetFilterByName <StartDate>();

            //Assert
            Assert.Equal(3, result.Count);
            Assert.Equal(result.GetType(), result.GetType());
        }