Example #1
0
        public void GetFinishedCoursesTest_Passt(int resultCount, List <Course> allCourses, List <Chapter> finishedChapters, List <UserLesson> finishedLessons)
        {
            if (allCourses == null)
            {
                _coursesService.Setup(x => x.GetCorses()).Returns((IQueryable <Course>)null);
            }
            else
            {
                _coursesService.Setup(x => x.GetCorses()).Returns(allCourses.AsQueryable());
            }
            var result = _resultsManager.GetFinishedCourses(finishedLessons, finishedChapters);

            Assert.True(result != null);
            Assert.True(result.Count == resultCount);
        }