Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace xUnit with mstest #1883

Merged
merged 19 commits into from
Mar 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion AsyncRx.NET/Directory.build.props
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</ItemGroup>

<ItemGroup Condition="'$(IsTestProject)' == 'true'">
<PackageReference Include="coverlet.collector" Version="3.1.0" />
<PackageReference Include="coverlet.collector" Version="3.2.0" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion Ix.NET/Source/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</ItemGroup>

<ItemGroup Condition="'$(IsTestProject)' == 'true'">
<PackageReference Include="coverlet.collector" Version="3.1.1" />
<PackageReference Include="coverlet.collector" Version="3.2.0" />
</ItemGroup>


Expand Down
13 changes: 7 additions & 6 deletions Rx.NET/Integration/LinuxTests/LinuxTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
<PackageReference Include="System.Reactive" Version="5.1.0-preview*" />
<PackageReference Include="Microsoft.Reactive.Testing" Version="5.1.0-preview*" />
<PackageReference Include="System.Reactive.Observable.Aliases" Version="5.1.0-preview*" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.0.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" />
<PackageReference Include="xunit.assert" Version="2.4.2" />
<PackageReference Include="System.Reactive" Version="6.0.0-preview*" />
<PackageReference Include="Microsoft.Reactive.Testing" Version="6.0.0-preview*" />
<PackageReference Include="System.Reactive.Observable.Aliases" Version="6.0.0-preview*" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
<PackageReference Include="System.Reactive" Version="5.1.0-preview*" />
<PackageReference Include="Microsoft.Reactive.Testing" Version="5.1.0-preview*" />
<PackageReference Include="System.Reactive.Observable.Aliases" Version="5.1.0-preview*" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.0.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" />
<PackageReference Include="xunit.assert" Version="2.4.2" />
<PackageReference Include="System.Reactive" Version="6.0.0-preview*" />
<PackageReference Include="Microsoft.Reactive.Testing" Version="6.0.0-preview*" />
<PackageReference Include="System.Reactive.Observable.Aliases" Version="6.0.0-preview*" />
</ItemGroup>
</Project>
3 changes: 3 additions & 0 deletions Rx.NET/Source/CodeCoverage.runsettings
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,7 @@
</DataCollector>
</DataCollectors>
</DataCollectionRunSettings>
<MSTest>
<TestTimeout>120000</TestTimeout>
</MSTest>
</RunSettings>
2 changes: 1 addition & 1 deletion Rx.NET/Source/Directory.build.props
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</ItemGroup>

<ItemGroup Condition="'$(IsTestProject)' == 'true'">
<PackageReference Include="coverlet.collector" Version="3.1.1" />
<PackageReference Include="coverlet.collector" Version="3.2.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT License.
// See the LICENSE file in the project root for more information.

namespace Xunit.Sdk
{
/// <summary>
/// Marker interface required by xUnit.
/// </summary>
/// <remarks>
/// <para>
/// The <c>xunit.assert.source</c> package normally includes this. However, unlike all the
/// other types that package adds to our project, this one type is declared to be
/// unconditionally public.
/// </para>
/// <para>
/// We think this might be a bug: https://github.com/xunit/xunit/issues/2703
/// </para>
/// <para>
/// In any case, we do not want our library to be exporting public types in the Xunit.Sdk
/// namespace. So the csproj file carefully excludes the Asserts/Sdk/IAssertionException.cs
/// file supplied by the package (which defines this type as <c>public</c>), and this file
/// supplies an equivalent but <c>internal</c> definition.
/// </para>
/// </remarks>
internal interface IAssertionException
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,19 @@
<PackageTags>Rx;Reactive;Extensions;Observable;LINQ;Events</PackageTags>
<Description>Reactive Extensions (Rx) for .NET - Testing Library</Description>
<!-- NB: A lot of CA warnings are disabled because of the .cs files included from xunit.assert.source. -->
<NoWarn>$(NoWarn);CA1305;CA1307;CA1032;CA1064;CA1822;CA1812</NoWarn>
<NoWarn>$(NoWarn);IDE0054;IDE0066;CA1305;CA1307;CA1032;CA1064;CA1822;CA1812;CA1823</NoWarn>
</PropertyGroup>

<ItemGroup>
<EmbeddedResource Include="Properties\*.xml" />
<PackageReference Include="xunit.assert.source" Version="2.4.1" PrivateAssets="All" />
<PackageReference Include="xunit.assert.source" Version="2.4.2" PrivateAssets="All" />
<ProjectReference Include="..\System.Reactive\System.Reactive.csproj" />
</ItemGroup>

<ItemGroup>
<!--
Workaround for https://github.com/xunit/xunit/issues/2703
-->
<Compile Remove="$(NuGetPackageRoot)xunit.assert.source\**\contentFiles\cs\**\Asserts\Sdk\IAssertionException.cs" />
</ItemGroup>
</Project>