Upgrade test framework versions and fix test issues (#453)
This commit is contained in:
parent
04863032a2
commit
ef7a3514cd
|
|
@ -10,7 +10,15 @@
|
|||
<MoqVersion>4.7.1</MoqVersion>
|
||||
<NETStandardImplicitPackageVersion>$(BundledNETStandardPackageVersion)</NETStandardImplicitPackageVersion>
|
||||
<RedisVersion>1.2.3</RedisVersion>
|
||||
<TestSdkVersion>15.0.0</TestSdkVersion>
|
||||
<XunitVersion>2.2.0</XunitVersion>
|
||||
<TestSdkVersion>15.3.0-*</TestSdkVersion>
|
||||
<XunitVersion>2.3.0-beta2-*</XunitVersion>
|
||||
|
||||
<!--
|
||||
TODO remove in next update of xunit
|
||||
Prevent bug in xunit.analyzer from failing the build.
|
||||
Should be fixed by https://github.com/xunit/xunit.analyzers/pull/52
|
||||
-->
|
||||
<NoWarn>$(NoWarn);AD0001</NoWarn>
|
||||
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
|
|||
var ex = await Assert.ThrowsAnyAsync<Exception>(
|
||||
async () => await connection.Invoke<object>("!@#$%"));
|
||||
|
||||
Assert.Equal(ex.Message, "Unknown hub method '!@#$%'");
|
||||
Assert.Equal("Unknown hub method '!@#$%'", ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,9 +4,6 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<!-- TODO remove when https://github.com/Microsoft/vstest/issues/428 is resolved -->
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
@ -29,8 +26,4 @@
|
|||
<PackageReference Include="xunit" Version="$(XunitVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ namespace Microsoft.AspNetCore.Sockets.Client.Tests
|
|||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(0)]
|
||||
[InlineData((TransportType)0)]
|
||||
[InlineData(TransportType.All + 1)]
|
||||
public async Task CannotStartConnectionWithInvalidTransportType(TransportType requestedTransportType)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,9 +4,6 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<!-- TODO remove when https://github.com/Microsoft/vstest/issues/428 is resolved -->
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
@ -25,8 +22,4 @@
|
|||
<PackageReference Include="xunit" Version="$(XunitVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ namespace Microsoft.AspNetCore.Client.Tests
|
|||
});
|
||||
|
||||
task.Wait();
|
||||
Assert.Equal(n, 2);
|
||||
Assert.Equal(2, n);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,9 +5,6 @@
|
|||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp2.0;net46</TargetFrameworks>
|
||||
<TargetFrameworks Condition="'$(OS)' != 'Windows_NT'">netcoreapp2.0</TargetFrameworks>
|
||||
<!-- TODO remove when https://github.com/Microsoft/vstest/issues/428 is resolved -->
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
@ -24,8 +21,4 @@
|
|||
<PackageReference Include="System.ValueTuple" Version="$(CoreFxVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace Microsoft.AspNetCore.SignalR.Tests
|
|||
public class DefaultTransportFactoryTests
|
||||
{
|
||||
[Theory]
|
||||
[InlineData(0)]
|
||||
[InlineData((TransportType)0)]
|
||||
[InlineData(TransportType.All + 1)]
|
||||
public void DefaultTransportFactoryCannotBeCreatedWithInvalidTransportType(TransportType transportType)
|
||||
{
|
||||
|
|
@ -28,7 +28,7 @@ namespace Microsoft.AspNetCore.SignalR.Tests
|
|||
var exception = Assert.Throws<ArgumentNullException>(
|
||||
() => new DefaultTransportFactory(TransportType.All, new LoggerFactory(), httpClient: null));
|
||||
|
||||
Assert.Equal(exception.ParamName, "httpClient");
|
||||
Assert.Equal("httpClient", exception.ParamName);
|
||||
}
|
||||
|
||||
[ConditionalTheory]
|
||||
|
|
|
|||
|
|
@ -4,11 +4,6 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<!-- TODO remove when https://github.com/Microsoft/vstest/issues/428 is resolved -->
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
||||
<!-- TODO remove when https://github.com/dotnet/sdk/issues/909 is resolved -->
|
||||
<OutputType>Exe</OutputType>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
@ -36,8 +31,4 @@
|
|||
<PackageReference Include="xunit" Version="$(XunitVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -4,9 +4,6 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<!-- TODO remove when https://github.com/Microsoft/vstest/issues/428 is resolved -->
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
@ -21,8 +18,4 @@
|
|||
<PackageReference Include="xunit" Version="$(XunitVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ namespace Microsoft.AspNetCore.Sockets.Tests
|
|||
Assert.NotNull(state.Connection.Transport);
|
||||
|
||||
await state.DisposeAsync();
|
||||
Assert.Equal(state.Status, ConnectionState.ConnectionStatus.Disposed);
|
||||
Assert.Equal(ConnectionState.ConnectionStatus.Disposed, state.Status);
|
||||
}
|
||||
|
||||
private static ConnectionManager CreateConnectionManager()
|
||||
|
|
|
|||
|
|
@ -4,9 +4,6 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<!-- TODO remove when https://github.com/Microsoft/vstest/issues/428 is resolved -->
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
@ -25,8 +22,4 @@
|
|||
<PackageReference Include="xunit" Version="$(XunitVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<Import Project="..\..\build\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<!-- TODO remove when https://github.com/Microsoft/vstest/issues/428 is resolved -->
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Server.IntegrationTesting" Version="$(AspNetCoreIntegrationTestingVersion)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Testing" Version="$(AspNetCoreVersion)" />
|
||||
|
|
@ -17,8 +17,5 @@
|
|||
<PackageReference Include="xunit.runner.visualstudio" Version="$(XunitVersion)" />
|
||||
<PackageReference Include="xunit" Version="$(XunitVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -4,9 +4,6 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<!-- TODO remove when https://github.com/Microsoft/vstest/issues/428 is resolved -->
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
@ -22,8 +19,4 @@
|
|||
<PackageReference Include="xunit" Version="$(XunitVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
Loading…
Reference in New Issue