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

TestScopeProvider + build fixes #49

Merged
merged 8 commits into from Mar 13, 2017
Merged

TestScopeProvider + build fixes #49

merged 8 commits into from Mar 13, 2017

Conversation

ZacSweers
Copy link
Collaborator

This introduces TestScopeProvider + fixes some build issues

*
* @param o the object to emit.
*/
public void emit(Object o) {
Copy link
Contributor

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough

Copy link
Collaborator Author

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() {
Copy link
Contributor

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?

Copy link
Collaborator Author

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

Copy link
Contributor

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ZacSweers
Copy link
Collaborator Author

Removed emitComplete while I was at it

@ZacSweers ZacSweers merged commit fa31acb into master Mar 13, 2017
@ZacSweers ZacSweers deleted the z/testScopeProvider branch March 13, 2017 23:05
@ZacSweers ZacSweers mentioned this pull request May 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants