@Test public void getCourse() { viewModel.setSelectedCourse(dummyCourse.getCourseId()); CourseEntity courseEntity = viewModel.getCourse(); assertNotNull(courseEntity); assertEquals(dummyCourse.getCourseId(), courseEntity.getCourseId()); assertEquals(dummyCourse.getDeadline(), courseEntity.getDeadline()); assertEquals(dummyCourse.getDescription(), courseEntity.getDescription()); assertEquals(dummyCourse.getImagePath(), courseEntity.getImagePath()); assertEquals(dummyCourse.getTitle(), courseEntity.getTitle()); }
public CourseEntity getCourse() { return academyRepository.getCourseWithModules(courseId); }
DetailCourseViewModel extends ViewModel { public CourseEntity getCourse() { return academyRepository.getCourseWithModules(courseId); } }
DetailCourseViewModel extends ViewModel { public CourseEntity getCourse() { return academyRepository.getCourseWithModules(courseId); } DetailCourseViewModel(AcademyRepository mAcademyRepository); }
DetailCourseViewModel extends ViewModel { public CourseEntity getCourse() { return academyRepository.getCourseWithModules(courseId); } DetailCourseViewModel(AcademyRepository mAcademyRepository); void setSelectedCourse(String courseId); CourseEntity getCourse(); List<ModuleEntity> getModules(); }
DetailCourseViewModel extends ViewModel { public CourseEntity getCourse() { return academyRepository.getCourseWithModules(courseId); } DetailCourseViewModel(AcademyRepository mAcademyRepository); void setSelectedCourse(String courseId); CourseEntity getCourse(); List<ModuleEntity> getModules();  }