-
Notifications
You must be signed in to change notification settings - Fork 316
Test | Expose internal types to ManualTests #3239
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
Conversation
| <TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFramework)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath> | ||
| </PropertyGroup> | ||
| <ItemGroup> | ||
| <InternalsVisibleTo Include="ManualTests" /> |
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.
This syntax is only available in SDK style projects that use .NET 5+. Our only option for netfx was direct assembly tags.
| <TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFramework)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath> | ||
| </PropertyGroup> | ||
| <ItemGroup> | ||
| <InternalsVisibleTo Include="ManualTests" /> |
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.
I love it, but do we need to restrict via strong names and public keys?
As-is, I think this would let anyone pair their assembly named "ManualTests" with our MDS package, and easily access internals. Maybe that isn't a concern though, since they can bypass the whole visibility system via reflection anyway. Thoughts?
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.
Love the idea - we've needed it for a long time - but need to see it pass before I can approve :)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3239 +/- ##
==========================================
- Coverage 72.76% 72.72% -0.05%
==========================================
Files 303 300 -3
Lines 59527 59616 +89
==========================================
+ Hits 43317 43356 +39
- Misses 16210 16260 +50
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Let's gooooooooooooooooooooooooooooooooooooo 🚢 🚢 🚢 🚀
Internal types are not accessible outside of their home project. However, they still need to be tested. This PR exposes internal types to the
ManualTestsandFunctionalTestsprojects so that they can be used directly instead of via reflection.This PR does not update any tests that currently use reflection. Those can be addressed separately as tests are updated or as code health PRs.