We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Based off this tweet: https://twitter.com/pacoworks/status/1098377239786221568
fun <T> testSideEffect(f: TestObserver<T>.((T)-> Unit) -> Unit): Unit { val obs = TestObserver<T>() val sub = PublishSubject.create<T>().apply { subscribe(obs) } f(obs) { sub.onNext(it) } } fun main() { testSideEffect<Int> { consumer -> Observable.just(1).doOnNext { consumer(it) }.subscribe() assertValueCount(1) assertValues(10) } }
The text was updated successfully, but these errors were encountered:
It's just a general idea. It could be polished to avoid gotchas such as awaitTerminalEvent() never returning.
awaitTerminalEvent()
Sorry, something went wrong.
No branches or pull requests
Based off this tweet: https://twitter.com/pacoworks/status/1098377239786221568
The text was updated successfully, but these errors were encountered: