From 17d0e7ea8994e8d5b37e822ef11121ad1b1f20db Mon Sep 17 00:00:00 2001 From: ahall Date: Mon, 15 Jun 2026 09:04:55 +0100 Subject: [PATCH] fix: resolve MicrosoftExtensions.Logging.Xunit load failure in Automapper tests (#461) --- Directory.Packages.props | 1 - .../CommunityToolkit.Datasync.Server.Automapper.Test.csproj | 1 - .../MappedTableRepository_Tests.cs | 3 +-- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index c1c92e52..e9b7475a 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -33,7 +33,6 @@ - diff --git a/tests/CommunityToolkit.Datasync.Server.Automapper.Test/CommunityToolkit.Datasync.Server.Automapper.Test.csproj b/tests/CommunityToolkit.Datasync.Server.Automapper.Test/CommunityToolkit.Datasync.Server.Automapper.Test.csproj index 823acacb..f9d81cd2 100644 --- a/tests/CommunityToolkit.Datasync.Server.Automapper.Test/CommunityToolkit.Datasync.Server.Automapper.Test.csproj +++ b/tests/CommunityToolkit.Datasync.Server.Automapper.Test/CommunityToolkit.Datasync.Server.Automapper.Test.csproj @@ -17,6 +17,5 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - diff --git a/tests/CommunityToolkit.Datasync.Server.Automapper.Test/MappedTableRepository_Tests.cs b/tests/CommunityToolkit.Datasync.Server.Automapper.Test/MappedTableRepository_Tests.cs index 2aa456f5..37358e06 100644 --- a/tests/CommunityToolkit.Datasync.Server.Automapper.Test/MappedTableRepository_Tests.cs +++ b/tests/CommunityToolkit.Datasync.Server.Automapper.Test/MappedTableRepository_Tests.cs @@ -9,7 +9,6 @@ using CommunityToolkit.Datasync.TestCommon.Databases; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Logging.Xunit; using Xunit.Abstractions; namespace CommunityToolkit.Datasync.Server.Automapper.Test; @@ -31,7 +30,7 @@ public class MappedTableRepository_Tests : RepositoryTests, IDisposabl public MappedTableRepository_Tests(ITestOutputHelper output) { this.output = output; - this.loggerFactory = new LoggerFactory([ new XunitLoggerProvider(this.output) ]); + this.loggerFactory = new TestLoggerFactory(this.output); MapperConfiguration config = new(c => c.AddProfile(new MapperProfile()), this.loggerFactory); this.mapper = config.CreateMapper(); }