From 3c8fdb6f49dd480d567dd2d66608c1051c07088d Mon Sep 17 00:00:00 2001 From: Giles Odigwe Date: Fri, 8 May 2026 14:47:49 -0700 Subject: [PATCH] Fix Anthropic unit test mocks for SDK 12.20.0 interface changes Add missing interface members: IAnthropicClient.WebhookKey, IBetaService.MemoryStores, IBetaService.Webhooks, IBetaService.UserProfiles Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Extensions/AnthropicBetaServiceExtensionsTests.cs | 8 ++++++++ .../Extensions/AnthropicClientExtensionsTests.cs | 2 ++ 2 files changed, 10 insertions(+) diff --git a/dotnet/tests/Microsoft.Agents.AI.Anthropic.UnitTests/Extensions/AnthropicBetaServiceExtensionsTests.cs b/dotnet/tests/Microsoft.Agents.AI.Anthropic.UnitTests/Extensions/AnthropicBetaServiceExtensionsTests.cs index cccac81eba..3fec3c79a7 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Anthropic.UnitTests/Extensions/AnthropicBetaServiceExtensionsTests.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Anthropic.UnitTests/Extensions/AnthropicBetaServiceExtensionsTests.cs @@ -451,6 +451,8 @@ public sealed class AnthropicBetaServiceExtensionsTests public IBetaService Beta => this.BetaService; + public string? WebhookKey { get => throw new NotImplementedException(); init => throw new NotImplementedException(); } + public IBetaService BetaService { get; } IMessageService IAnthropicClient.Messages => new Mock().Object; @@ -491,6 +493,12 @@ public sealed class AnthropicBetaServiceExtensionsTests public global::Anthropic.Services.Beta.IVaultService Vaults => throw new NotImplementedException(); + public global::Anthropic.Services.Beta.IMemoryStoreService MemoryStores => throw new NotImplementedException(); + + public global::Anthropic.Services.Beta.IWebhookService Webhooks => throw new NotImplementedException(); + + public global::Anthropic.Services.Beta.IUserProfileService UserProfiles => throw new NotImplementedException(); + public IBetaService WithOptions(Func modifier) { throw new NotImplementedException(); diff --git a/dotnet/tests/Microsoft.Agents.AI.Anthropic.UnitTests/Extensions/AnthropicClientExtensionsTests.cs b/dotnet/tests/Microsoft.Agents.AI.Anthropic.UnitTests/Extensions/AnthropicClientExtensionsTests.cs index 79844ed60a..cf882b0086 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Anthropic.UnitTests/Extensions/AnthropicClientExtensionsTests.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Anthropic.UnitTests/Extensions/AnthropicClientExtensionsTests.cs @@ -81,6 +81,8 @@ public sealed class AnthropicClientExtensionsTests public IBetaService Beta => throw new NotImplementedException(); + public string? WebhookKey { get => throw new NotImplementedException(); init => throw new NotImplementedException(); } + public IAnthropicClient WithOptions(Func modifier) { throw new NotImplementedException();