Skip to content

test: add null guard test for purgePatient with null input#6004

Open
CodeWithJatinSh wants to merge 1 commit intoopenmrs:masterfrom
CodeWithJatinSh:patch-3
Open

test: add null guard test for purgePatient with null input#6004
CodeWithJatinSh wants to merge 1 commit intoopenmrs:masterfrom
CodeWithJatinSh:patch-3

Conversation

@CodeWithJatinSh
Copy link
Copy Markdown

Added a unit test to verify that purgePatient() throws IllegalArgumentException when null is passed. This test documents and protects the null guard behavior added in the related fix PR #5992.

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown

@Kanishka680 Kanishka680 left a comment

Choose a reason for hiding this comment

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

Simple and effective fix. Adding null guards to maintenance methods like purgePatient is a great safety measure.

@stefanachiorean
Copy link
Copy Markdown

Good addition of a null guard test. It would be helpful to also consider adding a test case that verifies the behavior when a partially null input is provided, to ensure edge cases are covered.

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