mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-14 13:44:47 +00:00
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.
This commit is contained in:
@@ -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<Startup>()
|
||||
.Build();
|
||||
.UseStartup<Startup>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user