예제 #1
0
        public void WhenTheTutorEntersTheParans(string p0, string p1)
        {
            DateTime start = Convert.ToDateTime(p0);
            DateTime end   = Convert.ToDateTime(p1);

            _lessonRepository.Setup(r => r.ListByRangeOfDates(start, end)).
            Returns(Task.FromResult <IEnumerable <Lesson> >(iLessons));

            _lessonService = new LessonService(_lessonRepository.Object, GetDefaultIUnitOfWorkInstance().Object);
            items          = _lessonService.ListByRangeOfDates(start, end).Result.Count();
        }
예제 #2
0
        public void WhenAnyLessonIsReturned(string p0, string p1)
        {
            List <Lesson> lessons = new List <Lesson>();

            iLessons = lessons as IEnumerable <Lesson>;
            DateTime start = Convert.ToDateTime(p0);
            DateTime end   = Convert.ToDateTime(p1);

            _lessonRepository.Setup(r => r.ListByRangeOfDates(start, end)).
            Returns(Task.FromResult <IEnumerable <Lesson> >(iLessons));
            _lessonService = new LessonService(_lessonRepository.Object, GetDefaultIUnitOfWorkInstance().Object);
            message        = _lessonService.ListByRangeOfDates(start, end).Exception.Message;
        }