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

Method name is inconsistent with the method behavior #4657

Closed
epeartree opened this issue Mar 17, 2023 · 0 comments · Fixed by #4659
Closed

Method name is inconsistent with the method behavior #4657

epeartree opened this issue Mar 17, 2023 · 0 comments · Fixed by #4659
Assignees

Comments

@epeartree
Copy link
Collaborator

epeartree commented Mar 17, 2023

Calling method getMessageKeyOrNull() from class ResourceModifiedMessage and ResourceDeliveryMessage will return a value (payloadId) although method setMessageKey() was never called on the object.

How to reproduce:

@Test
void test_getMessageKeyOrNull_whenSetMessageKeyIsNotInvoked_willReturnNull(){
		IBaseResource patient = buildPatient();
		ResourceModifiedMessage payload = new ResourceModifiedMessage(ourFhirContext, patient, 
                BaseResourceMessage.OperationTypeEnum.CREATE);
		assertNull(payload.getMessageKeyOrNull());                 // this fails.

}
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 a pull request may close this issue.

1 participant