diff --git a/test/Microsoft.AspNetCore.Session.Tests/SessionTests.cs b/test/Microsoft.AspNetCore.Session.Tests/SessionTests.cs index 0f783d3..06aff0a 100644 --- a/test/Microsoft.AspNetCore.Session.Tests/SessionTests.cs +++ b/test/Microsoft.AspNetCore.Session.Tests/SessionTests.cs @@ -16,6 +16,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Internal; using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Logging.Testing; using Microsoft.Net.Http.Headers; using Xunit; @@ -417,7 +418,7 @@ public async Task RefreshesSession_WhenSessionData_IsNotModified() }) .ConfigureServices(services => { - services.AddSingleton(typeof(ILoggerFactory), new NullLoggerFactory()); + services.AddSingleton(typeof(ILoggerFactory), NullLoggerFactory.Instance); services.AddDistributedMemoryCache(); services.AddSession(o => o.IdleTimeout = TimeSpan.FromMinutes(20)); services.Configure(o => o.Clock = clock);