From cafffde339fce3f4442102daebd8caed6e82339b Mon Sep 17 00:00:00 2001 From: Andrii Kurdiumov Date: Mon, 14 Oct 2019 18:30:41 +0300 Subject: [PATCH] Change test application initialization procedure. It essentially the same as before, but MVC test tooling expect Program to have CreateWebHostBuilder. I referer to ability to seamlessly use WebApplicationFactory I understand that story for testing Electron application will be not easy as it is, but this is allow better defaults for testing web applications which can be run in hybrid mode. --- ElectronNET.WebApp/Program.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ElectronNET.WebApp/Program.cs b/ElectronNET.WebApp/Program.cs index 42ca51b..d236088 100644 --- a/ElectronNET.WebApp/Program.cs +++ b/ElectronNET.WebApp/Program.cs @@ -8,15 +8,14 @@ namespace ElectronNET.WebApp { public static void Main(string[] args) { - BuildWebHost(args).Run(); + CreateWebHostBuilder(args).Build().Run(); } - public static IWebHost BuildWebHost(string[] args) + public static IWebHostBuilder CreateWebHostBuilder(string[] args) { return WebHost.CreateDefaultBuilder(args) .UseElectron(args) - .UseStartup() - .Build(); + .UseStartup(); } } }