Skip to content

Instantly share code, notes, and snippets.

@vincent-paing
Created August 21, 2019 10:00
Show Gist options
  • Save vincent-paing/47e3afddb5fd4d51c71ffea218b1ba6f to your computer and use it in GitHub Desktop.
Save vincent-paing/47e3afddb5fd4d51c71ffea218b1ba6f to your computer and use it in GitHub Desktop.
fakeMovieList.forEachIndexed { index, movie ->
//Scroll to position to force onBind
onView(withId(R.id.rvMovie)).perform(
RecyclerViewActions.scrollToPosition<RecyclerView.ViewHolder>(
index
)
)
if (imageLoader is FakeImageLoader) {
val fakeImageLoader = imageLoader as FakeImageLoader
verify(fakeImageLoader.load(any(), movie.posterPath, any()), atLeastOnce())
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment