-
Notifications
You must be signed in to change notification settings - Fork 9
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
Implementation to send the FHIR result to RS Waters endpoint #859
Conversation
…d send method for results
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.
Making sweet sweet progress!
@@ -0,0 +1,78 @@ | |||
package gov.hhs.cdc.trustedintermediary.external.reportstream; |
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.
I like that we're using a helper class instead of inheritance.
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.
Cool, we're also using a helper class as well in our other PR for the Order/Result Conversion use cases.
ReportStreamSenderHelper.getInstance().sendToReportStream(_ as String, _ as String, _ as String) | ||
|
||
then: | ||
noExceptionThrown() |
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.
No need for noExceptionThrown()
if you have another assertion. Spock doesn't allow empty then:
statements, so noExceptionThrown()
is only needed when it would be the only assertion. No exceptions are allowed to be thrown even if we don't explicitly include the noExceptionThrown()
assertion.
|
||
then: | ||
noExceptionThrown() | ||
1 * ReportStreamSenderHelper.getInstance().metadata.put(_, EtorMetadataStep.SENT_TO_REPORT_STREAM) |
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.
Shouldn't we assert more than just that we registered an internal metadata step? It looks like our old test didn't assert anything other than no exception was thrown, but yeah, I think we should at least assert that our RS client was called once.
E.g. something like
1 * mockRsClient.requestWatersEndpoint(_ as String, _ as String)
.
Quality Gate passedIssues Measures |
Implementation to send the FHIR result to RS Waters endpoint
ReportStreamResultSender.send
to call RS water APIReportStreamOrderSender
andReportStreamResultSender
into helper class:ReportStreamSenderHelper
Issue
#616
Checklist