@Test public void getModules() { ArrayList<ModuleEntity> moduleEntities = viewModel.getModules(); assertNotNull(moduleEntities); assertEquals(7, moduleEntities.size()); }
public ArrayList<ModuleEntity> getModules() { return academyRepository.getAllModulesByCourse(courseId); }
CourseReaderViewModel extends ViewModel { public ArrayList<ModuleEntity> getModules() { return academyRepository.getAllModulesByCourse(courseId); } }
CourseReaderViewModel extends ViewModel { public ArrayList<ModuleEntity> getModules() { return academyRepository.getAllModulesByCourse(courseId); } CourseReaderViewModel(AcademyRepository mAcademyRepository); }
CourseReaderViewModel extends ViewModel { public ArrayList<ModuleEntity> getModules() { return academyRepository.getAllModulesByCourse(courseId); } CourseReaderViewModel(AcademyRepository mAcademyRepository); void setSelectedCourse(String courseId); void setSelectedModule(String moduleId); ArrayList<ModuleEntity> getModules(); ModuleEntity getSelectedModule(); }
CourseReaderViewModel extends ViewModel { public ArrayList<ModuleEntity> getModules() { return academyRepository.getAllModulesByCourse(courseId); } CourseReaderViewModel(AcademyRepository mAcademyRepository); void setSelectedCourse(String courseId); void setSelectedModule(String moduleId); ArrayList<ModuleEntity> getModules(); ModuleEntity getSelectedModule();  }