Skip to content

Instantly share code, notes, and snippets.

@JoseAlcerreca
Created April 12, 2022 09:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoseAlcerreca/ea41fd7d0c593493ebee375506b00244 to your computer and use it in GitHub Desktop.
Save JoseAlcerreca/ea41fd7d0c593493ebee375506b00244 to your computer and use it in GitHub Desktop.
class MyRepo(dataSource: MyDataSource) {
suspend fun getItems() {
idlingResource.setBusy() // App is busy… test must wait.
val result = dataSource.getTasks()
idlingResource.setIdle() // App is idle, ready for next operation.
return result
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment