Updating tests to add options to services

This commit is contained in:
John Luo 2016-01-07 19:43:35 -08:00
parent c742390a3c
commit 982de18371
3 changed files with 4 additions and 0 deletions

View File

@ -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();

View File

@ -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)
{

View File

@ -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)));