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

Backend Refactor #895

Merged
merged 19 commits into from
Jan 4, 2021
Merged

Backend Refactor #895

merged 19 commits into from
Jan 4, 2021

Conversation

johnthagen
Copy link
Collaborator

@johnthagen johnthagen commented Jan 3, 2021

Closes #882

Follow on to #892

Cleanup:

  • Force all Backend.Tests compile warnings into errors
  • Fix WordRepository.GetWord and WordService.Delete type signatures to properly return null on failure
    • Includes fixing the type signatures and implementations of Mocks to correctly handle missing entries
  • Fix implementation and signature of UserEditRepository.GetUserEdit & UserEditApiServices to properly handle missing IDs
  • Fix type signature and implementation of UserController.Get
  • Fix UserRoleApiServices.GetUserRole to properly handle missing IDs
  • Update UserApiServices.GetUserAvatar to properly handle missing user IDs
  • Remove redundant parentheses
  • Fix typos
  • Remove unused variables
  • Remove null checks proven by the compiler to not be possible
  • Make all custom Exceptions Serializable
  • Use Assert.IsInstanceOf<>() to simplify tests

This change is Reviewable

@johnthagen johnthagen added backend refactor maintenance Issue that makes it difficult to maintain the software or to upgrade installations post-release. labels Jan 3, 2021
@johnthagen johnthagen self-assigned this Jan 3, 2021
@codecov-io
Copy link

codecov-io commented Jan 3, 2021

Codecov Report

Merging #895 (88c6f24) into master (aa6cfa2) will decrease coverage by 0.15%.
The diff coverage is 29.54%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #895      +/-   ##
==========================================
- Coverage   50.91%   50.76%   -0.16%     
==========================================
  Files         241      241              
  Lines        6597     6631      +34     
  Branches      423      423              
==========================================
+ Hits         3359     3366       +7     
- Misses       2922     2949      +27     
  Partials      316      316              
Flag Coverage Δ
backend 55.89% <29.54%> (-0.37%) ⬇️
frontend 45.57% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
Backend.Tests/Helper/Sanitization.cs 100.00% <ø> (ø)
Backend/Controllers/WordController.cs 53.39% <ø> (+3.39%) ⬆️
Backend/Helper/FileStorage.cs 89.04% <ø> (ø)
Backend/Services/LiftApiServices.cs 93.34% <ø> (ø)
Backend/Services/PermissionService.cs 0.00% <0.00%> (ø)
Backend/Services/UserApiServices.cs 0.00% <0.00%> (ø)
Backend/Services/UserEditRepository.cs 0.00% <0.00%> (ø)
Backend/Services/UserRoleApiServices.cs 0.00% <0.00%> (ø)
Backend/Services/WordRepository.cs 20.63% <0.00%> (-1.40%) ⬇️
Backend/Startup.cs 0.00% <ø> (ø)
... and 11 more

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 aa6cfa2...88c6f24. Read the comment docs.

@johnthagen johnthagen marked this pull request as ready for review January 3, 2021 21:08
Copy link
Collaborator

@imnasnainaec imnasnainaec left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 3 files at r1, 36 of 36 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@johnthagen johnthagen merged commit 152cec4 into master Jan 4, 2021
@johnthagen johnthagen deleted the backend-refactor-II branch January 4, 2021 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend maintenance Issue that makes it difficult to maintain the software or to upgrade installations post-release. refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Evaluate all usages of Task.Result and nullness
3 participants