-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Fix UseCaseTest #139
base: master
Are you sure you want to change the base?
Fix UseCaseTest #139
Conversation
@jordifierro same thing with |
Thanks @amatkivskiy, you are right! |
@jordifierro and I think we need to rethink the way the UseCase is tested. |
What do you mean @amatkivskiy? |
@jordifierro I meant that your approach with I am telling this because while implementing #140 I need to write tests for it. |
Sorry @amatkivskiy, I asked because I thought you wanted to change the way of testing And about your pull request, feel free to use the same approach used here if you don't want to wait for this pull request, no problem for me! |
@jordifierro Recently I've faced the problem that |
Thanks for commenting @amatkivskiy! I've faced a similar problem when testing my repositories against a However, in my opinion, the goal of this test is to check that the |
@jordifierro my point is that people will see this tests and will try to apply the same approach in their tests and it will fail because it works only for this situation (I mean testing base UseCase when result is return immediately). |
Considering the nature of this specific project, you are right @amatkivskiy. I will work on this. |
@jordifierro Thanks) |
After all, the update hasn't made the test more complex nor larger (which I didn't want) so it's fine. The @amatkivskiy Thanks to you for your help! |
The
testBuildUseCaseObservableReturnCorrectResult
test fromUseCaseTest
is not testing correctly the execute method from theUseCase
class. It's not a crucial test but it's a good example of how to test RxJava subscriptions.