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

Add Unit and integration Tests for PatientIdentityType . #922

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

valens200
Copy link

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

@valens200
Copy link
Author

@sherrif10 , @mherman22 can review this?

Copy link
Contributor

@mherman22 mherman22 left a 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

src/test/java/org/openelisglobal/ReferenceTablesTest.java Outdated Show resolved Hide resolved
Copy link
Contributor

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?

Copy link
Author

@valens200 valens200 Mar 28, 2024

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.

Copy link
Contributor

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?

Copy link
Author

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.

@valens200 valens200 changed the base branch from develop_3x to develop April 23, 2024 05:37
Copy link

github-actions bot commented May 8, 2024

👋 Hi, @valens200,
Conflicts have been detected against the base branch. Please rebase your branch against the base branch.


This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there.

@github-actions github-actions bot added the merge conflict Merge Conflicts label May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge conflict Merge Conflicts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants