Add McpSessions.NegotiatedProtocolVersion property. (#794)
This commit is contained in:
parent
38b4a26998
commit
7cfe0ef621
1 changed files with 57 additions and 20 deletions
|
|
@ -468,4 +468,13 @@ public class McpClientTests : ClientServerTestBase
|
|||
],
|
||||
data.OrderBy(s => s));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(null)]
|
||||
[InlineData("2025-03-26")]
|
||||
public async Task ReturnsNegotiatedProtocolVersion(string? protocolVersion)
|
||||
{
|
||||
await using McpClient client = await CreateMcpClientForServer(new() { ProtocolVersion = protocolVersion });
|
||||
Assert.Equal(protocolVersion ?? "2025-06-18", client.NegotiatedProtocolVersion);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue