diff --git a/src/Samples/LittleBlocks.Sample.WebAPI.IntegrationTests/Helpers/TestApplicationFactory.cs b/src/Samples/LittleBlocks.Sample.WebAPI.IntegrationTests/Helpers/TestApplicationFactory.cs
index 115fda0..b9dbc63 100644
--- a/src/Samples/LittleBlocks.Sample.WebAPI.IntegrationTests/Helpers/TestApplicationFactory.cs
+++ b/src/Samples/LittleBlocks.Sample.WebAPI.IntegrationTests/Helpers/TestApplicationFactory.cs
@@ -15,7 +15,7 @@
// along with this program. If not, see .
using System.Net.Http;
-using Serilog.AspNetCore;
+using Microsoft.Extensions.Hosting;
namespace LittleBlocks.Sample.WebAPI.IntegrationTests.Helpers;
@@ -55,21 +55,24 @@ public string LogDirectoryPath
return Path.Combine(path, logsDirectory);
}
}
-
- protected override IWebHostBuilder CreateWebHostBuilder()
+
+ protected override IHostBuilder CreateHostBuilder()
{
- var hostBuilder = WebHost.CreateDefaultBuilder()
- .ConfigureAppConfiguration((context, builder) =>
+ var hostBuilder = Host.CreateDefaultBuilder()
+ .ConfigureWebHostDefaults(webHostBuilder =>
{
- var env = context.HostingEnvironment;
- env.EnvironmentName = _options.Environment;
-
- var configOptions = new ConfigurationOptions(env.ContentRootPath, env.EnvironmentName,
- env.ApplicationName, new string[] { });
- builder.ConfigureBuilder(configOptions);
- })
- .UseStartup()
- .ConfigureServices(_options.ConfigureServices);
+ webHostBuilder.ConfigureAppConfiguration((context, builder) =>
+ {
+ var env = context.HostingEnvironment;
+ env.EnvironmentName = _options.Environment;
+
+ var configOptions = new ConfigurationOptions(env.ContentRootPath, env.EnvironmentName,
+ env.ApplicationName, new string[] { });
+ builder.ConfigureBuilder(configOptions);
+ })
+ .UseStartup()
+ .ConfigureServices(_options.ConfigureServices);
+ });
if (_options.EnableLoggingToFile)
hostBuilder.UseSerilog((context, configuration) =>