We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GithubTrending/Data/src/test/java/co/joebirch/data/ProjectsDataRepositoryTest.kt
Line 96 in 02ae6cd
Issue: 2 tests were failing
bookmarkProjectCompletes
You should be using factory.getCacheDataStore().setProjectAsBookmarked(any()) instead of cache.setProjectAsBookmarked(any())
factory.getCacheDataStore().setProjectAsBookmarked(any())
cache.setProjectAsBookmarked(any())
private fun stubBookmarkProject(completable: Completable) { whenever(factory.getCacheDataStore().setProjectAsBookmarked(any())).thenReturn(completable) }
unbookmarkProjectCompletes
Same
The text was updated successfully, but these errors were encountered:
@chetdeva You can also do this
private fun stubBookmarkProject(completable: Completable) { whenever(store.setProjectAsBookmarked(any())) .thenReturn(completable) } private fun stubUnBookmarkProject(completable: Completable) { whenever(store.setProjectAsUnbookmarked(any())) .thenReturn(completable) }
Because stubbing for data stores are already handled in these methods
private fun stubFactoryGetDataStore() { whenever(factory.getDataStore(any(), any())) .thenReturn(store) } private fun stubFactoryGetCacheDataStore() { whenever(factory.getCacheDataStore()) .thenReturn(store) }
Sorry, something went wrong.
No branches or pull requests
GithubTrending/Data/src/test/java/co/joebirch/data/ProjectsDataRepositoryTest.kt
Line 96 in 02ae6cd
Issue: 2 tests were failing
bookmarkProjectCompletes
You should be using
factory.getCacheDataStore().setProjectAsBookmarked(any())
instead ofcache.setProjectAsBookmarked(any())
unbookmarkProjectCompletes
Same
The text was updated successfully, but these errors were encountered: