Skip to content

Commit cafffde

Browse files
committed
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.
1 parent 69ca5d6 commit cafffde

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

ElectronNET.WebApp/Program.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,14 @@ public class Program
88
{
99
public static void Main(string[] args)
1010
{
11-
BuildWebHost(args).Run();
11+
CreateWebHostBuilder(args).Build().Run();
1212
}
1313

14-
public static IWebHost BuildWebHost(string[] args)
14+
public static IWebHostBuilder CreateWebHostBuilder(string[] args)
1515
{
1616
return WebHost.CreateDefaultBuilder(args)
1717
.UseElectron(args)
18-
.UseStartup<Startup>()
19-
.Build();
18+
.UseStartup<Startup>();
2019
}
2120
}
2221
}

0 commit comments

Comments
 (0)