-
Notifications
You must be signed in to change notification settings - Fork 0
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
[AB2D-6148] increase ab2d-fhir
code coverage
#396
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
coilysiren
changed the title
Ab2 d 6148 p3
[AB2D-6148] increase Jun 21, 2024
ab2d-fhir
code coverage
smirnovaae
approved these changes
Jun 24, 2024
Rwolfe-Nava
reviewed
Jun 24, 2024
Rwolfe-Nava
approved these changes
Jun 24, 2024
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.
Minor suggestion / question regarding assertions, but otherwise looks good to me.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🎫 Ticket
https://jira.cms.gov/browse/AB2D-6148
🛠 Changes
FhirVersion.getClassFromName
function, which is patterned off of the other methods in that file. It is a simple class that callsClass.forName(...)
and logs all exceptions.ExtensionUtils
to useFhirVersion.getClassFromName
. This means thatExtensionUtils
can get rid of a fewtry ... except
blocks that were functionally dead code. Those lines were dead code because they were callingClass.forName(...)
on static strings... so they were never going to raise an exception. Hence, it was impossible to test them in their previous form.ℹ️ Context
The goal of this PR is to increase test coverage for our code. At present
ExtensionUtils
has the lowest test coverage of all the files in this folder. Unfortunately, none of the code is "easy" to test, so I'm having to resort to code changes to get test coverage any higher.The code I added has 100% test coverage 😎 . Additionally,
FhirVersion
andExtensionUtils
now both have 100% test coverage as well.