From 22f60a36199355855860cc5509862100117b8f49 Mon Sep 17 00:00:00 2001 From: Sanders Lauture Date: Thu, 20 Jun 2024 02:19:30 -0700 Subject: [PATCH] Fix tests Also for some reason the Threads API package didn't get included --- SeattleCarsInBikeLanes.Tests/AdminPageControllerTests.cs | 6 +++++- SeattleCarsInBikeLanes/SeattleCarsInBikeLanes.csproj | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/SeattleCarsInBikeLanes.Tests/AdminPageControllerTests.cs b/SeattleCarsInBikeLanes.Tests/AdminPageControllerTests.cs index 8315d21..450fe81 100644 --- a/SeattleCarsInBikeLanes.Tests/AdminPageControllerTests.cs +++ b/SeattleCarsInBikeLanes.Tests/AdminPageControllerTests.cs @@ -10,6 +10,7 @@ using golf1052.Mastodon; using golf1052.Mastodon.Models.Statuses; using golf1052.Mastodon.Models.Statuses.Media; +using golf1052.ThreadsAPI; using Imgur.API.Authentication; using Imgur.API.Endpoints; using Imgur.API.Models; @@ -49,6 +50,7 @@ public class AdminPageControllerTests private Mock? mockBlueskyClientProvider; private Mock? mockMastodonClient; private Mock? mockBlueskyClient; + private Mock? mockThreadsClient; public AdminPageControllerTests() { @@ -94,6 +96,7 @@ public AdminPageControllerTests() mockMastodonClient = new Mock("https://mastodon.social", mockHttpMessageHandler.CreateClient()); mockBlueskyClient = new Mock(mockHttpMessageHandler.CreateClient(), null!, null!); + mockThreadsClient = new Mock("clientId", "clientSecret", mockHttpMessageHandler.CreateClient()); mockSecretClient.Setup(m => m.GetSecret(It.IsAny(), It.IsAny(), It.IsAny())) .Returns(Azure.Response.FromValue(SecretModelFactory.KeyVaultSecret(new SecretProperties("test"), "test"), Mock.Of())); @@ -108,7 +111,8 @@ public AdminPageControllerTests() mapsSearchClient, mockMastodonClientProvider.Object, mockFeedProvider.Object, - mockBlueskyClientProvider.Object); + mockBlueskyClientProvider.Object, + mockThreadsClient.Object); } [Fact] diff --git a/SeattleCarsInBikeLanes/SeattleCarsInBikeLanes.csproj b/SeattleCarsInBikeLanes/SeattleCarsInBikeLanes.csproj index 3b1c657..4505d6e 100644 --- a/SeattleCarsInBikeLanes/SeattleCarsInBikeLanes.csproj +++ b/SeattleCarsInBikeLanes/SeattleCarsInBikeLanes.csproj @@ -13,6 +13,7 @@ +