React to Routing service collection extension changes

This commit is contained in:
Kiran Challa 2016-02-22 11:43:08 -08:00
parent df5eb0a15c
commit 779edb6fe1
1 changed files with 6 additions and 4 deletions

View File

@ -193,11 +193,13 @@ namespace Microsoft.AspNetCore.Mvc.Internal
.SetupGet(o => o.Value) .SetupGet(o => o.Value)
.Returns(new RouteOptions()); .Returns(new RouteOptions());
return new ServiceCollection() var services = new ServiceCollection()
.AddSingleton<IInlineConstraintResolver>(new DefaultInlineConstraintResolver(routeOptions.Object)) .AddSingleton<IInlineConstraintResolver>(new DefaultInlineConstraintResolver(routeOptions.Object))
.AddSingleton<UrlEncoder>(new UrlTestEncoder()) .AddSingleton<UrlEncoder>(new UrlTestEncoder());
.AddRouting()
.AddSingleton(actionDescriptorProvider.Object) services.AddRouting();
return services.AddSingleton(actionDescriptorProvider.Object)
.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance) .AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance)
.BuildServiceProvider(); .BuildServiceProvider();
} }