public void GetFinishedChaptersTest_Passt(int resultCount, List <UserLesson> finishedLessons, List <Chapter> allChapters) { if (allChapters == null) { _coursesService.Setup(x => x.GetChapters()).Returns((IQueryable <Chapter>)null); } else { _coursesService.Setup(x => x.GetChapters()).Returns(allChapters.AsQueryable()); } var result = _resultsManager.GetFinishedChapters(finishedLessons); Assert.True(result != null); Assert.True(result.Count == resultCount); }