Uh oh!
There was an error while loading. Please reload this page.
Add unit tests for builders #543 - #734
Conversation
There was a problem hiding this comment.
It's a good question, should we test private methods or not, I suggest to use reflection or change the visibility of a few methods to the package-private or internal and test private methods without mockito but after moving from Soot to JCDB
If you wish, you could play with changing visibility at this PR for 1-2 method for the SimpleNameBuilder
Please add a few tests if possible, fix the broken test and fix the issue with the mockito verision
Uh oh!
There was an error while loading. Please reload this page.
| } | ||
| @Test | ||
| fun `throws throwable if execution result is null`() { |
There was a problem hiding this comment.
This test fails on my side with
expected: <<pre>
Test throws Throwable </pre>> but was: < >
There was a problem hiding this comment.
i didn't expect these two builders have different behavior, but now we know. I fixed test
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
amandelpie
commented
Aug 18, 2022
@onewhl LGTM for me |
Description
Added unit tests for SimpleNameBuilder, SimpleCommentBuilder, SimpleClusterCommentBuilder.
Unfortunately, most of the methods are private and kotlin properties not always could be mocked, so the number of tests is small.
Fixes#543
Type of Change
Please delete options that are not relevant.
How Has This Been Tested?
Automated Testing
Run tests in PR.
Checklist (remove irrelevant options):
This is the author self-check list