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

[Code health] Migrate remaining business logic from SurveyRepository to a domain use case #3023

Merged
merged 7 commits into from
Jan 30, 2025

Conversation

shobhitagarwal1612
Copy link
Member

Fixes #3014

Split SurveyRepository and create a new use case for removing offline survey

@anandwana001 PTAL?

@auto-assign auto-assign bot requested a review from anandwana001 January 29, 2025 09:58
Copy link

codecov bot commented Jan 29, 2025

Codecov Report

Attention: Patch coverage is 95.23810% with 1 line in your changes missing coverage. Please review.

Project coverage is 63.61%. Comparing base (c2ff777) to head (8918cad).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...ogle/android/ground/repository/SurveyRepository.kt 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3023      +/-   ##
============================================
+ Coverage     63.58%   63.61%   +0.03%     
- Complexity     1270     1272       +2     
============================================
  Files           270      271       +1     
  Lines          6572     6572              
  Branches        930      930              
============================================
+ Hits           4179     4181       +2     
  Misses         1789     1789              
+ Partials        604      602       -2     
Files with missing lines Coverage Δ
...in/java/com/google/android/ground/MainViewModel.kt 82.35% <100.00%> (ø)
...ain/usecases/survey/ReactivateLastSurveyUseCase.kt 100.00% <100.00%> (ø)
...main/usecases/survey/RemoveOfflineSurveyUseCase.kt 100.00% <100.00%> (ø)
...round/ui/surveyselector/SurveySelectorViewModel.kt 86.53% <100.00%> (ø)
...ogle/android/ground/repository/SurveyRepository.kt 88.88% <66.66%> (+3.17%) ⬆️

* Add test to check that no exception is thrown when removing a non-existent local survey
* Remove redundant assertion in existing test case
@shobhitagarwal1612 shobhitagarwal1612 merged commit 1f021ac into master Jan 30, 2025
5 checks passed
@shobhitagarwal1612 shobhitagarwal1612 deleted the ashobhit/3014/survey-repo-cleanup branch January 30, 2025 03:18
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.

[Code health] Consider refactoring SurveyRepository
2 participants