Moved the application url to HostingEnvironment and set it in the request middleware
This commit is contained in:
@@ -141,6 +141,7 @@ namespace Umbraco.Tests.Integration.Implementations
|
||||
public override IHostingEnvironment GetHostingEnvironment()
|
||||
=> _hostingEnvironment ??= new TestHostingEnvironment(
|
||||
GetIOptionsMonitorOfHostingSettings(),
|
||||
GetIOptionsMonitorOfWebRoutingSettings(),
|
||||
_hostEnvironment);
|
||||
|
||||
private IOptionsMonitor<HostingSettings> GetIOptionsMonitorOfHostingSettings()
|
||||
@@ -149,6 +150,12 @@ namespace Umbraco.Tests.Integration.Implementations
|
||||
return Mock.Of<IOptionsMonitor<HostingSettings>>(x => x.CurrentValue == hostingSettings);
|
||||
}
|
||||
|
||||
private IOptionsMonitor<WebRoutingSettings> GetIOptionsMonitorOfWebRoutingSettings()
|
||||
{
|
||||
var webRoutingSettings = new WebRoutingSettings();
|
||||
return Mock.Of<IOptionsMonitor<WebRoutingSettings>>(x => x.CurrentValue == webRoutingSettings);
|
||||
}
|
||||
|
||||
public override IApplicationShutdownRegistry GetHostingEnvironmentLifetime() => _hostingLifetime;
|
||||
|
||||
public override IIpResolver GetIpResolver() => _ipResolver;
|
||||
|
||||
Reference in New Issue
Block a user