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
Support for rx.Single #573
Support for rx.Single #573
Conversation
contentResolver.insert(TestItem.CONTENT_URI, testItemToInsert.toContentValues()); | ||
|
||
Cursor firstDbState = contentResolver.query(TestItem.CONTENT_URI, null, null, null, null); | ||
Assertions.assertThat(firstDbState).hasCount(1); |
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.
With static import it will be more concisely =) Here and below in tests
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.
In this file, there are two kinds of assertThat
: from org.assertj.android.api
and org.assertj.core.api
. So static import can't be used for both of them.
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.
Yeah, that api design problems, why it's not androidAssertThat()
…
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.
🐼
Wow such huge PR! 👍 |
@@ -37,4 +38,14 @@ | |||
@NonNull | |||
@CheckResult | |||
Observable<Result> createObservable(); | |||
|
|||
/** | |||
* Creates {@link rx.Single} that emits result of Operation. |
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.
Can you please change to that emits result of Operation lazily when somebody subscribes to it
@@ -81,6 +83,15 @@ public DeleteResult executeAsBlocking() { | |||
.subscribeOn(Schedulers.io()); | |||
} | |||
|
|||
@NonNull | |||
@Override | |||
public Single<DeleteResult> asRxSingle() { |
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.
@CheckResult
LGTM |
Squashed and updated |
Phew… |
Support for rx.Single
Dat thing was HUGE! Thanks a lot, @geralt-encore! Please make smaller PRs :D |
@artem-zinnatullin Sure, but I kinda have no choice. I wanted to cover it with tests as much as possible and didn't want to do it halfway, because, probably I wouldn't come back to it otherwise. |
Yeah, I understand your points, anyway, great work! |
#529
#452