Skip to content

Instantly share code, notes, and snippets.

@fo2rist
Last active November 23, 2019 04:46
Show Gist options
  • Save fo2rist/f9117293acbee78beb3965060f5be52e to your computer and use it in GitHub Desktop.
Save fo2rist/f9117293acbee78beb3965060f5be52e to your computer and use it in GitHub Desktop.
RxExceptionsHandler Sample Test
private fun waitAndFail(): Single<Nothing> {
return Single.fromCallable {
Thread.sleep(500)
throw IllegalStateException()
}
}
@Test
fun `subscription on failing function and do not expect the exception`() {
waitAndFail().subscribe()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment