From 982de18371012b1302a5eea9f3b6adffcdf71fc7 Mon Sep 17 00:00:00 2001 From: John Luo Date: Thu, 7 Jan 2016 19:43:35 -0800 Subject: [PATCH] Updating tests to add options to services --- .../RequestDelegateRouteBuilderExtensionsTest.cs | 1 + test/Microsoft.AspNet.Routing.Tests/RouteCollectionTest.cs | 2 ++ test/Microsoft.AspNet.Routing.Tests/RouteOptionsTests.cs | 1 + 3 files changed, 4 insertions(+) diff --git a/test/Microsoft.AspNet.Routing.Extensions.Tests/RequestDelegateRouteBuilderExtensionsTest.cs b/test/Microsoft.AspNet.Routing.Extensions.Tests/RequestDelegateRouteBuilderExtensionsTest.cs index de8622ffe1..e9303e26b4 100644 --- a/test/Microsoft.AspNet.Routing.Extensions.Tests/RequestDelegateRouteBuilderExtensionsTest.cs +++ b/test/Microsoft.AspNet.Routing.Extensions.Tests/RequestDelegateRouteBuilderExtensionsTest.cs @@ -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(); diff --git a/test/Microsoft.AspNet.Routing.Tests/RouteCollectionTest.cs b/test/Microsoft.AspNet.Routing.Tests/RouteCollectionTest.cs index 7264674256..4710767351 100644 --- a/test/Microsoft.AspNet.Routing.Tests/RouteCollectionTest.cs +++ b/test/Microsoft.AspNet.Routing.Tests/RouteCollectionTest.cs @@ -528,6 +528,7 @@ namespace Microsoft.AspNet.Routing var request = new Mock(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(NullLoggerFactory.Instance); + services.AddOptions(); services.AddRouting(); if (options != null) { diff --git a/test/Microsoft.AspNet.Routing.Tests/RouteOptionsTests.cs b/test/Microsoft.AspNet.Routing.Tests/RouteOptionsTests.cs index 1ba34efde7..df9275bb2e 100644 --- a/test/Microsoft.AspNet.Routing.Tests/RouteOptionsTests.cs +++ b/test/Microsoft.AspNet.Routing.Tests/RouteOptionsTests.cs @@ -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)));