File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed
tests/ModelContextProtocol.Tests/Server Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -46,18 +46,18 @@ public void Create_InvalidArgs_Throws()
4646 [ Fact ]
4747 public async Task SupportsMcpServer ( )
4848 {
49- McpServer server = CreateTestServer ( ) ;
49+ McpServer testServer = CreateTestServer ( ) ;
5050
51- McpServerPrompt prompt = McpServerPrompt . Create ( ( McpServer s ) =>
51+ McpServerPrompt prompt = McpServerPrompt . Create ( ( McpServer server ) =>
5252 {
53- Assert . Same ( server , s ) ;
53+ Assert . Same ( testServer , server ) ;
5454 return new ChatMessage ( ChatRole . User , "Hello" ) ;
5555 } ) ;
5656
57- Assert . DoesNotContain ( "s " , prompt . ProtocolPrompt . Arguments ? . Select ( a => a . Name ) ?? [ ] ) ;
57+ Assert . DoesNotContain ( "server " , prompt . ProtocolPrompt . Arguments ? . Select ( a => a . Name ) ?? [ ] ) ;
5858
5959 var result = await prompt . GetAsync (
60- new RequestContext < GetPromptRequestParams > ( server , CreateTestJsonRpcRequest ( ) ) ,
60+ new RequestContext < GetPromptRequestParams > ( testServer , CreateTestJsonRpcRequest ( ) ) ,
6161 TestContext . Current . CancellationToken ) ;
6262 Assert . NotNull ( result ) ;
6363 Assert . NotNull ( result . Messages ) ;
Original file line number Diff line number Diff line change @@ -54,18 +54,18 @@ public void Create_InvalidArgs_Throws()
5454 [ Fact ]
5555 public async Task SupportsMcpServer ( )
5656 {
57- McpServer server = CreateTestServer ( ) ;
57+ McpServer testServer = CreateTestServer ( ) ;
5858
59- McpServerTool tool = McpServerTool . Create ( ( McpServer s ) =>
59+ McpServerTool tool = McpServerTool . Create ( ( McpServer server ) =>
6060 {
61- Assert . Same ( server , s ) ;
61+ Assert . Same ( testServer , server ) ;
6262 return "42" ;
6363 } ) ;
6464
6565 Assert . DoesNotContain ( "server" , JsonSerializer . Serialize ( tool . ProtocolTool . InputSchema , McpJsonUtilities . DefaultOptions ) ) ;
6666
6767 var result = await tool . InvokeAsync (
68- new RequestContext < CallToolRequestParams > ( server , CreateTestJsonRpcRequest ( ) ) ,
68+ new RequestContext < CallToolRequestParams > ( testServer , CreateTestJsonRpcRequest ( ) ) ,
6969 TestContext . Current . CancellationToken ) ;
7070 Assert . Equal ( "42" , ( result . Content [ 0 ] as TextContentBlock ) ? . Text ) ;
7171 }
You can’t perform that action at this time.
0 commit comments