jmprathab / MyHome

A Java application which helps people to manage their apartment.
Apache License 2.0
93 stars 107 forks source link

Issue #243: add unit tests for AuthenticationController, AuthenticationSDJpaService, UserSDJpaService (method findUserByEmail) #251

Closed hsergiu closed 3 years ago

hsergiu commented 3 years ago

πŸš€ Description

Created multiple tests for each method. Only a single one for login() in AuthenticationController.

πŸ“„ Motivation and Context

Closes: #243

πŸ“¦ Types of changes

βœ… Checklist

codecov[bot] commented 3 years ago

Codecov Report

Merging #251 (b7adca1) into master (f7ec6a4) will increase coverage by 5.07%. The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #251      +/-   ##
============================================
+ Coverage     68.28%   73.36%   +5.07%     
- Complexity      200      217      +17     
============================================
  Files            34       34              
  Lines           864      871       +7     
  Branches         41       41              
============================================
+ Hits            590      639      +49     
+ Misses          266      224      -42     
  Partials          8        8              
Impacted Files Coverage Ξ” Complexity Ξ”
...ices/springdatajpa/AuthenticationSDJpaService.java 100.00% <100.00%> (+100.00%) 7.00 <1.00> (+7.00)
...yhome/services/springdatajpa/UserSDJpaService.java 86.90% <0.00%> (+9.52%) 29.00% <0.00%> (+2.00%)
...m/myhome/controllers/AuthenticationController.java 100.00% <0.00%> (+100.00%) 2.00% <0.00%> (+2.00%)
.../controllers/exceptions/UserNotFoundException.java 100.00% <0.00%> (+100.00%) 2.00% <0.00%> (+2.00%)
...ontrollers/exceptions/AuthenticationException.java 100.00% <0.00%> (+100.00%) 2.00% <0.00%> (+2.00%)
...lers/exceptions/CredentialsIncorrectException.java 100.00% <0.00%> (+100.00%) 2.00% <0.00%> (+2.00%)

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 f7ec6a4...b7adca1. Read the comment docs.

mslowiak commented 3 years ago

@hsergiu Just one more comment about this PR and we can proceed with merge :)

hsergiu commented 3 years ago

Thank you for the review. I made the changes.