Skip to content
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

Extracted and tested the database interactions from ModifierSequence #1022

Merged

Conversation

psh
Copy link
Collaborator

@psh psh commented Dec 20, 2017

The goal of this PR is to simplify ModifierSequence and get decent tests around its database interactions.

To that end

  • Database interactions were extracted into a ModifierSequenceDao
  • Tests were added
  • Classes that formerly called save() and delete() on ModifierSequence were updated to use a data access object
  • Out of date comment in DBOpenHelper (reflecting pre-Dagger usage) was updated.

@codecov-io
Copy link

codecov-io commented Dec 20, 2017

Codecov Report

Merging #1022 into master will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #1022      +/-   ##
=========================================
- Coverage     3.7%   3.69%   -0.01%     
=========================================
  Files         106     107       +1     
  Lines        5162    5166       +4     
  Branches      485     485              
=========================================
  Hits          191     191              
- Misses       4958    4962       +4     
  Partials       13      13
Impacted Files Coverage Δ
...ns/modifications/ModificationsContentProvider.java 12.5% <0%> (ø) ⬆️
...ee/nrw/commons/modifications/ModifierSequence.java 0% <0%> (ø) ⬆️
...nrw/commons/modifications/ModifierSequenceDao.java 0% <0%> (ø)
...java/fr/free/nrw/commons/upload/ShareActivity.java 0% <0%> (ø) ⬆️
...n/java/fr/free/nrw/commons/CommonsApplication.java 27.65% <0%> (ø) ⬆️
...free/nrw/commons/upload/MultipleShareActivity.java 0% <0%> (ø) ⬆️
...ommons/modifications/ModificationsSyncAdapter.java 0% <0%> (ø) ⬆️
...in/java/fr/free/nrw/commons/data/DBOpenHelper.java 20% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ae24508...08673c9. Read the comment docs.

@neslihanturan
Copy link
Collaborator

Hi @psh , can you please solve the conflicts, so that I can merge them. Thanks!

@psh
Copy link
Collaborator Author

psh commented Jan 4, 2018

There's a chance that merging the CategoryDao work will also conflict with this branch, so I'll wait until #1023 has merged before resolving the conflicts as it will save us doing things twice.

EDIT - conflicts resolved now that #1023 has been merged.

@psh psh force-pushed the extract-and-test-modifier-sequence-db branch from aab5012 to 08673c9 Compare January 4, 2018 19:30
@commons-app commons-app deleted a comment Jan 4, 2018
@neslihanturan
Copy link
Collaborator

Thanks @psh :)

@neslihanturan neslihanturan merged commit feb4353 into commons-app:master Jan 5, 2018
@psh psh deleted the extract-and-test-modifier-sequence-db branch January 13, 2018 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants