From d0ee6a0bef90953ce67a802adc7411a749352c02 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 19:46:21 +0200 Subject: [PATCH] Bump the other-testing group with 1 update (#1101) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Eirik Tsarpalis --- Directory.Packages.props | 2 +- .../Server/McpServerToolTests.cs | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index d8ce357..2b1dbb7 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -90,6 +90,6 @@ - + \ No newline at end of file diff --git a/tests/ModelContextProtocol.Tests/Server/McpServerToolTests.cs b/tests/ModelContextProtocol.Tests/Server/McpServerToolTests.cs index 9ce1dd1..e1e1011 100644 --- a/tests/ModelContextProtocol.Tests/Server/McpServerToolTests.cs +++ b/tests/ModelContextProtocol.Tests/Server/McpServerToolTests.cs @@ -658,11 +658,11 @@ public partial class McpServerToolTests { JsonSchema schema = JsonSerializer.Deserialize(schemaDoc, JsonContext2.Default.JsonSchema)!; EvaluationOptions options = new() { OutputFormat = OutputFormat.List }; - EvaluationResults results = schema.Evaluate(value, options); + EvaluationResults results = schema.Evaluate(JsonSerializer.SerializeToElement(value, JsonContext2.Default.JsonNode), options); if (!results.IsValid) { - IEnumerable errors = results.Details - .Where(d => d.HasErrors) + IEnumerable errors = (results.Details ?? []) + .Where(d => d.Errors?.Count > 0) .SelectMany(d => d.Errors!.Select(error => $"Path:${d.InstanceLocation} {error.Key}:{error.Value}")); throw new XunitException($""" @@ -826,6 +826,7 @@ public partial class McpServerToolTests private static string ToolWithoutReturnDescription() => "result"; [JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)] + [JsonSerializable(typeof(JsonNode))] [JsonSerializable(typeof(DisposableToolType))] [JsonSerializable(typeof(AsyncDisposableToolType))] [JsonSerializable(typeof(AsyncDisposableAndDisposableToolType))]