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
Add Unit and integration Tests for PatientIdentityType . #922
base: develop
Are you sure you want to change the base?
Conversation
@sherrif10 , @mherman22 can review this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few comments here @valens200
.../org/openelisglobal/integrationTests/patientIdentityType/PatientIdentityTypeServiceTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason why you didn't handle other methods of the patientidentityTypeService layer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes @mherman22, I am also working on other methods to level up the coverage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whats the difference between this class and the PatientIdentityTypeServiceTest you already created for the integration tests? beginning with their naming?
and why mock anything if in unit tests were essentially testing pieces of code in isolation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @mherman22, regarding the difference between these classes, I think for the unit test there is no need to repeat the unit test in naming like this PatientIdentityServiceTypeUnitTest
because we know it's already under unit tests
package. So, those classes differ based on the packages they are located in.
However, If OpenELIS naming convention rules prefer naming conventions like this PatientIdentityServiceTypeUnitTest
, I can make sure of that changes too.
👋 Hi, @valens200, This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there. |
Summary
This pull request introduces unit and integration tests for the PatientIdentity type service.
Mockito was used to mock external dependencies when executing unit tests focusing on the service’s functionality. The DAO functionalities are included during integration tests.
Related Issue: Add Unit and integration Tests for PatientIdentityType