React to options

This commit is contained in:
Hao Kung 2017-06-26 14:14:34 -07:00
parent f4a86f5511
commit 4e004c22ba
5 changed files with 5 additions and 4 deletions

View File

@ -67,7 +67,7 @@ namespace System.Web.Http
private static IServiceProvider CreateServices()
{
var options = new OptionsManager<MvcOptions>(new IConfigureOptions<MvcOptions>[] { });
var options = new TestOptionsManager<MvcOptions>();
options.Value.OutputFormatters.Add(new StringOutputFormatter());
options.Value.OutputFormatters.Add(new JsonOutputFormatter(
new JsonSerializerSettings(),

View File

@ -67,7 +67,7 @@ namespace System.Web.Http
private static IServiceProvider CreateServices()
{
var options = new OptionsManager<MvcOptions>(new IConfigureOptions<MvcOptions>[] { });
var options = new TestOptionsManager<MvcOptions>();
options.Value.OutputFormatters.Add(new StringOutputFormatter());
options.Value.OutputFormatters.Add(new JsonOutputFormatter(
new JsonSerializerSettings(),

View File

@ -80,7 +80,7 @@ namespace System.Web.Http
private static IServiceProvider CreateServices()
{
var options = new OptionsManager<MvcOptions>(new IConfigureOptions<MvcOptions>[] { });
var options = new TestOptionsManager<MvcOptions>();
options.Value.OutputFormatters.Add(new StringOutputFormatter());
options.Value.OutputFormatters.Add(new JsonOutputFormatter(
new JsonSerializerSettings(),

View File

@ -12,6 +12,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Microsoft.AspNetCore.Mvc.TestCommon\Microsoft.AspNetCore.Mvc.TestCommon.csproj" />
<ProjectReference Include="..\..\src\Microsoft.AspNetCore.Mvc.WebApiCompatShim\Microsoft.AspNetCore.Mvc.WebApiCompatShim.csproj" />
<PackageReference Include="Microsoft.AspNetCore.Http" Version="$(AspNetCoreVersion)" />

View File

@ -68,7 +68,7 @@ namespace System.Web.Http
private static IServiceProvider CreateServices()
{
var options = new OptionsManager<MvcOptions>(new IConfigureOptions<MvcOptions>[] { });
var options = new TestOptionsManager<MvcOptions>();
options.Value.OutputFormatters.Add(new StringOutputFormatter());
options.Value.OutputFormatters.Add(new JsonOutputFormatter(
new JsonSerializerSettings(),