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

FM2-448: Add Unit Test for Servlets in SMART-on-FHIR #24

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

theanandankit
Copy link
Contributor

@codecov-commenter
Copy link

codecov-commenter commented Jan 4, 2022

Codecov Report

Merging #24 (b22de3c) into master (26ddf79) will increase coverage by 19.94%.
The diff coverage is 87.50%.

Impacted file tree graph

@@              Coverage Diff              @@
##             master      #24       +/-   ##
=============================================
+ Coverage      8.03%   27.98%   +19.94%     
- Complexity       11       38       +27     
=============================================
  Files            24       24               
  Lines           498      504        +6     
  Branches         68       70        +2     
=============================================
+ Hits             40      141      +101     
+ Misses          457      351      -106     
- Partials          1       12       +11     
Impacted Files Coverage Δ
...tonfhir/web/servlet/SmartLaunchOptionSelected.java 74.14% <80.00%> (+74.14%) ⬆️
...smartonfhir/web/servlet/SmartEhrLaunchServlet.java 87.50% <100.00%> (+87.50%) ⬆️
.../module/smartonfhir/util/SmartSecretKeyHolder.java 8.82% <0.00%> (+8.82%) ⬆️
...mrs/module/smartonfhir/util/SmartSessionCache.java 58.33% <0.00%> (+58.33%) ⬆️
...artonfhir/web/servlet/SmartAppSelectorServlet.java 62.50% <0.00%> (+62.50%) ⬆️
...openmrs/module/smartonfhir/model/SmartSession.java 66.67% <0.00%> (+66.67%) ⬆️
...artonfhir/web/servlet/SmartAccessConfirmation.java 71.43% <0.00%> (+71.43%) ⬆️

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 26ddf79...b22de3c. Read the comment docs.

@theanandankit
Copy link
Contributor Author

@ibacher PTAL

Copy link
Member

@ibacher ibacher left a comment

Choose a reason for hiding this comment

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

@theanandankit Nice work! Some very small things to fix up. Do you think there's a way to refactor things so we're relying less on PowerMock?

@theanandankit
Copy link
Contributor Author

@ibacher I tried to rely on Powermock less, but there is someplace where we have to use PowerMock, i.e. to Mock the Static Classes, use doReturn for Static Class functions. Could you please take a look? I also made all the changes you suggested. Thanks.

@theanandankit
Copy link
Contributor Author

@ibacher Changed the dependency from PowerMock to Mockito. PTAL

@theanandankit
Copy link
Contributor Author

@ibacher PTAL.

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