Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Mockito based mocks #10

Merged
merged 11 commits into from
Aug 27, 2015
Merged

Mockito based mocks #10

merged 11 commits into from
Aug 27, 2015

Conversation

Dorvaryn
Copy link
Member

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

Dorvaryn added 2 commits August 25, 2015 12:19
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.
Copy link
Contributor

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;
Copy link
Contributor

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;
Copy link
Contributor

Choose a reason for hiding this comment

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

mockTestRepository?

ataulm added a commit that referenced this pull request Aug 27, 2015
@ataulm ataulm merged commit 0554d09 into master Aug 27, 2015
@ataulm ataulm deleted the mockito_based_mocks branch August 27, 2015 14:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants