Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

Commit

Permalink
Upgrade test framework versions and fix test issues (#453)
Browse files Browse the repository at this point in the history
  • Loading branch information
natemcmaster authored May 15, 2017
1 parent 0486303 commit ef7a351
Show file tree
Hide file tree
Showing 14 changed files with 21 additions and 67 deletions.
12 changes: 10 additions & 2 deletions build/dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public async Task ServerClosesConnectionIfHubMethodCannotBeResolved()
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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -29,8 +26,4 @@
<PackageReference Include="xunit" Version="$(XunitVersion)" />
</ItemGroup>

<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void ConnectionReturnsUrlUsedToStartTheConnection()
}

[Theory]
[InlineData(0)]
[InlineData((TransportType)0)]
[InlineData(TransportType.All + 1)]
public async Task CannotStartConnectionWithInvalidTransportType(TransportType requestedTransportType)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -25,8 +22,4 @@
<PackageReference Include="xunit" Version="$(XunitVersion)" />
</ItemGroup>

<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void TaskQueueRunsTasksInSequence()
});

task.Wait();
Assert.Equal(n, 2);
Assert.Equal(2, n);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -24,8 +21,4 @@
<PackageReference Include="System.ValueTuple" Version="$(CoreFxVersion)" />
</ItemGroup>

<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -28,7 +28,7 @@ public void DefaultTransportFactoryCannotBeCreatedWithoutHttpClient()
var exception = Assert.Throws<ArgumentNullException>(
() => new DefaultTransportFactory(TransportType.All, new LoggerFactory(), httpClient: null));

Assert.Equal(exception.ParamName, "httpClient");
Assert.Equal("httpClient", exception.ParamName);
}

[ConditionalTheory]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -36,8 +31,4 @@
<PackageReference Include="xunit" Version="$(XunitVersion)" />
</ItemGroup>

<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -21,8 +18,4 @@
<PackageReference Include="xunit" Version="$(XunitVersion)" />
</ItemGroup>

<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public async Task DisposeInactiveConnection()
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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -25,8 +22,4 @@
<PackageReference Include="xunit" Version="$(XunitVersion)" />
</ItemGroup>

<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -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)" />
Expand All @@ -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>
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -22,8 +19,4 @@
<PackageReference Include="xunit" Version="$(XunitVersion)" />
</ItemGroup>

<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

</Project>

0 comments on commit ef7a351

Please sign in to comment.