Clean up (use of) McpException and McpTransportException (#321)
* Clean up (use of) McpException * Replace McpTransportException with InvalidOperationException * Add cancellation test
This commit is contained in:
parent
d65ddce268
commit
7d77be68cf
1 changed files with 231 additions and 219 deletions
|
|
@ -59,7 +59,7 @@ public class McpServerPromptTests
|
|||
Assert.Contains("something", prompt.ProtocolPrompt.Arguments?.Select(a => a.Name) ?? []);
|
||||
Assert.DoesNotContain("actualMyService", prompt.ProtocolPrompt.Arguments?.Select(a => a.Name) ?? []);
|
||||
|
||||
await Assert.ThrowsAsync<ArgumentException>(async () => await prompt.GetAsync(
|
||||
await Assert.ThrowsAsync<InvalidOperationException>(async () => await prompt.GetAsync(
|
||||
new RequestContext<GetPromptRequestParams>(new Mock<IMcpServer>().Object),
|
||||
TestContext.Current.CancellationToken));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue