diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Infrastructure/DefaultAssemblyProviderTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Infrastructure/DefaultAssemblyProviderTests.cs index a7adfadc12..386d5c0f13 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Infrastructure/DefaultAssemblyProviderTests.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Infrastructure/DefaultAssemblyProviderTests.cs @@ -253,8 +253,7 @@ namespace Microsoft.AspNet.Mvc.Infrastructure private static ILibraryManager GetLibraryManager() { - return CallContextServiceLocator.Locator.ServiceProvider - .GetRequiredService(); + return PlatformServices.Default.LibraryManager; } } } diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/MvcTestFixture.cs b/test/Microsoft.AspNet.Mvc.FunctionalTests/MvcTestFixture.cs index 7522a7b664..ce6d8f147e 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/MvcTestFixture.cs +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/MvcTestFixture.cs @@ -91,8 +91,7 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests Assembly startupAssembly, Func buildServices) { - var applicationServices = CallContextServiceLocator.Locator.ServiceProvider; - var libraryManager = applicationServices.GetRequiredService(); + var libraryManager = PlatformServices.Default.LibraryManager; // When an application executes in a regular context, the application base path points to the root // directory where the application is located, for example .../samples/MvcSample.Web. However, when @@ -104,7 +103,7 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests var library = libraryManager.GetLibrary(applicationName); var applicationRoot = Path.GetDirectoryName(library.Path); - var applicationEnvironment = applicationServices.GetRequiredService(); + var applicationEnvironment = PlatformServices.Default.Application; return (services) => {