arekolek
04/24/2018, 2:35 PM@Test
fun `error not implemented should fail`() {
val errors = trackPluginErrors()
Completable.error(Throwable()).subscribe()
assertThat(errors).isEmpty()
}
private fun trackPluginErrors(): List<Throwable> {
val list = Collections.synchronizedList(ArrayList<Throwable>())
RxJavaPlugins.setErrorHandler { list += it }
return list
}