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

Allow DynamicData source to be on base types #4482

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

Youssef1313
Copy link
Member

@Youssef1313 Youssef1313 commented Dec 31, 2024

Fixes #4347

@Youssef1313 Youssef1313 marked this pull request as ready for review December 31, 2024 18:44
Copy link
Member

@Evangelink Evangelink left a comment

Choose a reason for hiding this comment

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

One TODO to drop or fix but other LGTM

Comment on lines +813 to +814
// TODO: Should we pass true for includeNonPublic?
testMethodInfo = PlatformServiceProvider.Instance.ReflectionOperations.GetRuntimeMethod(methodBase.DeclaringType!, methodBase.Name, parameters, includeNonPublic: false);
Copy link
Member

Choose a reason for hiding this comment

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

I'd say no except if after the refactoring we no longer support internal test methods (I hope we have a test for that).

Please remove the comment or fix the code.

Copy link
Member Author

Choose a reason for hiding this comment

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

includeNonPublic: false preserves the existing behavior. But I'm suspecting that to be a bug when DiscoverInternals is used, which is why I left it as "TODO". Let's discuss/investigate more on Monday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not require member type in [DynamicData] when member is defined on base class
2 participants