Slide 6
Slide 6 text
@Test fun `should handle error when caught from proper networking exception`() {
using {
burst {
values(UnknownHostException("No Internet"), HostUnreachable)
values(ConnectException(), HostUnreachable)
values(SocketTimeoutException(), OperationTimeout)
values(NoRouteToHostException(), HostUnreachable)
values(IOException("Canceled"), ConnectionSpike)
}
thenWith { incoming, expected !"
val execution = Observable.error(incoming)
assertHandling(execution, expected)
}
}
}