Skip to content

Commit 38d4eb6

Browse files
authored
Merge pull request #20 from CaptnCodr/feature/update-xunit
Update xunit to version 2.5.0
2 parents 7882e6e + ec5959c commit 38d4eb6

File tree

8 files changed

+29
-44
lines changed

8 files changed

+29
-44
lines changed

src/NHamcrest.NUnit.Examples/NHamcrest.NUnit.Examples.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<TargetFramework>net7.0</TargetFramework>
55
</PropertyGroup>
66
<ItemGroup>
7-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />
7+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
88
<PackageReference Include="NUnit" Version="3.13.3" />
99
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
1010
</ItemGroup>

src/NHamcrest.NUnit/NHamcrest.NUnit.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
<GenerateDocumentationFile>true</GenerateDocumentationFile>
66
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
77
<Copyright>Copyright © 2023</Copyright>
8-
<Version Condition="'$(VersionSuffix)' == ''">3.2.0</Version>
9-
<Version Condition="'$(VersionSuffix)' != ''">3.2.0-$(VersionSuffix)</Version>
8+
<Version Condition="'$(VersionSuffix)' == ''">3.3.0</Version>
9+
<Version Condition="'$(VersionSuffix)' != ''">3.3.0-$(VersionSuffix)</Version>
1010
<Description>Adapter for NUnit for using NHamcrest library</Description>
1111
<Authors>Graham Hay, Algirdas Lašas, Constantin Tews</Authors>
1212
<PackageLicenseUrl>https://github.com/nhamcrest/NHamcrest/blob/master/LICENCE.txt</PackageLicenseUrl>
1313
<PackageProjectUrl>https://github.com/nhamcrest/NHamcrest</PackageProjectUrl>
1414
<PackageTags>unittesting hamcrest matcher test</PackageTags>
15-
<AssemblyVersion>3.2.0.0</AssemblyVersion>
16-
<FileVersion>3.2.0.0</FileVersion>
15+
<AssemblyVersion>3.3.0.0</AssemblyVersion>
16+
<FileVersion>3.3.0.0</FileVersion>
1717
</PropertyGroup>
1818
<ItemGroup>
1919
<PackageReference Include="NUnit" Version="3.13.3" />

src/NHamcrest.Tests/NHamcrest.Tests.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
<Compile Remove="FeatureMatcherTests.cs" />
1010
</ItemGroup>
1111
<ItemGroup>
12-
<PackageReference Include="xunit" Version="2.4.2" />
13-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
12+
<PackageReference Include="xunit" Version="2.5.0" />
13+
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0">
1414
<PrivateAssets>all</PrivateAssets>
1515
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1616
</PackageReference>
1717
<PackageReference Include="Castle.Core" Version="5.1.1" />
1818
<PackageReference Include="Moq" Version="4.18.4" />
19-
<PackageReference Include="Microsoft.NET.TEST.Sdk" Version="17.6.2" />
19+
<PackageReference Include="Microsoft.NET.TEST.Sdk" Version="17.6.3" />
2020
</ItemGroup>
2121
<ItemGroup>
2222
<ProjectReference Include="..\NHamcrest.XUnit\NHamcrest.XUnit.csproj" />

src/NHamcrest.XUnit.Examples/NHamcrest.XUnit.Examples.csproj

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@
44
<TargetFramework>net7.0</TargetFramework>
55
</PropertyGroup>
66
<ItemGroup>
7-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />
8-
<PackageReference Include="xunit" Version="2.4.2" />
9-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" />
7+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
8+
<PackageReference Include="xunit" Version="2.5.0" />
9+
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0">
10+
<PrivateAssets>all</PrivateAssets>
11+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
12+
</PackageReference>
1013
</ItemGroup>
1114
<ItemGroup>
1215
<ProjectReference Include="..\NHamcrest.XUnit\NHamcrest.XUnit.csproj" />

src/NHamcrest.XUnit/AssertEx.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using NHamcrest.Core;
1+
using Xunit.Sdk;
2+
using NHamcrest.Core;
23

