This repository has been archived by the owner on Feb 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This allows to use all of Mockito's powerfull mocking and verifying logic for non Observable related methods. This allows the use of non Interface repos for the mocks.
@@ -6,14 +6,12 @@ Easy Espresso UI testing for Android applications using RxJava. | |||
|
|||
RxPresso makes testing your presentation layer using RxJava as easy as a Unit test. | |||
|
|||
RxPresso uses [RxMocks](https://github.com/novoda/rxmocks) to generate mocks of your repositories that you can use with RxPresso to control data in your Espresso tests. | |||
RxPresso uses [Mockito](http://mockito.org/) to generate mocks of your repositories that you can use with RxPresso to control data in your Espresso 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.
RIP RxMocks
private final Observable<T> observable; | ||
private final RxMocks repo; |
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.
this isn't the repo anymore?
|
||
public class RxMocksTest { | ||
|
||
private TestRepository baseRepo; |
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.
mockTestRepository
?
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This changes the mock backend from RxMocks to Mockito.
The logic present in RxMocks to deal with event syncronisation has been ported to this repo under the class RxMocks.
This change allows us to mock non Interface repositories. It also allows us to use
verify
logic on the mocked repo to do some UI unit testing on cases where UI modifies data through the repository.The usage hasn't changed much, mainly the mocks are now created using mockito and RxPresso is now created through an
init
method.Closes #2