diff --git a/src/NHamcrest.NUnit.Examples/NHamcrest.NUnit.Examples.csproj b/src/NHamcrest.NUnit.Examples/NHamcrest.NUnit.Examples.csproj index e8346de..890f8b8 100644 --- a/src/NHamcrest.NUnit.Examples/NHamcrest.NUnit.Examples.csproj +++ b/src/NHamcrest.NUnit.Examples/NHamcrest.NUnit.Examples.csproj @@ -4,7 +4,7 @@ net7.0 - + diff --git a/src/NHamcrest.NUnit/NHamcrest.NUnit.csproj b/src/NHamcrest.NUnit/NHamcrest.NUnit.csproj index dcfb82b..5963471 100644 --- a/src/NHamcrest.NUnit/NHamcrest.NUnit.csproj +++ b/src/NHamcrest.NUnit/NHamcrest.NUnit.csproj @@ -5,15 +5,15 @@ true False Copyright © 2023 - 3.2.0 - 3.2.0-$(VersionSuffix) + 3.3.0 + 3.3.0-$(VersionSuffix) Adapter for NUnit for using NHamcrest library Graham Hay, Algirdas Lašas, Constantin Tews https://github.com/nhamcrest/NHamcrest/blob/master/LICENCE.txt https://github.com/nhamcrest/NHamcrest unittesting hamcrest matcher test - 3.2.0.0 - 3.2.0.0 + 3.3.0.0 + 3.3.0.0 diff --git a/src/NHamcrest.Tests/NHamcrest.Tests.csproj b/src/NHamcrest.Tests/NHamcrest.Tests.csproj index 5ba09a3..14f3dc5 100644 --- a/src/NHamcrest.Tests/NHamcrest.Tests.csproj +++ b/src/NHamcrest.Tests/NHamcrest.Tests.csproj @@ -9,14 +9,14 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/src/NHamcrest.XUnit.Examples/NHamcrest.XUnit.Examples.csproj b/src/NHamcrest.XUnit.Examples/NHamcrest.XUnit.Examples.csproj index d08848b..e45ea57 100644 --- a/src/NHamcrest.XUnit.Examples/NHamcrest.XUnit.Examples.csproj +++ b/src/NHamcrest.XUnit.Examples/NHamcrest.XUnit.Examples.csproj @@ -4,9 +4,12 @@ net7.0 - - - + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/src/NHamcrest.XUnit/AssertEx.cs b/src/NHamcrest.XUnit/AssertEx.cs index e18b78f..ea16270 100644 --- a/src/NHamcrest.XUnit/AssertEx.cs +++ b/src/NHamcrest.XUnit/AssertEx.cs @@ -1,4 +1,5 @@ -using NHamcrest.Core; +using Xunit.Sdk; +using NHamcrest.Core; namespace NHamcrest.XUnit { @@ -13,7 +14,7 @@ public class Assert : Xunit.Assert /// /// /// - /// + /// public static void That(T actual, IMatcher matcher) { That(actual, matcher, null); @@ -26,6 +27,7 @@ public static void That(T actual, IMatcher matcher) /// /// /// + /// public static void That(T actual, IMatcher matcher, string message) { That(actual, matcher, message, null); @@ -39,7 +41,7 @@ public static void That(T actual, IMatcher matcher, string message) /// /// /// - /// + /// public static void That(T actual, IMatcher matcher, string message, params object[] args) { if (matcher.Matches(actual)) @@ -55,7 +57,7 @@ public static void That(T actual, IMatcher matcher, string message, params ? string.Format(message, args) : message; - throw new MatchException(description.ToString(), mismatchDescription.ToString(), userMessage); + throw EqualException.ForMismatchedValues(description.ToString(), mismatchDescription.ToString(), userMessage); } } } \ No newline at end of file diff --git a/src/NHamcrest.XUnit/MatchException.cs b/src/NHamcrest.XUnit/MatchException.cs deleted file mode 100644 index 408d0fe..0000000 --- a/src/NHamcrest.XUnit/MatchException.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Xunit.Sdk; - -namespace NHamcrest.XUnit -{ - /// - /// MatchException that derives from AssertActualExpectedException for NHamcrest purposes. - /// - public class MatchException : AssertActualExpectedException - { - /// - /// Instantiates a new MatchException. - /// - /// - /// - /// - public MatchException(object expected, object actual, string userMessage) : base(expected, actual, userMessage) - { - } - } -} \ No newline at end of file diff --git a/src/NHamcrest.XUnit/NHamcrest.XUnit.csproj b/src/NHamcrest.XUnit/NHamcrest.XUnit.csproj index 59ce78b..b796831 100644 --- a/src/NHamcrest.XUnit/NHamcrest.XUnit.csproj +++ b/src/NHamcrest.XUnit/NHamcrest.XUnit.csproj @@ -5,18 +5,18 @@ true False Copyright © 2023 - 3.2.0 - 3.2.0-$(VersionSuffix) + 3.3.0 + 3.3.0-$(VersionSuffix) Adapter for xunit for using NHamcrest library Graham Hay, Algirdas Lašas, Constantin Tews https://github.com/nhamcrest/NHamcrest/blob/master/LICENCE.txt https://github.com/nhamcrest/NHamcrest unittesting hamcrest matcher test - 3.2.0.0 - 3.2.0.0 + 3.3.0.0 + 3.3.0.0 - + diff --git a/src/NHamcrest/NHamcrest.csproj b/src/NHamcrest/NHamcrest.csproj index 9512c98..ea8a47e 100644 --- a/src/NHamcrest/NHamcrest.csproj +++ b/src/NHamcrest/NHamcrest.csproj @@ -5,15 +5,15 @@ true False Copyright © 2023 - 3.2.0 - 3.2.0-$(VersionSuffix) + 3.3.0 + 3.3.0-$(VersionSuffix) .NET port of Hamcrest, a matcher library with some extra matchers Graham Hay, Algirdas Lašas, Constantin Tews https://github.com/nhamcrest/NHamcrest/blob/master/LICENCE.txt https://github.com/nhamcrest/NHamcrest unittesting hamcrest matcher test - 3.2.0.0 - 3.2.0.0 + 3.3.0.0 + 3.3.0.0 1701;1702;1705;1591