Skip to content

Instantly share code, notes, and snippets.

@talosdev
Created October 6, 2019 17:19
Show Gist options
  • Save talosdev/dea47ac621913e3d44f169c018dc313c to your computer and use it in GitHub Desktop.
Save talosdev/dea47ac621913e3d44f169c018dc313c to your computer and use it in GitHub Desktop.

Revisions

  1. talosdev created this gist Oct 6, 2019.
    8 changes: 8 additions & 0 deletions ObservableToSingle_firstOrError_error1.kt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    @Test
    fun `observable that throws error to single with firstOrError`() {
    val observable = Observable.error<Int>(RuntimeException("Exception while emitting Ints"))

    assertObservableToSingle(observable, { firstOrError() } ) {
    assertError(java.lang.RuntimeException::class.java)
    }
    }