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
TestScopeProvider + build fixes #49
Conversation
* | ||
* @param o the object to emit. | ||
*/ | ||
public void emit(Object o) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there ever a case where it matters what value is being emitted?
IMO there isn't a good use case for this API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/** | ||
* Emits an error event, just a simple RuntimeException. | ||
*/ | ||
public void emitError() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think both of the error APIs aren't super useful - it almost suggests that you should test a broken ScopeProvider
.
Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do cover the error case in autodispose, and error in this case doesn't necessarily imply broken. I'll remove for now though to have symmetry with the other test scope provider, can revisit if anyone asks for it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, in my mind an observable that emits only lifecycle events should never really error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also not really necessary
Removed |
This introduces
TestScopeProvider
+ fixes some build issues