Removed irrelevant tests
This commit is contained in:
parent
c5e8120e39
commit
41b4e6017e
|
|
@ -66,47 +66,10 @@ namespace Microsoft.AspNetCore.Hosting
|
|||
Assert.Throws<ArgumentNullException>(() => CreateBuilder().UseStartup((string)null));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CanStartWithOldServerConfig()
|
||||
{
|
||||
var vals = new Dictionary<string, string>
|
||||
{
|
||||
};
|
||||
|
||||
var builder = new ConfigurationBuilder()
|
||||
.AddInMemoryCollection(vals);
|
||||
var config = builder.Build();
|
||||
var host = CreateBuilder(config).UseServer(this).Build();
|
||||
host.Start();
|
||||
Assert.NotNull(host.Services.GetService<IHostingEnvironment>());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CanStartWithServerConfig()
|
||||
{
|
||||
var vals = new Dictionary<string, string>
|
||||
{
|
||||
};
|
||||
|
||||
var builder = new ConfigurationBuilder()
|
||||
.AddInMemoryCollection(vals);
|
||||
var config = builder.Build();
|
||||
var host = CreateBuilder(config).UseServer(this).Build();
|
||||
host.Start();
|
||||
Assert.NotNull(host.Services.GetService<IHostingEnvironment>());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CanDefaultAddressesIfNotConfigured()
|
||||
{
|
||||
var vals = new Dictionary<string, string>
|
||||
{
|
||||
};
|
||||
|
||||
var builder = new ConfigurationBuilder()
|
||||
.AddInMemoryCollection(vals);
|
||||
var config = builder.Build();
|
||||
var host = CreateBuilder(config).UseServer(this).Build();
|
||||
var host = CreateBuilder().UseServer(this).Build();
|
||||
host.Start();
|
||||
Assert.NotNull(host.Services.GetService<IHostingEnvironment>());
|
||||
Assert.Equal("http://localhost:5000", host.ServerFeatures.Get<IServerAddressesFeature>().Addresses.First());
|
||||
|
|
|
|||
Loading…
Reference in New Issue