React to runtime perf changes in functional tests
This commit is contained in:
parent
69294f06d6
commit
64ddbe0160
|
|
@ -14,16 +14,18 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests
|
|||
{
|
||||
private readonly IApplicationEnvironment _originalAppEnvironment;
|
||||
private readonly string _applicationBasePath;
|
||||
private readonly string _applicationName;
|
||||
|
||||
public TestApplicationEnvironment(IApplicationEnvironment originalAppEnvironment, string appBasePath)
|
||||
public TestApplicationEnvironment(IApplicationEnvironment originalAppEnvironment, string appBasePath, string appName)
|
||||
{
|
||||
_originalAppEnvironment = originalAppEnvironment;
|
||||
_applicationBasePath = appBasePath;
|
||||
_applicationName = appName;
|
||||
}
|
||||
|
||||
public string ApplicationName
|
||||
{
|
||||
get { return _originalAppEnvironment.ApplicationName; }
|
||||
get { return _applicationName; }
|
||||
}
|
||||
|
||||
public string Version
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests
|
|||
var services = new ServiceCollection();
|
||||
services.AddInstance(
|
||||
typeof(IApplicationEnvironment),
|
||||
new TestApplicationEnvironment(appEnvironment, appBasePath));
|
||||
new TestApplicationEnvironment(appEnvironment, appBasePath, applicationWebSiteName));
|
||||
|
||||
// Injecting a custom assembly provider via configuration setting. It's not good enough to just
|
||||
// add the service directly since it's registered by MVC.
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public class MyTestType {}";
|
|||
var libraryManager = GetLibraryManager();
|
||||
|
||||
var compilerOptionsProvider = new Mock<ICompilerOptionsProvider>();
|
||||
compilerOptionsProvider.Setup(p => p.GetCompilerOptions(applicationEnvironment.ApplicationBasePath,
|
||||
compilerOptionsProvider.Setup(p => p.GetCompilerOptions(applicationEnvironment.ApplicationName,
|
||||
applicationEnvironment.RuntimeFramework,
|
||||
applicationEnvironment.Configuration))
|
||||
.Returns(new CompilerOptions());
|
||||
|
|
@ -63,7 +63,7 @@ public class MyNonCustomDefinedClass {}
|
|||
var libraryManager = GetLibraryManager();
|
||||
|
||||
var compilerOptionsProvider = new Mock<ICompilerOptionsProvider>();
|
||||
compilerOptionsProvider.Setup(p => p.GetCompilerOptions(applicationEnvironment.ApplicationBasePath,
|
||||
compilerOptionsProvider.Setup(p => p.GetCompilerOptions(applicationEnvironment.ApplicationName,
|
||||
applicationEnvironment.RuntimeFramework,
|
||||
applicationEnvironment.Configuration))
|
||||
.Returns(new CompilerOptions { Defines = new[] { "MY_CUSTOM_DEFINE" } });
|
||||
|
|
@ -97,7 +97,7 @@ public class NotRazorPrefixType {}";
|
|||
var libraryManager = GetLibraryManager();
|
||||
|
||||
var compilerOptionsProvider = new Mock<ICompilerOptionsProvider>();
|
||||
compilerOptionsProvider.Setup(p => p.GetCompilerOptions(applicationEnvironment.ApplicationBasePath,
|
||||
compilerOptionsProvider.Setup(p => p.GetCompilerOptions(applicationEnvironment.ApplicationName,
|
||||
applicationEnvironment.RuntimeFramework,
|
||||
applicationEnvironment.Configuration))
|
||||
.Returns(new CompilerOptions());
|
||||
|
|
|
|||
Loading…
Reference in New Issue