Make MappableResultAssertionBuilder constructors public for third-party extensibility#2719
Make MappableResultAssertionBuilder constructors public for third-party extensibility#2719
Conversation
…ty extensibility Co-authored-by: thomhurst <30480171+thomhurst@users.noreply.github.com>
|
Claude finished @Copilot's task —— View job PR Review Complete ✅Reviewed this PR that makes Todo List:
Code Review FeedbackThis PR correctly addresses issue #2628 by making the ✅ Positive Aspects
🔍 Security & Encapsulation Analysis
📚 Alignment with DocumentationPerfect alignment with the documented extensibility pattern in 🧪 Test Coverage Considerations
📈 Performance & Design
Overall Assessment: ✅ APPROVED - This is a clean, minimal change that correctly enables the documented extensibility pattern without introducing security risks or breaking changes. |
|
Claude finished @Copilot's task —— View job PR Review Complete ✅Reviewed this PR that makes Todo List:
Code Review FeedbackThis PR correctly addresses issue #2628 by making the ✅ Positive Aspects
🔍 Security & Encapsulation Analysis
📚 Alignment with DocumentationPerfect alignment with the documented extensibility pattern in 🧪 Test Coverage Considerations
📈 Performance & Design
Overall Assessment: ✅ APPROVED - This is a clean, minimal change that correctly enables the documented extensibility pattern without introducing security risks or breaking changes. |
The
MappableResultAssertionBuilderconstructors were marked asinternal, preventing third-party developers from implementing custom assertions as described in the extensibility documentation.The documentation shows how to create custom assertions that return data via
awaitby wrappingBaseAssertCondition<TActual>implementations withinMappableResultAssertionBuilder<,,>instances:However, attempting to use this pattern resulted in compilation errors because the constructors were inaccessible.
Changes
Changed visibility of both
MappableResultAssertionBuilderconstructors frominternaltopublic:MappableResultAssertionBuilder<TActual, TExpected>(InvokableAssertionBuilder<TActual>, Func<TActual?, TExpected?>)MappableResultAssertionBuilder<TActual, TAssertCondition, TExpected>(InvokableAssertionBuilder<TActual>, TAssertCondition, Func<TActual?, TAssertCondition, TExpected?>)This enables third-party developers to create custom assertions that return data when awaited, as documented, without breaking any existing functionality.
Fixes #2628.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.