private async Task TestSelects() { List <Lesson> actualLesson = await lessonStorage.GetAllLesson(); for (int i = 0; i < listLesson.Count; i++) { Assert.Contains(listLesson[i], actualLesson); } Lesson actual = await lessonStorage.GetLessonById((int)listLesson[0].Id); Assert.AreEqual(listLesson[0], actual); }
public async Task <ActionResult <List <LessonOutputModel> > > LessonGetAll() { List <Lesson> lessons = await lessonStorage.GetAllLesson(); return(Ok(LessonMapper.ToOutputModels(lessons))); }