@Test public void getBookmark() { when(academyRepository.getBookmarkedCourses()).thenReturn(DataDummy.generateDummyCourses()); List<CourseEntity> courseEntities = viewModel.getBookmarks(); verify(academyRepository).getBookmarkedCourses(); assertNotNull(courseEntities); assertEquals(5, courseEntities.size()); }
public LiveData<List<CourseEntity>> getBookmarks() { return academyRepository.getBookmarkedCourses(); }
BookmarkViewModel extends ViewModel { public LiveData<List<CourseEntity>> getBookmarks() { return academyRepository.getBookmarkedCourses(); } }
BookmarkViewModel extends ViewModel { public LiveData<List<CourseEntity>> getBookmarks() { return academyRepository.getBookmarkedCourses(); } BookmarkViewModel(AcademyRepository mAcademyRepository); }
BookmarkViewModel extends ViewModel { public LiveData<List<CourseEntity>> getBookmarks() { return academyRepository.getBookmarkedCourses(); } BookmarkViewModel(AcademyRepository mAcademyRepository); LiveData<List<CourseEntity>> getBookmarks(); }
BookmarkViewModel extends ViewModel { public LiveData<List<CourseEntity>> getBookmarks() { return academyRepository.getBookmarkedCourses(); } BookmarkViewModel(AcademyRepository mAcademyRepository); LiveData<List<CourseEntity>> getBookmarks();  }