Skip to content

Instantly share code, notes, and snippets.

@vincent-paing
Created August 21, 2019 09:06
Show Gist options
  • Save vincent-paing/6cebc2d8f2e054ed721d63a93fcb349a to your computer and use it in GitHub Desktop.
Save vincent-paing/6cebc2d8f2e054ed721d63a93fcb349a to your computer and use it in GitHub Desktop.
fakeMovieList.forEachIndexed { index, movie ->
//Scroll to Position
onView(withId(R.id.rvMovie)).perform(
RecyclerViewActions.scrollToPosition<RecyclerView.ViewHolder>(
index
)
)
if (imageLoader is FakeImageLoader) {
val fakeImageLoader = imageLoader as FakeImageLoader
val requestList = fakeImageLoader.requestList
val request = requestList[index]
val url = request.data as String
Assert.assertEquals(movie.posterPath, url)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment