-
Notifications
You must be signed in to change notification settings - Fork 64
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
RAD-382 Create RadiologyReportServiceTest #504
Conversation
@manuela-grindei, thanks for your PR! By analyzing the history of the files in this pull request, we identified @teleivo, @durac and @bgeVam to be potential reviewers. |
@teleivo do you think this is fit to merge? |
@ivange94 do you think you can review this? :) |
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.
@manuela-grindei looks like you missed this https://github.com/openmrs/openmrs-module-radiology/blob/master/api/src/test/java/org/openmrs/module/radiology/report/RadiologyReportServiceComponentTest.java#L478-L498.
Aside from that, @dkayiwa this is good to go.
That was suppose to be a comment instead of suggestion of changes. :D |
@ivange94 Hello, thank you for reviewing this! |
@manuela-grindei yes you are right. Just forget about my previous comment(I deleted it). Just stepped through the code and the saveRadiologyReport does not actually do the validation. I think this is a testing behavior vs testing implementation problem. To my knowledge we test for behavior, thats why we use mocks and in this case what that test is doing is testing how that method will behave when an invalid report is passed. Its not testing who is actually doing the validation(which I think is testing the implementation). So I still think you should extract that test method out of the integration test. @dkayiwa what do you think? |
@teleivo now that you are back, do you think we can merge this? :) |
@teleivo should i help you merge this? :) |
/** | ||
* Tests {@link RadiologyReportService} | ||
*/ | ||
@RunWith(MockitoJUnitRunner.class) |
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.
@manuela-grindei this is not needed. was there a reason you added it?
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.
Good point, removed it!
08560e4
to
8665885
Compare
@teleivo what do you think of this? 😊 |
@manuela-grindei thank you very much and sorry for taking so long! 😉 @dkayiwa |
Description
Created unit tests for RadiologyReportServiceTest and removed unnecessary integration tests.
Related Issue
see https://issues.openmrs.org/browse/RAD-382
Checklist:
git pull --rebase upstream master
.mvn clean package
right before creating this pull request andadded all formatting changes to my commit.