diff --git a/Base.Tests/Base.Tests.csproj b/Base.Tests/Base.Tests.csproj index e3853c0..4a92390 100644 --- a/Base.Tests/Base.Tests.csproj +++ b/Base.Tests/Base.Tests.csproj @@ -10,10 +10,10 @@ - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Base.Tests/Structures/MaybeExtensionTests.cs b/Base.Tests/Structures/MaybeExtensionTests.cs index cf817d6..cc1814b 100644 --- a/Base.Tests/Structures/MaybeExtensionTests.cs +++ b/Base.Tests/Structures/MaybeExtensionTests.cs @@ -11,22 +11,22 @@ public class MaybeExtensionTests [Test] public void EnumerableFirstOrEmptyTests() { - Assert.AreEqual(Maybe.Empty(), Array.Empty().FirstOrEmpty()); - Assert.AreEqual(Maybe.Create("banana"), new[] { "banana" }.FirstOrEmpty()); + Assert.That(Array.Empty().FirstOrEmpty(), Is.EqualTo(Maybe.Empty())); + Assert.That(new[] { "banana" }.FirstOrEmpty(), Is.EqualTo(Maybe.Create("banana"))); } [Test] public void TestToMaybe() { - Assert.AreEqual(Maybe.Empty(), Maybe.Empty()); - Assert.AreNotEqual(Maybe.Create(293921), Maybe.Create(2)); + Assert.That(Maybe.Empty(), Is.EqualTo(Maybe.Empty())); + Assert.That(Maybe.Create(2), Is.Not.EqualTo(Maybe.Create(293921))); } [Test] public void MaybeNullableTests() { - Assert.IsNull(Maybe.Empty().ToNullable()); - Assert.IsNull(Maybe.Create(0, evalIsEmpty: () => true).ToNullable()); + Assert.That(Maybe.Empty().ToNullable(), Is.Null); + Assert.That(Maybe.Create(0, evalIsEmpty: () => true).ToNullable(), Is.Null); } [Test] diff --git a/Base.Tests/Structures/NullableExtensionTests.cs b/Base.Tests/Structures/NullableExtensionTests.cs index c681cf1..d18e9d4 100644 --- a/Base.Tests/Structures/NullableExtensionTests.cs +++ b/Base.Tests/Structures/NullableExtensionTests.cs @@ -7,12 +7,16 @@ namespace Base.Tests.Structures; public class NullableExtensionTests { [Test] - public void TestNullableStructOfNullToMaybe() => - Assert.AreEqual(Maybe.Empty(), ((int?)null).ToMaybe()); - + public void TestNullableStructOfNullToMaybe() + { + Assert.That(((int?)null).ToMaybe(), Is.EqualTo(Maybe.Empty())); + } + [Test] - public void TestNullableStructOfValueToMaybe() => - Assert.AreEqual(Maybe.Create(25), ((int?)25).ToMaybe()); + public void TestNullableStructOfValueToMaybe() + { + Assert.That(((int?)25).ToMaybe(), Is.EqualTo(Maybe.Create(25))); + } [Test] public void TestNullableReferenceOfNullAsMaybe()