34
namespace NHamcrest.XUnit
45
{
@@ -13,7 +14,7 @@ public class Assert : Xunit.Assert
1314
/// <typeparam name="T"></typeparam>
1415
/// <param name="actual"></param>
1516
/// <param name="matcher"></param>
16-
/// <exception cref="MatchException"></exception>
17+
/// <exception cref="EqualException"></exception>
1718
public static void That<T>(T actual, IMatcher<T> matcher)
1819
{
1920
That(actual, matcher, null);
@@ -26,6 +27,7 @@ public static void That<T>(T actual, IMatcher<T> matcher)
2627
/// <param name="actual"></param>
2728
/// <param name="matcher"></param>
2829
/// <param name="message"></param>
30+
/// <exception cref="EqualException"></exception>
2931
public static void That<T>(T actual, IMatcher<T> matcher, string message)
3032
{
3133
That(actual, matcher, message, null);
@@ -39,7 +41,7 @@ public static void That<T>(T actual, IMatcher<T> matcher, string message)
3941
/// <param name="matcher"></param>
4042
/// <param name="message"></param>
4143
/// <param name="args"></param>
42-
/// <exception cref="MatchException"></exception>
44+
/// <exception cref="EqualException"></exception>
4345
public static void That<T>(T actual, IMatcher<T> matcher, string message, params object[] args)
4446
{
4547
if (matcher.Matches(actual))
@@ -55,7 +57,7 @@ public static void That<T>(T actual, IMatcher<T> matcher, string message, params
5557
? string.Format(message, args)
5658
: message;
5759

58-
throw new MatchException(description.ToString(), mismatchDescription.ToString(), userMessage);
60+
throw EqualException.ForMismatchedValues(description.ToString(), mismatchDescription.ToString(), userMessage);
5961
}
6062
}
6163
}

src/NHamcrest.XUnit/MatchException.cs

Lines changed: 0 additions & 20 deletions
This file was deleted.

src/NHamcrest.XUnit/NHamcrest.XUnit.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@
55
<GenerateDocumentationFile>true</GenerateDocumentationFile>
66
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
77
<Copyright>Copyright © 2023</Copyright>
8-
<Version Condition="'$(VersionSuffix)' == ''">3.2.0</Version>
9-
<Version Condition="'$(VersionSuffix)' != ''">3.2.0-$(VersionSuffix)</Version>
8+
<Version Condition="'$(VersionSuffix)' == ''">3.3.0</Version>
9+
<Version Condition="'$(VersionSuffix)' != ''">3.3.0-$(VersionSuffix)</Version>
1010
<Description>Adapter for xunit for using NHamcrest library</Description>
1111
<Authors>Graham Hay, Algirdas Lašas, Constantin Tews</Authors>
1212
<PackageLicenseUrl>https://github.com/nhamcrest/NHamcrest/blob/master/LICENCE.txt</PackageLicenseUrl>
1313
<PackageProjectUrl>https://github.com/nhamcrest/NHamcrest</PackageProjectUrl>
1414
<PackageTags>unittesting hamcrest matcher test</PackageTags>
15-
<AssemblyVersion>3.2.0.0</AssemblyVersion>
16-
<FileVersion>3.2.0.0</FileVersion>
15+
<AssemblyVersion>3.3.0.0</AssemblyVersion>
16+
<FileVersion>3.3.0.0</FileVersion>
1717
</PropertyGroup>
1818
<ItemGroup>
19-
<PackageReference Include="xunit.assert" Version="2.4.2" />
19+
<PackageReference Include="xunit.assert" Version="2.5.0" />
2020
</ItemGroup>
2121
<ItemGroup>
2222
<ProjectReference Include="..\NHamcrest\NHamcrest.csproj" />

src/NHamcrest/NHamcrest.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
<GenerateDocumentationFile>true</GenerateDocumentationFile>
66
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
77
<Copyright>Copyright © 2023</Copyright>
8-
<Version Condition="'$(VersionSuffix)' == ''">3.2.0</Version>
9-
<Version Condition="'$(VersionSuffix)' != ''">3.2.0-$(VersionSuffix)</Version>
8+
<Version Condition="'$(VersionSuffix)' == ''">3.3.0</Version>
9+
<Version Condition="'$(VersionSuffix)' != ''">3.3.0-$(VersionSuffix)</Version>
1010
<Description>.NET port of Hamcrest, a matcher library with some extra matchers</Description>
1111
<Authors>Graham Hay, Algirdas Lašas, Constantin Tews</Authors>
1212
<PackageLicenseUrl>https://github.com/nhamcrest/NHamcrest/blob/master/LICENCE.txt</PackageLicenseUrl>
1313
<PackageProjectUrl>https://github.com/nhamcrest/NHamcrest</PackageProjectUrl>
1414
<PackageTags>unittesting hamcrest matcher test</PackageTags>
15-
<AssemblyVersion>3.2.0.0</AssemblyVersion>
16-
<FileVersion>3.2.0.0</FileVersion>
15+
<AssemblyVersion>3.3.0.0</AssemblyVersion>
16+
<FileVersion>3.3.0.0</FileVersion>
1717
</PropertyGroup>
1818
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
1919
<NoWarn>1701;1702;1705;1591</NoWarn>

0 commit comments

Comments
 (0)