Issue #62: Add test coverage for FindMethodInvocationsAnalysis and FindMethodDeclarationsAnalysis
Hi, along with the tests I have made some changes to a couple of files (due to same kept the changes in a draft PR) - please find the reason below:
MatchedMethodResult:
line#9: updated the access specifier to public as its instance is required in test package for expectedResult comparison.
line#22: overloaded the constructor to accept the matchedNode as String - this change I didn't want to make but for creating expectedResult object it is required to create an instance of this class. Since its not possible to explicitly create an ASTNode and just for testing purposes - it doesn't seem like a good idea to parse the ExampleClass and visit/search for the node (basically it would be redundant as to what is being done for the FindMethodInvocationAnalysis itself).
Also ASTNode.toString() i.e., string value for ASTNode is stored in the member matchedNode anyway.
line#40: added equals() implementation for comparison of the objects
MethodAnalysisResult:
line#13: added public access specifier for same reason as above.
DescribedPredicate:
line#33: implemetation override for equals()/hashcode()
With these two tests was able to bump the overall coverage to 80.1%
PFA the screen captures for individual class coverage.
Issue #62: Add test coverage for FindMethodInvocationsAnalysis and FindMethodDeclarationsAnalysis
Hi, along with the tests I have made some changes to a couple of files (due to same kept the changes in a draft PR) - please find the reason below:
With these two tests was able to bump the overall coverage to 80.1% PFA the screen captures for individual class coverage.