Updating tests to add options to services
This commit is contained in:
parent
c742390a3c
commit
982de18371
|
|
@ -127,6 +127,7 @@ namespace Microsoft.AspNet.Builder
|
|||
private static IServiceProvider CreateServices()
|
||||
{
|
||||
var services = new ServiceCollection();
|
||||
services.AddOptions();
|
||||
services.AddRouting();
|
||||
services.AddLogging();
|
||||
return services.BuildServiceProvider();
|
||||
|
|
|
|||
|
|
@ -528,6 +528,7 @@ namespace Microsoft.AspNet.Routing
|
|||
var request = new Mock<HttpRequest>(MockBehavior.Strict);
|
||||
|
||||
var services = new ServiceCollection();
|
||||
services.AddOptions();
|
||||
services.AddRouting();
|
||||
if (options != null)
|
||||
{
|
||||
|
|
@ -548,6 +549,7 @@ namespace Microsoft.AspNet.Routing
|
|||
{
|
||||
var services = new ServiceCollection();
|
||||
services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
|
||||
services.AddOptions();
|
||||
services.AddRouting();
|
||||
if (options != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ namespace Microsoft.AspNet.Routing.Tests
|
|||
{
|
||||
// Arrange
|
||||
var services = new ServiceCollection();
|
||||
services.AddOptions();
|
||||
|
||||
// Act
|
||||
services.AddRouting(options => options.ConstraintMap.Add("foo", typeof(TestRouteConstraint)));
|
||||
|
|
|
|||
Loading…
Reference in New Issue