This commit is contained in:
Nate McMaster 2017-08-22 12:32:02 -07:00
Родитель facd1349da
Коммит 1c093cbbad
2 изменённых файлов: 5 добавлений и 4 удалений

Просмотреть файл

@ -6,7 +6,8 @@
<NETStandardImplicitPackageVersion>2.0.0-*</NETStandardImplicitPackageVersion> <NETStandardImplicitPackageVersion>2.0.0-*</NETStandardImplicitPackageVersion>
<NETStandardLibraryNETFrameworkVersion>2.0.0-*</NETStandardLibraryNETFrameworkVersion> <NETStandardLibraryNETFrameworkVersion>2.0.0-*</NETStandardLibraryNETFrameworkVersion>
<RuntimeFrameworkVersion Condition="'$(TargetFramework)'=='netcoreapp2.0'">2.0.0-*</RuntimeFrameworkVersion> <RuntimeFrameworkVersion Condition="'$(TargetFramework)'=='netcoreapp2.0'">2.0.0-*</RuntimeFrameworkVersion>
<TestSdkVersion>15.3.0-*</TestSdkVersion> <TestSdkVersion>15.3.0</TestSdkVersion>
<XunitVersion>2.3.0-beta2-*</XunitVersion> <XunitAnalyzersVersion>0.6.1</XunitAnalyzersVersion>
<XunitVersion>2.3.0-beta4-build3742</XunitVersion>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

Просмотреть файл

@ -45,7 +45,7 @@ namespace Microsoft.AspNetCore.Cors.Infrastructure
// Assert // Assert
response.EnsureSuccessStatusCode(); response.EnsureSuccessStatusCode();
Assert.Equal(1, response.Headers.Count()); Assert.Single(response.Headers);
Assert.Equal("Cross origin response", await response.Content.ReadAsStringAsync()); Assert.Equal("Cross origin response", await response.Content.ReadAsStringAsync());
Assert.Equal("http://localhost:5001", response.Headers.GetValues(CorsConstants.AccessControlAllowOrigin).FirstOrDefault()); Assert.Equal("http://localhost:5001", response.Headers.GetValues(CorsConstants.AccessControlAllowOrigin).FirstOrDefault());
} }
@ -124,7 +124,7 @@ namespace Microsoft.AspNetCore.Cors.Infrastructure
// Assert // Assert
response.EnsureSuccessStatusCode(); response.EnsureSuccessStatusCode();
Assert.Equal(1, response.Headers.Count()); Assert.Single(response.Headers);
Assert.Equal("http://localhost:5001", response.Headers.GetValues(CorsConstants.AccessControlAllowOrigin).FirstOrDefault()); Assert.Equal("http://localhost:5001", response.Headers.GetValues(CorsConstants.AccessControlAllowOrigin).FirstOrDefault());
} }
} }