Last active
October 6, 2019 16:08
-
-
Save talosdev/c4d4a87004d05dc412254f58511b7131 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Test | |
| fun `observable to single with firstOrError`() { | |
| val observable = Observable.fromIterable<Int>((1..5).toList()) | |
| .doOnNext { println("Source observable emitting $it") } | |
| val single = observable.firstOrError() | |
| .doOnSuccess { println("Single succeeded with value: $it") } | |
| val testObserver = single.test().await() | |
| testObserver.apply { | |
| assertComplete() | |
| assertValue(1) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment