-
-
Notifications
You must be signed in to change notification settings - Fork 96
Allow DisplayNameAttribute on classes with parameter substitution support #2705
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
Co-authored-by: thomhurst <[email protected]>
…prove documentation Co-authored-by: thomhurst <[email protected]>
c1b08a0 to
59052c2
Compare
|
Claude finished @Copilot's task —— View job PR Review Complete ✅I've completed a thorough review of this PR that adds class-level support to Todo List
Code Quality Assessment✅ Excellent Implementation QualityThe implementation in
✅ Robust DocumentationThe XML documentation is comprehensive with:
Potential Issues Found
|
This PR extends the
DisplayNameAttributeto support class-level usage, enabling custom display names for test classes with parameter substitution capabilities.Changes Made
Enhanced AttributeTargets
DisplayNameAttributefromAttributeTargets.MethodtoAttributeTargets.Method | AttributeTargets.ClassImproved Parameter Substitution
FormatDisplayNamemethod to handle class constructor parametersUpdated Documentation
Usage Examples
Class-level DisplayName without parameters:
Class-level DisplayName with parameter substitution:
Method-level DisplayName (existing functionality preserved):
Technical Details
Compatibility
This enhancement addresses the common scenario where developers want to provide meaningful names for test class scenarios, particularly useful for integration testing where each class represents a specific test scenario.
Fixes #2689.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.