Skip to content
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

Differentiate overridden vs inherited super test methods #71

Merged
merged 3 commits into from
Aug 30, 2021

Conversation

kkoser
Copy link
Contributor

@kkoser kkoser commented Aug 23, 2021

There is a behavior difference betweeen the case of a superclass test method
that is not overridden by the subclass, and one that is - when it is not overridden,
the actual super method is used, and so all of its annotations remain in tact. However
when it is overridden, only inherited annotations are retained. This adds support for
handling this difference by splitting the cases when parsing.

Also updated tests to be more robust, there were some noticeable gaps.

Fixes #69

There is a behavior difference betweeen the case of a superclass test method
that is not overridden by the subclass, and one that is - when it is not overridden,
the actual super method is used, and so all of its annotations remain in tact. However
when it _is_ overridden, only inherited annotations are retained. This adds support for
handling this difference by splitting the cases when parsing.

Also updated tests to be more robust, there were some noticeable gaps.

Fixes linkedin#69
)
}
.toSet()

return adaptedSuperMethods union parsingResult.testMethods
// alter the existing test methods to include super annotations if they're inherited
val alteredMethodsd = parsingResult.testMethods.filter { method -> superTestMethods.any {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The keyboard strikes again! alteredMethodsd

@kkoser kkoser merged commit e922854 into linkedin:main Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inherited method annotations are missing
2 participants