openid / OpenYOLO-Android

Android protocol for credential exchange and update - "You Only Login Once"
http://openid.net/wg/ac/
Apache License 2.0
115 stars 18 forks source link

Refactor additional properties utility methods #122

Closed iainmcgin closed 7 years ago

iainmcgin commented 7 years ago

The previous changes made were introducing too much duplicate code, increasing the likelihood of inconsistent future modifications and bugs. This change refactors the implementations into the utils class, and uses parameterized unit tests to check that all implementations are consistent, without affecting the convenience of the API.

This finishes the implementation of #99.

codecov-io commented 7 years ago

Codecov Report

Merging #122 into master will increase coverage by 0.46%. The diff coverage is 97.53%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #122      +/-   ##
============================================
+ Coverage     70.65%   71.11%   +0.46%     
- Complexity      469      480      +11     
============================================
  Files            65       65              
  Lines          2675     2690      +15     
  Branches        255      246       -9     
============================================
+ Hits           1890     1913      +23     
+ Misses          705      701       -4     
+ Partials         80       76       -4
Impacted Files Coverage Δ Complexity Δ
...a/org/openyolo/protocol/CredentialSaveRequest.java 86.88% <100%> (+1.43%) 11 <3> (+2) :arrow_up:
...rotocol/java/org/openyolo/protocol/Credential.java 92.3% <100%> (+1.39%) 20 <3> (-1) :arrow_down:
...org/openyolo/protocol/CredentialDeleteRequest.java 93.47% <100%> (+3.09%) 9 <3> (-1) :arrow_down:
...rg/openyolo/protocol/CredentialRetrieveResult.java 91.66% <100%> (+1.92%) 12 <3> (-1) :arrow_down:
...g/openyolo/protocol/CredentialRetrieveRequest.java 78.89% <100%> (+0.63%) 14 <3> (-1) :arrow_down:
protocol/java/org/openyolo/protocol/Hint.java 92.37% <100%> (+0.4%) 21 <3> (+2) :arrow_up:
...java/org/openyolo/protocol/HintRetrieveResult.java 90% <100%> (+0.93%) 11 <3> (+2) :arrow_up:
...ava/org/openyolo/protocol/HintRetrieveRequest.java 92.38% <100%> (+0.46%) 14 <3> (+2) :arrow_up:
.../org/openyolo/protocol/CredentialDeleteResult.java 98.43% <100%> (+2.72%) 11 <3> (-1) :arrow_down:
...va/org/openyolo/protocol/CredentialSaveResult.java 91.93% <100%> (+0.86%) 10 <3> (+2) :arrow_up:
... and 1 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 7b7ef9f...8ba1963. Read the comment docs.

iainmcgin commented 7 years ago

Proposed changes made.

iainmcgin commented 7 years ago

To unblock David in cutting a 0.2.1 release, I'll go ahead and merge this. @StanKocken we're past the two day review period, if you have any comments please do still submit them and I'll fix in follow-up.