Skip to content

3.x: Alternative for assertValueSet #6991

New issue

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

Closed
Steppschuh opened this issue May 20, 2020 · 1 comment
Closed

3.x: Alternative for assertValueSet #6991

Steppschuh opened this issue May 20, 2020 · 1 comment

Comments

@Steppschuh
Copy link

While upgrading a large codebase from RxJava2 to RxJava3, I stumbled upon the fact that assertValueSet has been removed from the test consumer. Unfortunately I missed the usage survey in #6153.

Is there any recommended way to assert that a given stream emits expected items in any order?

Here's an example diff for my current workaround while migrating:
Screenshot 2020-05-19 at 14 20 34

PS: I was happy that the migration was very smooth overall, especially because of the detailed documentation. Highly appreciate your efforts!

@akarnokd
Copy link
Member

Those methods were turned into internal static methods on a helper class:

https://github.com/ReactiveX/RxJava/blob/3.x/src/test/java/io/reactivex/rxjava3/testsupport/TestHelper.java#L3457-L3477

You can do that or define your own TestSubscriber subclass with extra fluent assertions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants