File tree Expand file tree Collapse file tree
tests/ModelContextProtocol.Tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,15 +34,8 @@ public async Task SigInt_DisposesTestServerWithHosting_Gracefully()
3434 process . StandardInput . BaseStream ,
3535 serverName : "TestServerWithHosting" ) ;
3636
37- var serverConfig = new McpServerConfig ( )
38- {
39- Id = "test-server-with-hosting" ,
40- Name = "TestServerWithHosting" ,
41- TransportType = TransportTypes . StdIo ,
42- } ;
43-
44- await using var client = await McpClientFactory . CreateAsync ( serverConfig ,
45- createTransportFunc : ( _ , _ ) => new TestClientTransport ( streamServerTransport ) ,
37+ await using var client = await McpClientFactory . CreateAsync (
38+ new TestClientTransport ( streamServerTransport ) ,
4639 loggerFactory : LoggerFactory ,
4740 cancellationToken : TestContext . Current . CancellationToken ) ;
4841
@@ -65,6 +58,8 @@ public async Task SigInt_DisposesTestServerWithHosting_Gracefully()
6558
6659 private sealed class TestClientTransport ( ITransport sessionTransport ) : IClientTransport
6760 {
61+ public string Name => nameof ( TestClientTransport ) ;
62+
6863 public Task < ITransport > ConnectAsync ( CancellationToken cancellationToken = default )
6964 => Task . FromResult ( sessionTransport ) ;
7065 }
You can’t perform that action at this time.
0 commit comments