Conversation
Resolves issue #3055 where tests using [InheritsTests] attribute reported source location at the attribute location instead of the actual test method location. Changes: - Added GetMethodLocation helper to extract actual method source location - Modified GenerateInheritedTestSources to use method location when available - Falls back to class location if method location unavailable - Updated snapshot tests to reflect correct line numbers 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Improved the source location fix by leveraging the existing CallerFilePath and CallerLineNumber parameters in TestAttribute constructor arguments, which are automatically captured when the [Test] attribute is applied. This approach is: - Simpler and more reliable than parsing syntax trees - Uses the built-in compiler-provided location information - Removes the need for the GetMethodLocation helper method - More consistent with how regular test methods get their source location The TestAttribute already captures the exact file and line number via [CallerFilePath] and [CallerLineNumber] attributes, making this the preferred approach for getting accurate source locations. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
…for clarity and efficiency; add tests for bug 3072
…nd generic types; deduplicate class sources for improved efficiency
|
Claude finished @thomhurst's task —— View job PR Review: Detect injected properties in base classesReviewing this pull request that fixes issue #3072 related to detecting injected properties in base classes. Todo List:
Understanding the IssueBug #3072 involved a case where property injection wasn't working correctly for properties defined in base classes. The test case shows:
✅ Code Quality & Best PracticesExcellent improvements:
Modern C# compliance:
✅ Bug Fixes & CorrectnessPrimary fix implemented correctly:
Edge cases handled:
✅ Performance ConsiderationsPerformance optimizations:
Potential concerns addressed:
✅ Security ConsiderationsSafe reflection usage:
✅ Test CoverageComprehensive test coverage:
Test quality:
✅ Architecture AdherenceFollows TUnit principles:
📝 Minor Suggestions
✅ Overall AssessmentThis is a high-quality fix that addresses the reported issue comprehensively:
The implementation correctly handles inheritance hierarchies while maintaining the framework's performance characteristics and architectural goals. The extensive snapshot test updates demonstrate thorough verification of the changes. Recommendation: ✅ Approve and merge |
|
Claude finished @thomhurst's task —— View job PR Review: Detect injected properties in base classesReviewing this pull request that fixes issue #3072 related to detecting injected properties in base classes. Todo List:
Understanding the IssueBug #3072 involved a case where property injection wasn't working correctly for properties defined in base classes. The test case shows:
✅ Code Quality & Best PracticesExcellent improvements:
Modern C# compliance:
✅ Bug Fixes & CorrectnessPrimary fix implemented correctly:
Edge cases handled:
✅ Performance ConsiderationsPerformance optimizations:
Potential concerns addressed:
✅ Security ConsiderationsSafe reflection usage:
✅ Test CoverageComprehensive test coverage:
Test quality:
✅ Architecture AdherenceFollows TUnit principles:
📝 Minor Suggestions
✅ Overall AssessmentThis is a high-quality fix that addresses the reported issue comprehensively:
The implementation correctly handles inheritance hierarchies while maintaining the framework's performance characteristics and architectural goals. The extensive snapshot test updates demonstrate thorough verification of the changes. Recommendation: ✅ Approve and merge |
|
@thomhurst I think this caused a bug: #3084 |
Fixes #3072