Skip to content
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

Matcher for TestSubscriber.assertError() #4498

Closed
dkhmelenko opened this issue Sep 7, 2016 · 2 comments
Closed

Matcher for TestSubscriber.assertError() #4498

dkhmelenko opened this issue Sep 7, 2016 · 2 comments
Milestone

Comments

@dkhmelenko
Copy link

In order to test occurred error in subscriber we are using TestSubscriber.assertError(). However, the method accepts either Throwable or class. So if we want to check the details of the thrown exception, we need to have methods equals() and hashCode() in each exception. But it's a bad practice.

Does it make sense to have a matcher for checking thrown exception and it?

@akarnokd
Copy link
Member

akarnokd commented Sep 7, 2016

Not sure what you mean or how you imagine it, but PR is welcome.

akarnokd pushed a commit that referenced this issue Sep 23, 2016
…erver (#4586)

* Add error assertion with predicate (#4498)

* Add error assertion with predicate to TestObserver (#4498)
@akarnokd akarnokd added this to the 2.0 RC4 milestone Oct 25, 2016
@akarnokd
Copy link
Member

Closing via #4586.

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