Fix Metadata delegation in DelegatingMcpServerTool/Prompt/Resource#1338
Fix Metadata delegation in DelegatingMcpServerTool/Prompt/Resource#1338stephentoub merged 8 commits intomainfrom
Conversation
…erPrompt, and DelegatingMcpServerResource Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
|
@copilot please improve the tests around these delegating types in a way that validates all members are appropriately overridden |
…ase class members Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
Added |
|
@copilot please split the tests into files based on each type. If there's already a test file for the type, add the relevant test(s) there instead |
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
Split the tests into the existing per-type files: |
|
@copilot tests for Delegating McpServerTool should really be in a DelegatingMcpServerToolTests.cs file; similarly for prompt and resource. Please move all such tests into the right test file/class. |
|
@copilot See #1338 (comment). There was a typo when you were mentioned, but that's fixed now. Address that feedback please. |
Co-authored-by: jeffhandley <1031940+jeffhandley@users.noreply.github.com>
Moved the tests into dedicated files: |
tests/ModelContextProtocol.Tests/Server/DelegatingMcpServerPromptTests.cs
Show resolved
Hide resolved
jeffhandley
left a comment
There was a problem hiding this comment.
API changes look good to me assuming the expanded test coverage doesn't uncover anything that needs to be changed further.
…ation validation Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
tests/ModelContextProtocol.Tests/Server/DelegatingMcpServerPromptTests.cs
Outdated
Show resolved
Hide resolved
tests/ModelContextProtocol.Tests/Server/DelegatingMcpServerPromptTests.cs
Outdated
Show resolved
Hide resolved
tests/ModelContextProtocol.Tests/Server/DelegatingMcpServerPromptTests.cs
Outdated
Show resolved
Hide resolved
tests/ModelContextProtocol.Tests/Server/DelegatingMcpServerPromptTests.cs
Outdated
Show resolved
Hide resolved
…olidate into single test per type, fix net472 build Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
tests/ModelContextProtocol.Tests/Server/DelegatingMcpServerPromptTests.cs
Outdated
Show resolved
Hide resolved
…ction tests Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
Metadataoverride toDelegatingMcpServerTool,DelegatingMcpServerPrompt,DelegatingMcpServerResourceDelegatingMcpServerToolTests.cs,DelegatingMcpServerPromptTests.cs,DelegatingMcpServerResourceTests.csBindingFlags.DeclaredOnlyinstead ofDeclaringTypecheck in reflection-based override validation💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.