Skip to content
This repository has been archived by the owner on Jan 14, 2021. It is now read-only.

[Issue-55]: Gradlew test fails #59

Merged
merged 3 commits into from
Apr 14, 2017
Merged

Conversation

athkalia
Copy link
Owner

Rewrote the robolectric tests to make sure mocks are properly injected and no network calls are performed. Using dagger mock library for that
While I was at it I also:
-Upped the gradle version
-Added Butterknife view actions
-Added constraint layout

Sakis Kaliakoudas added 3 commits April 14, 2017 12:44
Rewrote the robolectric tests to make sure mocks are properly injected and no network calls are performed. Using dagger mock library for that
While I was at it I also:
-Upped the gradle version
-Added Butterknife view actions
-Added constraint layout
Added a small description of what to look for before submitting a PR.
Fixed test crashing in CI cause of an extra space at the end of the date string
@athkalia athkalia merged commit e78fa38 into develop Apr 14, 2017
@athkalia athkalia deleted the fixes/issue-55_gradlew_test_fail branch April 14, 2017 13:13
@athkalia athkalia mentioned this pull request Apr 14, 2017

@Provides
public static MainActivityViewState providesMainActivityViewState() {

Choose a reason for hiding this comment

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

why remove static from method?

Copy link
Owner Author

Choose a reason for hiding this comment

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

I just removed them from that whole module, as now it needs to be instantiated by DaggerMock with a constructor call in MainPresenterTest.
a) I didn't check if DaggerMock works with static providers
b) I removed them for the whole module even though we only mock the presenter object for the sake of simplicity

Copy link

Choose a reason for hiding this comment

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

DaggerMock work fine with static

Copy link
Owner Author

Choose a reason for hiding this comment

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

I just tried this, it daggerMock doesn't work with static.

Choose a reason for hiding this comment

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

@athkalia Sorry, I had left only this method as non-static

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.

None yet

2 participants