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 Category #1023

Merged
merged 1 commit into from
Jan 4, 2018

Conversation

psh
Copy link
Collaborator

@psh psh commented Dec 20, 2017

The goal of this PR is to simplify Category and get decent tests around its database interactions, particularly the database migrations from version-to-version.

To that end

  • Database interactions were extracted into a CategoryDao
  • Tests were added
  • Classes that formerly called save(), find() and recentCategories() on Category were updated to use a data access object

@codecov-io
Copy link

codecov-io commented Dec 20, 2017

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #1023      +/-   ##
=========================================
- Coverage     3.7%    3.7%   -0.01%     
=========================================
  Files         105     106       +1     
  Lines        5160    5162       +2     
  Branches      485     485              
=========================================
  Hits          191     191              
- Misses       4956    4958       +2     
  Partials       13      13
Impacted Files Coverage Δ
.../nrw/commons/category/CategoryContentProvider.java 13.79% <ø> (ø) ⬆️
...e/nrw/commons/category/CategorizationFragment.java 0% <0%> (ø) ⬆️
...c/main/java/fr/free/nrw/commons/data/Category.java 0% <0%> (ø) ⬆️
...ain/java/fr/free/nrw/commons/data/CategoryDao.java 0% <0%> (ø)
...n/java/fr/free/nrw/commons/CommonsApplication.java 27.65% <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 d96acd8...1ba8e93. Read the comment docs.

@neslihanturan
Copy link
Collaborator

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

@neslihanturan
Copy link
Collaborator

Thanks @psh !

@neslihanturan neslihanturan merged commit ae24508 into commons-app:master Jan 4, 2018
@psh psh deleted the extract-and-test-category-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