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
Change issue 1945 test to paramaterized #3739
Conversation
assertEquals(resultsQualifiedName.get(expr.toString()), qName); | ||
assertEquals(resultsResolvedType.get(expr.toString()), resolvedType); | ||
} | ||
private static List<MethodCallExpr> parsedCodeMethodCalls() { |
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.
Why are you declaring this method static?
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.
It is our understanding that the factory method that provides inputs to a test must be declared static as per the JUnit documentation.
} | ||
|
||
@ParameterizedTest | ||
@MethodSource("parsedCodeMethodCalls") | ||
void test(MethodCallExpr expr) { |
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.
Indeed this test method is a little less complex in this case.
Codecov Report
@@ Coverage Diff @@
## master #3739 +/- ##
===============================================
- Coverage 57.326% 57.299% -0.028%
- Complexity 2680 5435 +2755
===============================================
Files 635 635
Lines 33576 33557 -19
Branches 5791 5785 -6
===============================================
- Hits 19248 19228 -20
- Misses 12274 12276 +2
+ Partials 2054 2053 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Thank you for this contribution. |
Hello, I have worked with @TheJosephCCox to address the code smell concern raised in #3668. Please let us know what you think of this change. Thank you.