diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index b5307bab..4b5b04a7 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -79,11 +79,11 @@ jobs: - name: Pack TaggedUnion run: dotnet pack ./src/*/*/TaggedUnion.csproj --no-restore -o ~/nuget -c Release - - name: Restore TaggedUnion.Tests - run: dotnet restore ./src/*/*/TaggedUnion.Tests.csproj + - name: Restore TaggedUnion.Tests.Old + run: dotnet restore ./src/*/*/TaggedUnion.Tests.Old.csproj - - name: Test TaggedUnion.Tests - run: dotnet test ./src/*/*/TaggedUnion.Tests.csproj --no-restore -c Release + - name: Test TaggedUnion.Tests.Old + run: dotnet test ./src/*/*/TaggedUnion.Tests.Old.csproj --no-restore -c Release # Result diff --git a/src/core-taggeds-union/TaggedUnion.Tests.Old/GlobalUsings.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/GlobalUsings.cs new file mode 100644 index 00000000..79c0d7cf --- /dev/null +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/GlobalUsings.cs @@ -0,0 +1,2 @@ +global using NUnit.Framework; +global using NUnit.Framework.Legacy; \ No newline at end of file diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Extensions.Obsolete.Test/OrInitialize.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Extensions.Obsolete.Test/OrInitialize.cs similarity index 85% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Extensions.Obsolete.Test/OrInitialize.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Extensions.Obsolete.Test/OrInitialize.cs index 581cc5b7..1b543c3e 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Extensions.Obsolete.Test/OrInitialize.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Extensions.Obsolete.Test/OrInitialize.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; @@ -13,7 +12,7 @@ public void OrInitialize_OtherFactoryIsNull_ExpectArgumentNullException( TaggedUnion source) { var ex = Assert.Throws(() => _ = TaggedUnionExtensions.OrInitialize(source, null!)); - Assert.AreEqual("otherFactory", ex!.ParamName); + ClassicAssert.AreEqual("otherFactory", ex!.ParamName); } [Test] @@ -23,7 +22,7 @@ public void OrInitialize_SourceIsFirst_ExpectSource() var other = TaggedUnion.Second(SomeTextStructType); var actual = TaggedUnionExtensions.OrInitialize(source, () => other); - Assert.AreEqual(source, actual); + ClassicAssert.AreEqual(source, actual); } [Test] @@ -33,7 +32,7 @@ public void OrInitialize_SourceIsSecond_ExpectSource() var other = TaggedUnion.Second(PlusFifteenIdRefType); var actual = TaggedUnionExtensions.OrInitialize(source, () => other); - Assert.AreEqual(source, actual); + ClassicAssert.AreEqual(source, actual); } [Test] @@ -43,6 +42,6 @@ public void OrInitialize_SourceIsDefault_ExpectOther() var other = TaggedUnion.First(new object()); var actual = TaggedUnionExtensions.OrInitialize(source, () => other); - Assert.AreEqual(other, actual); + ClassicAssert.AreEqual(other, actual); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Extensions.Obsolete.Test/OrInitializeAsync.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Extensions.Obsolete.Test/OrInitializeAsync.cs similarity index 86% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Extensions.Obsolete.Test/OrInitializeAsync.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Extensions.Obsolete.Test/OrInitializeAsync.cs index e77053eb..110892f9 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Extensions.Obsolete.Test/OrInitializeAsync.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Extensions.Obsolete.Test/OrInitializeAsync.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; using static PrimeFuncPack.UnitTest.TestData; @@ -14,7 +13,7 @@ public void OrInitializeAsync_OtherFactoryAsyncIsNull_ExpectArgumentNullExceptio TaggedUnion source) { var ex = Assert.ThrowsAsync(async () => _ = await TaggedUnionExtensions.OrInitializeAsync(source, null!)); - Assert.AreEqual("otherFactoryAsync", ex!.ParamName); + ClassicAssert.AreEqual("otherFactoryAsync", ex!.ParamName); } [Test] @@ -24,7 +23,7 @@ public async Task OrInitializeAsync_SourceIsFirst_ExpectSource() var other = TaggedUnion.First(ZeroIdRefType); var actual = await TaggedUnionExtensions.OrInitializeAsync(source, () => Task.FromResult(other)); - Assert.AreEqual(source, actual); + ClassicAssert.AreEqual(source, actual); } [Test] @@ -34,7 +33,7 @@ public async Task OrInitializeAsync_SourceIsSecond_ExpectSource() var other = default(TaggedUnion); var actual = await TaggedUnionExtensions.OrInitializeAsync(source, () => Task.FromResult(other)); - Assert.AreEqual(source, actual); + ClassicAssert.AreEqual(source, actual); } [Test] @@ -44,6 +43,6 @@ public async Task OrInitializeAsync_SourceIsDefault_ExpectOther() var other = TaggedUnion.Second(new RefType()); var actual = await TaggedUnionExtensions.OrInitializeAsync(source, () => Task.FromResult(other)); - Assert.AreEqual(other, actual); + ClassicAssert.AreEqual(other, actual); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Extensions.Obsolete.Test/OrInitializeValueAsync.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Extensions.Obsolete.Test/OrInitializeValueAsync.cs similarity index 87% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Extensions.Obsolete.Test/OrInitializeValueAsync.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Extensions.Obsolete.Test/OrInitializeValueAsync.cs index e9d5f04d..1f34ec7c 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Extensions.Obsolete.Test/OrInitializeValueAsync.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Extensions.Obsolete.Test/OrInitializeValueAsync.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; using static PrimeFuncPack.UnitTest.TestData; @@ -14,7 +13,7 @@ public void OrInitializeValueAsync_OtherFactoryAsyncIsNull_ExpectArgumentNullExc TaggedUnion source) { var ex = Assert.ThrowsAsync(async () => _ = await TaggedUnionExtensions.OrInitializeValueAsync(source, null!)); - Assert.AreEqual("otherFactoryAsync", ex!.ParamName); + ClassicAssert.AreEqual("otherFactoryAsync", ex!.ParamName); } [Test] @@ -24,7 +23,7 @@ public async Task OrInitializeValueAsync_SourceIsFirst_ExpectSource() var other = default(TaggedUnion); var actual = await TaggedUnionExtensions.OrInitializeValueAsync(source, () => ValueTask.FromResult(other)); - Assert.AreEqual(source, actual); + ClassicAssert.AreEqual(source, actual); } [Test] @@ -34,7 +33,7 @@ public async Task OrInitializeValueAsync_SourceIsSecond_ExpectSource() var other = TaggedUnion.Second(SomeTextStructType); var actual = await TaggedUnionExtensions.OrInitializeValueAsync(source, () => ValueTask.FromResult(other)); - Assert.AreEqual(source, actual); + ClassicAssert.AreEqual(source, actual); } [Test] @@ -44,6 +43,6 @@ public async Task OrInitializeValueAsync_SourceIsDefault_ExpectOther() var other = TaggedUnion.First(MinusFifteenIdRefType); var actual = await TaggedUnionExtensions.OrInitializeValueAsync(source, () => ValueTask.FromResult(other)); - Assert.AreEqual(other, actual); + ClassicAssert.AreEqual(other, actual); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Extensions.Obsolete.Test/Test.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Extensions.Obsolete.Test/Test.cs similarity index 100% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Extensions.Obsolete.Test/Test.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Extensions.Obsolete.Test/Test.cs diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Static.Test/Equals.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Static.Test/Equals.cs similarity index 90% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Static.Test/Equals.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Static.Test/Equals.cs index d5ba1664..8ce98f12 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Static.Test/Equals.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Static.Test/Equals.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; @@ -14,7 +13,7 @@ public void Equals_UnionAIsDefaultAndUnionBIsDefault_ExpectTrue() var unionB = new TaggedUnion(); var actual = TaggedUnion.Equals(unionA, unionB); - Assert.True(actual); + ClassicAssert.True(actual); } [Test] @@ -26,7 +25,7 @@ public void Equals_UnionAFirstValueEqualsUnionBFirstValue_ExpectTrue( var unionB = TaggedUnion.First(sourceValue); var actual = TaggedUnion.Equals(unionA, unionB); - Assert.True(actual); + ClassicAssert.True(actual); } [Test] @@ -47,7 +46,7 @@ public void Equals_UnionASecondValueEqualsUnionBSecondValue_ExpectTrue() var unionB = (TaggedUnion)bValue; var actual = TaggedUnion.Equals(unionA, unionB); - Assert.True(actual); + ClassicAssert.True(actual); } [Test] @@ -57,7 +56,7 @@ public void Equals_UnionAIsDefaultAndUnionBIsFirst_ExpectFalse() var unionB = TaggedUnion.First(null); var actual = TaggedUnion.Equals(unionA, unionB); - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -67,7 +66,7 @@ public void Equals_UnionAIsDefaultAndUnionBIsSecond_ExpectFalse() var unionB = TaggedUnion.Second(default); var actual = TaggedUnion.Equals(unionA, unionB); - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -77,7 +76,7 @@ public void Equals_UnionAIsFirstAndUnionBIsDefault_ExpectFalse() var unionB = default(TaggedUnion); var actual = TaggedUnion.Equals(unionA, unionB); - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -87,7 +86,7 @@ public void Equals_UnionAIsFirstAndUnionBIsSecond_ExpectFalse() var unionB = TaggedUnion.Second(SomeTextStructType); var actual = TaggedUnion.Equals(unionA, unionB); - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -97,7 +96,7 @@ public void Equals_UnionAIsSecondAndUnionBIsDefault_ExpectFalse() var unionB = default(TaggedUnion); var actual = TaggedUnion.Equals(unionA, unionB); - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -107,7 +106,7 @@ public void Equals_UnionAIsSecondAndUnionBIsFirst_ExpectFalse() var unionB = TaggedUnion.First(ZeroIdRefType); var actual = TaggedUnion.Equals(unionA, unionB); - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -128,7 +127,7 @@ public void Equals_UnionAFirstValueIsNotEqualUnionBFirstValue_ExpectFalse() var unionB = TaggedUnion.First(bValue); var actual = TaggedUnion.Equals(unionA, unionB); - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -147,6 +146,6 @@ public void Equals_UnionASecondValueIsNotEqualUnionBSecondValue_ExpectFalse() var unionB = TaggedUnion.Second(bValue); var actual = TaggedUnion.Equals(unionA, unionB); - Assert.False(actual); + ClassicAssert.False(actual); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Static.Test/Test.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Static.Test/Test.cs similarity index 100% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Static.Test/Test.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Static.Test/Test.cs diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Equality/Equality.Static.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Equality/Equality.Static.cs similarity index 90% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Equality/Equality.Static.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Equality/Equality.Static.cs index 09f4d294..ffbcf648 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Equality/Equality.Static.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Equality/Equality.Static.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; @@ -14,7 +13,7 @@ public void EqualsStatic_UnionAIsDefaultAndUnionBIsDefault_ExpectTrue() var unionB = new TaggedUnion(); var actual = TaggedUnion.Equals(unionA, unionB); - Assert.True(actual); + ClassicAssert.True(actual); } [Test] @@ -33,7 +32,7 @@ public void EqualsStatic_UnionAFirstValueEqualsUnionBFirstValue_ExpectTrue() var unionB = (TaggedUnion)bValue; var actual = TaggedUnion.Equals(unionA, unionB); - Assert.True(actual); + ClassicAssert.True(actual); } [Test] @@ -43,7 +42,7 @@ public void EqualsStatic_UnionASecondValueEqualsUnionBSecondValue_ExpectTrue() var unionB = (TaggedUnion)MinusFifteenIdRefType; var actual = TaggedUnion.Equals(unionA, unionB); - Assert.True(actual); + ClassicAssert.True(actual); } [Test] @@ -53,7 +52,7 @@ public void EqualsStatic_UnionAIsDefaultAndUnionBIsFirst_ExpectFalse() var unionB = TaggedUnion.First(default); var actual = TaggedUnion.Equals(unionA, unionB); - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -63,7 +62,7 @@ public void EqualsStatic_UnionAIsDefaultAndUnionBIsSecond_ExpectFalse() var unionB = TaggedUnion.Second(null); var actual = TaggedUnion.Equals(unionA, unionB); - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -73,7 +72,7 @@ public void EqualsStatic_UnionAIsFirstAndUnionBIsDefault_ExpectFalse() var unionB = default(TaggedUnion); var actual = TaggedUnion.Equals(unionA, unionB); - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -83,7 +82,7 @@ public void EqualsStatic_UnionAIsFirstAndUnionBIsSecond_ExpectFalse() var unionB = TaggedUnion.Second(PlusFifteenIdRefType); var actual = TaggedUnion.Equals(unionA, unionB); - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -93,7 +92,7 @@ public void EqualsStatic_UnionAIsSecondAndUnionBIsDefault_ExpectFalse() var unionB = default(TaggedUnion); var actual = TaggedUnion.Equals(unionA, unionB); - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -103,7 +102,7 @@ public void EqualsStatic_UnionAIsSecondAndUnionBIsFirst_ExpectFalse() var unionB = TaggedUnion.First(SomeTextStructType); var actual = TaggedUnion.Equals(unionA, unionB); - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -124,7 +123,7 @@ public void EqualsStatic_UnionAFirstValueIsNotEqualUnionBFirstValue_ExpectFalse( var unionB = TaggedUnion.First(bValue); var actual = TaggedUnion.Equals(unionA, unionB); - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -143,6 +142,6 @@ public void EqualsStatic_UnionASecondValueIsNotEqualUnionBSecondValue_ExpectFals var unionB = TaggedUnion.Second(bValue); var actual = TaggedUnion.Equals(unionA, unionB); - Assert.False(actual); + ClassicAssert.False(actual); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Equality/Equality.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Equality/Equality.cs similarity index 89% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Equality/Equality.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Equality/Equality.cs index 67dbc5b9..d905d451 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Equality/Equality.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Equality/Equality.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; @@ -14,7 +13,7 @@ public void Equality_UnionAIsDefaultAndUnionBIsDefault_ExpectTrue() var unionB = default(TaggedUnion); var actual = unionA == unionB; - Assert.True(actual); + ClassicAssert.True(actual); } [Test] @@ -33,7 +32,7 @@ public void Equality_UnionAFirstValueEqualsUnionBFirstValue_ExpectTrue() var unionB = TaggedUnion.First(bValue); var actual = unionA == unionB; - Assert.True(actual); + ClassicAssert.True(actual); } [Test] @@ -43,7 +42,7 @@ public void Equality_UnionASecondValueEqualsUnionBSecondValue_ExpectTrue() var unionB = TaggedUnion.Second(ZeroIdRefType); var actual = unionA == unionB; - Assert.True(actual); + ClassicAssert.True(actual); } [Test] @@ -53,7 +52,7 @@ public void Equality_UnionAIsDefaultAndUnionBIsFirst_ExpectFalse() var unionB = default(TaggedUnion); var actual = unionA == unionB; - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -63,7 +62,7 @@ public void Equality_UnionAIsDefaultAndUnionBIsSecond_ExpectFalse() var unionB = TaggedUnion.Second(SomeTextStructType); var actual = unionA == unionB; - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -73,7 +72,7 @@ public void Equality_UnionAIsFirstAndUnionBIsDefault_ExpectFalse() var unionB = TaggedUnion.First(SomeTextStructType); var actual = unionA == unionB; - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -83,7 +82,7 @@ public void Equality_UnionAIsFirstAndUnionBIsSecond_ExpectFalse() var unionB = TaggedUnion.Second(SomeTextStructType); var actual = unionA == unionB; - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -93,7 +92,7 @@ public void Equality_UnionAIsSecondAndUnionBIsDefault_ExpectFalse() var unionB = default(TaggedUnion); var actual = unionA == unionB; - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -103,7 +102,7 @@ public void Equality_UnionAIsSecondAndUnionBIsFirst_ExpectFalse() var unionB = TaggedUnion.First(ZeroIdRefType); var actual = unionA == unionB; - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -124,7 +123,7 @@ public void Equality_UnionAFirstValueIsNotEqualUnionBFirstValue_ExpectFalse() var unionB = TaggedUnion.First(bValue); var actual = unionA == unionB; - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -143,6 +142,6 @@ public void Equality_UnionASecondValueIsNotEqualUnionBSecondValue_ExpectFalse() var unionB = TaggedUnion.Second(bValue); var actual = unionA == unionB; - Assert.False(actual); + ClassicAssert.False(actual); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Equality/EqualityObject.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Equality/EqualityObject.cs similarity index 89% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Equality/EqualityObject.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Equality/EqualityObject.cs index 34cab73c..79b038d7 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Equality/EqualityObject.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Equality/EqualityObject.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; @@ -14,7 +13,7 @@ public void EqualsWithObject_SourceIsDefaultAndObjectIsDefault_ExpectTrue() object? obj = new TaggedUnion(); var actual = source.Equals(obj); - Assert.True(actual); + ClassicAssert.True(actual); } [Test] @@ -24,7 +23,7 @@ public void EqualsWithObject_SourceFirstValueEqualsObjectFirstValue_ExpectTrue() object? obj = TaggedUnion.First(null); var actual = source.Equals(obj); - Assert.True(actual); + ClassicAssert.True(actual); } [Test] @@ -34,7 +33,7 @@ public void EqualsWithObject_SourceSecondValueEqualsObjectSecondValue_ExpectTrue object? obj = (TaggedUnion)MinusFifteenIdRefType; var actual = source.Equals(obj); - Assert.True(actual); + ClassicAssert.True(actual); } [Test] @@ -44,7 +43,7 @@ public void EqualsWithObject_SourceIsDefaultAndObjectIsFirst_ExpectFalse() object? obj = TaggedUnion.First(null); var actual = source.Equals(obj); - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -54,7 +53,7 @@ public void EqualsWithObject_SourceIsDefaultAndObjectIsSecond_ExpectFalse() object? obj = TaggedUnion.Second(PlusFifteenIdRefType); var actual = source.Equals(obj); - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -64,7 +63,7 @@ public void EqualsWithObject_SourceIsFirstAndObjectIsDefault_ExpectFalse() object? obj = default(TaggedUnion); var actual = source.Equals(obj); - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -74,7 +73,7 @@ public void EqualsWithObject_SourceIsFirstAndObjectIsSecond_ExpectFalse() object? obj = TaggedUnion.Second(null); var actual = source.Equals(obj); - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -84,7 +83,7 @@ public void EqualsWithObject_SourceIsSecondAndObjectIsDefault_ExpectFalse() object? obj = default(TaggedUnion); var actual = source.Equals(obj); - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -94,7 +93,7 @@ public void EqualsWithObject_SourceIsSecondAndObjectIsFirst_ExpectFalse() object? obj = TaggedUnion.First(default); var actual = source.Equals(obj); - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -115,7 +114,7 @@ public void EqualsWithObject_SourceFirstValueIsNotEqualObjectFirstValue_ExpectFa object? obj = TaggedUnion.First(objValue); var actual = source.Equals(obj); - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -130,7 +129,7 @@ public void EqualsWithObject_SourceSecondValueIsNotEqualObjectSecondValue_Expect object? obj = TaggedUnion.Second(null); var actual = source.Equals(obj); - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -145,7 +144,7 @@ public void EqualsWithObject_ObjectIsOtherTaggedUnion_ExpectFalse() object? obj = TaggedUnion.Second(sourceValue); var actual = source.Equals(obj); - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -157,7 +156,7 @@ public void EqualsWithObject_ObjectIsNotTaggedUnion_ExpectFalse() object? obj = sourceValue; var actual = source.Equals(obj); - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -169,6 +168,6 @@ public void EqualsWithObject_ObjectIsNull_ExpectFalse() object? obj = null; var actual = source.Equals(obj); - Assert.False(actual); + ClassicAssert.False(actual); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Equality/EqualityOther.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Equality/EqualityOther.cs similarity index 89% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Equality/EqualityOther.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Equality/EqualityOther.cs index 7ac2e0cb..b2c31465 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Equality/EqualityOther.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Equality/EqualityOther.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; @@ -14,7 +13,7 @@ public void EqualsWithOther_SourceIsDefaultAndOtherIsDefault_ExpectTrue() var other = new TaggedUnion(); var actual = source.Equals(other); - Assert.True(actual); + ClassicAssert.True(actual); } [Test] @@ -24,7 +23,7 @@ public void EqualsWithOther_SourceFirstValueEqualsOtherFirstValue_ExpectTrue() var other = TaggedUnion.First(null); var actual = source.Equals(other); - Assert.True(actual); + ClassicAssert.True(actual); } [Test] @@ -34,7 +33,7 @@ public void EqualsWithOther_SourceSecondValueEqualsOtherSecondValue_ExpectTrue() var other = (TaggedUnion)MinusFifteenIdRefType; var actual = source.Equals(other); - Assert.True(actual); + ClassicAssert.True(actual); } [Test] @@ -44,7 +43,7 @@ public void EqualsWithOther_SourceIsDefaultAndOtherIsFirst_ExpectFalse() var other = TaggedUnion.First(null); var actual = source.Equals(other); - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -54,7 +53,7 @@ public void EqualsWithOther_SourceIsDefaultAndOtherIsSecond_ExpectFalse() var other = TaggedUnion.Second(PlusFifteenIdRefType); var actual = source.Equals(other); - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -64,7 +63,7 @@ public void EqualsWithOther_SourceIsFirstAndOtherIsDefault_ExpectFalse() var other = default(TaggedUnion); var actual = source.Equals(other); - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -74,7 +73,7 @@ public void EqualsWithOther_SourceIsFirstAndOtherIsSecond_ExpectFalse() var other = TaggedUnion.Second(null); var actual = source.Equals(other); - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -84,7 +83,7 @@ public void EqualsWithOther_SourceIsSecondAndOtherIsDefault_ExpectFalse() var other = default(TaggedUnion); var actual = source.Equals(other); - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -94,7 +93,7 @@ public void EqualsWithOther_SourceIsSecondAndOtherIsFirst_ExpectFalse() var other = TaggedUnion.First(default); var actual = source.Equals(other); - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -115,7 +114,7 @@ public void EqualsWithOther_SourceFirstValueIsNotEqualOtherFirstValue_ExpectFals var other = TaggedUnion.First(otherValue); var actual = source.Equals(other); - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -130,6 +129,6 @@ public void EqualsWithOther_SourceSecondValueIsNotEqualOtherSecondValue_ExpectFa var other = TaggedUnion.Second(null); var actual = source.Equals(other); - Assert.False(actual); + ClassicAssert.False(actual); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Equality/HashCode.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Equality/HashCode.cs similarity index 86% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Equality/HashCode.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Equality/HashCode.cs index 2bca6844..a6598232 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Equality/HashCode.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Equality/HashCode.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; @@ -16,7 +15,7 @@ public void GetHashCode_SourceAndOtherAreDefault_ExpectValuesAreEqual() var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreEqual(sourceHashCode, otherHashCode); + ClassicAssert.AreEqual(sourceHashCode, otherHashCode); } [Test] @@ -30,7 +29,7 @@ public void GetHashCode_SourceFirstValueIsSameAsOtherFirstValue_ExpectValuesAreE var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreEqual(sourceHashCode, otherHashCode); + ClassicAssert.AreEqual(sourceHashCode, otherHashCode); } [Test] @@ -44,7 +43,7 @@ public void GetHashCode_SourceSecondValueIsSameAsOtherSecondValue_ExpectValuesAr var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreEqual(sourceHashCode, otherHashCode); + ClassicAssert.AreEqual(sourceHashCode, otherHashCode); } [Test] @@ -56,7 +55,7 @@ public void GetHashCode_SourceIsDefaultAndOtherIsNotDefault_ExpectValuesAreNotEq var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreNotEqual(sourceHashCode, otherHashCode); + ClassicAssert.AreNotEqual(sourceHashCode, otherHashCode); } [Test] @@ -70,7 +69,7 @@ public void GetHashCode_SourceFirstValueIsSameAsOtherSecondValue_ExpectValuesAre var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreNotEqual(sourceHashCode, otherHashCode); + ClassicAssert.AreNotEqual(sourceHashCode, otherHashCode); } [Test] @@ -82,7 +81,7 @@ public void GetHashCode_SourceFirstValueAreNotEqualOtherFirstValue_ExpectValuesA var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreNotEqual(sourceHashCode, otherHashCode); + ClassicAssert.AreNotEqual(sourceHashCode, otherHashCode); } [Test] @@ -104,7 +103,7 @@ public void GetHashCode_SourceSecondValueIsNotSameAsOtherSecondValue_ExpectValue var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreNotEqual(sourceHashCode, otherHashCode); + ClassicAssert.AreNotEqual(sourceHashCode, otherHashCode); } [Test] @@ -118,7 +117,7 @@ public void GetHashCode_SourceFirstValueIsSameAsOtherFirstButSecondTypesAreNotEq var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreNotEqual(sourceHashCode, otherHashCode); + ClassicAssert.AreNotEqual(sourceHashCode, otherHashCode); } [Test] @@ -132,7 +131,7 @@ public void GetHashCode_SourceSecondValueIsSameAsOtherSecondButFirstTypesAreNotE var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreNotEqual(sourceHashCode, otherHashCode); + ClassicAssert.AreNotEqual(sourceHashCode, otherHashCode); } [Test] @@ -144,6 +143,6 @@ public void GetHashCode_SourceAndOtherAreDefaultButTypesAreNotEqual_ExpectValues var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreNotEqual(sourceHashCode, otherHashCode); + ClassicAssert.AreNotEqual(sourceHashCode, otherHashCode); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Equality/Inequality.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Equality/Inequality.cs similarity index 88% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Equality/Inequality.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Equality/Inequality.cs index 8246ab2d..51afb32a 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Equality/Inequality.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Equality/Inequality.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; @@ -14,7 +13,7 @@ public void Inequality_UnionAIsDefaultAndUnionBIsFirst_ExpectTrue() var unionB = default(TaggedUnion); var actual = unionA != unionB; - Assert.True(actual); + ClassicAssert.True(actual); } [Test] @@ -24,7 +23,7 @@ public void Inequality_UnionAIsDefaultAndUnionBIsSecond_ExpectTrue() var unionB = TaggedUnion.Second(null); var actual = unionA != unionB; - Assert.True(actual); + ClassicAssert.True(actual); } [Test] @@ -34,7 +33,7 @@ public void Inequality_UnionAIsFirstAndUnionBIsDefault_ExpectTrue() var unionB = TaggedUnion.First(default); var actual = unionA != unionB; - Assert.True(actual); + ClassicAssert.True(actual); } [Test] @@ -44,7 +43,7 @@ public void Inequality_UnionAIsFirstAndUnionBIsSecond_ExpectTrue() var unionB = TaggedUnion.Second(SomeTextStructType); var actual = unionA != unionB; - Assert.True(actual); + ClassicAssert.True(actual); } [Test] @@ -54,7 +53,7 @@ public void Inequality_UnionAIsSecondAndUnionBIsDefault_ExpectTrue() var unionB = default(TaggedUnion); var actual = unionA != unionB; - Assert.True(actual); + ClassicAssert.True(actual); } [Test] @@ -64,7 +63,7 @@ public void Inequality_UnionAIsSecondAndUnionBIsFirst_ExpectTrue() var unionB = TaggedUnion.First(null); var actual = unionA != unionB; - Assert.True(actual); + ClassicAssert.True(actual); } [Test] @@ -77,7 +76,7 @@ public void Inequality_UnionAFirstValueIsNotEqualUnionBFirstValue_ExpectTrue() var unionB = TaggedUnion.First(bValue); var actual = unionA != unionB; - Assert.True(actual); + ClassicAssert.True(actual); } [Test] @@ -87,7 +86,7 @@ public void Inequality_UnionASecondValueIsNotEqualUnionBSecondValue_ExpectTrue() var unionB = TaggedUnion.Second(SomeTextStructType); var actual = unionA != unionB; - Assert.True(actual); + ClassicAssert.True(actual); } [Test] @@ -97,7 +96,7 @@ public void InInequality_UnionAIsDefaultAndUnionBIsDefault_ExpectFalse() var unionB = default(TaggedUnion); var actual = unionA != unionB; - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -116,7 +115,7 @@ public void Inequality_UnionAFirstValueEqualsUnionBFirstValue_ExpectFalse() var unionB = TaggedUnion.First(bValue); var actual = unionA != unionB; - Assert.False(actual); + ClassicAssert.False(actual); } [Test] @@ -126,6 +125,6 @@ public void Inequality_UnionASecondValueEqualsUnionBSecondValue_ExpectFalse() var unionB = TaggedUnion.Second(MinusFifteenIdRefType); var actual = unionA != unionB; - Assert.False(actual); + ClassicAssert.False(actual); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory.Obsolete/Factory.Constructor.First.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory.Obsolete/Factory.Constructor.First.cs similarity index 78% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory.Obsolete/Factory.Constructor.First.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory.Obsolete/Factory.Constructor.First.cs index 2786607e..a184748f 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory.Obsolete/Factory.Constructor.First.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory.Obsolete/Factory.Constructor.First.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; namespace PrimeFuncPack.Core.Tests; @@ -13,6 +12,6 @@ public void First_Constructor_ExpectIsInitializedGetsTrue( object? sourceValue) { var taggedUnion = new TaggedUnion(sourceValue); - Assert.True(taggedUnion.IsInitialized); + ClassicAssert.True(taggedUnion.IsInitialized); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory.Obsolete/Factory.Constructor.Second.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory.Obsolete/Factory.Constructor.Second.cs similarity index 78% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory.Obsolete/Factory.Constructor.Second.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory.Obsolete/Factory.Constructor.Second.cs index ad117bb2..236b9f24 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory.Obsolete/Factory.Constructor.Second.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory.Obsolete/Factory.Constructor.Second.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; namespace PrimeFuncPack.Core.Tests; @@ -13,6 +12,6 @@ public void Second_ExpectIsInitializedGetsTrue( object? sourceValue) { var taggedUnion = new TaggedUnion(sourceValue); - Assert.True(taggedUnion.IsInitialized); + ClassicAssert.True(taggedUnion.IsInitialized); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory.Obsolete/Factory.Default.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory.Obsolete/Factory.Default.cs similarity index 70% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory.Obsolete/Factory.Default.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory.Obsolete/Factory.Default.cs index 7ab5806c..c39ba374 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory.Obsolete/Factory.Default.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory.Obsolete/Factory.Default.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; namespace PrimeFuncPack.Core.Tests; @@ -11,6 +10,6 @@ partial class TaggedUnionTest public void Default_ExpectIsInitializedGetsFalse() { var taggedUnion = default(TaggedUnion); - Assert.False(taggedUnion.IsInitialized); + ClassicAssert.False(taggedUnion.IsInitialized); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory.Obsolete/Factory.DefaultConstructor.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory.Obsolete/Factory.DefaultConstructor.cs similarity index 71% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory.Obsolete/Factory.DefaultConstructor.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory.Obsolete/Factory.DefaultConstructor.cs index fb83310c..67f68434 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory.Obsolete/Factory.DefaultConstructor.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory.Obsolete/Factory.DefaultConstructor.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; namespace PrimeFuncPack.Core.Tests; @@ -11,6 +10,6 @@ partial class TaggedUnionTest public void DefaultConstructor_ExpectIsInitializedGetsFalse() { var taggedUnion = new TaggedUnion(); - Assert.False(taggedUnion.IsInitialized); + ClassicAssert.False(taggedUnion.IsInitialized); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory.Obsolete/Factory.Explicit.First.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory.Obsolete/Factory.Explicit.First.cs similarity index 78% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory.Obsolete/Factory.Explicit.First.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory.Obsolete/Factory.Explicit.First.cs index 487d150d..8f468ff1 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory.Obsolete/Factory.Explicit.First.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory.Obsolete/Factory.Explicit.First.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; namespace PrimeFuncPack.Core.Tests; @@ -13,6 +12,6 @@ public void First_Explicit_ExpectIsInitializedGetsTrue( object? sourceValue) { var taggedUnion = TaggedUnion.First(sourceValue); - Assert.True(taggedUnion.IsInitialized); + ClassicAssert.True(taggedUnion.IsInitialized); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory.Obsolete/Factory.Explicit.Second.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory.Obsolete/Factory.Explicit.Second.cs similarity index 78% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory.Obsolete/Factory.Explicit.Second.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory.Obsolete/Factory.Explicit.Second.cs index 88a46c5a..c813771d 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory.Obsolete/Factory.Explicit.Second.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory.Obsolete/Factory.Explicit.Second.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; namespace PrimeFuncPack.Core.Tests; @@ -13,6 +12,6 @@ public void Second_Explicit_ExpectIsInitializedGetsTrue( object? sourceValue) { var taggedUnion = TaggedUnion.Second(sourceValue); - Assert.True(taggedUnion.IsInitialized); + ClassicAssert.True(taggedUnion.IsInitialized); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory.Obsolete/Factory.Implicit.First.Alt.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory.Obsolete/Factory.Implicit.First.Alt.cs similarity index 78% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory.Obsolete/Factory.Implicit.First.Alt.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory.Obsolete/Factory.Implicit.First.Alt.cs index 7ec563b9..525aa8b5 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory.Obsolete/Factory.Implicit.First.Alt.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory.Obsolete/Factory.Implicit.First.Alt.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; namespace PrimeFuncPack.Core.Tests; @@ -13,6 +12,6 @@ public void First_Implicit_Alt_ExpectIsInitializedGetsTrue( object? sourceValue) { TaggedUnion taggedUnion = sourceValue; - Assert.True(taggedUnion.IsInitialized); + ClassicAssert.True(taggedUnion.IsInitialized); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory.Obsolete/Factory.Implicit.First.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory.Obsolete/Factory.Implicit.First.cs similarity index 78% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory.Obsolete/Factory.Implicit.First.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory.Obsolete/Factory.Implicit.First.cs index c0cfed1c..6a19f163 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory.Obsolete/Factory.Implicit.First.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory.Obsolete/Factory.Implicit.First.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; namespace PrimeFuncPack.Core.Tests; @@ -13,6 +12,6 @@ public void First_Implicit_ExpectIsInitializedGetsTrue( object? sourceValue) { TaggedUnion taggedUnion = sourceValue; - Assert.True(taggedUnion.IsInitialized); + ClassicAssert.True(taggedUnion.IsInitialized); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory.Obsolete/Factory.Implicit.Second.Alt.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory.Obsolete/Factory.Implicit.Second.Alt.cs similarity index 78% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory.Obsolete/Factory.Implicit.Second.Alt.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory.Obsolete/Factory.Implicit.Second.Alt.cs index a47fd014..66b5172c 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory.Obsolete/Factory.Implicit.Second.Alt.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory.Obsolete/Factory.Implicit.Second.Alt.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; namespace PrimeFuncPack.Core.Tests; @@ -13,6 +12,6 @@ public void Second_Implicit_Alt_ExpectIsInitializedGetsTrue( object? sourceValue) { TaggedUnion taggedUnion = sourceValue; - Assert.True(taggedUnion.IsInitialized); + ClassicAssert.True(taggedUnion.IsInitialized); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory.Obsolete/Factory.Implicit.Second.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory.Obsolete/Factory.Implicit.Second.cs similarity index 78% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory.Obsolete/Factory.Implicit.Second.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory.Obsolete/Factory.Implicit.Second.cs index a8f58aea..92d26748 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory.Obsolete/Factory.Implicit.Second.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory.Obsolete/Factory.Implicit.Second.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; namespace PrimeFuncPack.Core.Tests; @@ -13,6 +12,6 @@ public void Second_Implicit_ExpectIsInitializedGetsTrue( object? sourceValue) { TaggedUnion taggedUnion = sourceValue; - Assert.True(taggedUnion.IsInitialized); + ClassicAssert.True(taggedUnion.IsInitialized); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory/Factory.Constructor.First.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory/Factory.Constructor.First.cs similarity index 83% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory/Factory.Constructor.First.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory/Factory.Constructor.First.cs index 75aaa9a5..cc951d83 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory/Factory.Constructor.First.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory/Factory.Constructor.First.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; @@ -13,14 +12,14 @@ public void First_Constructor_ExpectIsFirstGetsTrue( object? sourceValue) { var taggedUnion = new TaggedUnion(sourceValue); - Assert.True(taggedUnion.IsFirst); + ClassicAssert.True(taggedUnion.IsFirst); } [Test] public void First_Constructor_ExpectIsSecondGetsFalse() { var taggedUnion = new TaggedUnion(SomeTextStructType); - Assert.False(taggedUnion.IsSecond); + ClassicAssert.False(taggedUnion.IsSecond); } [Test] @@ -29,7 +28,7 @@ public void First_Constructor_ExpectIsNoneGetsFalse( object? sourceValue) { var taggedUnion = new TaggedUnion(sourceValue); - Assert.False(taggedUnion.IsNone); + ClassicAssert.False(taggedUnion.IsNone); } [Test] @@ -38,6 +37,6 @@ public void First_Constructor_ExpectIsNotNoneGetsTrue( object? sourceValue) { var taggedUnion = new TaggedUnion(sourceValue); - Assert.True(taggedUnion.IsNotNone); + ClassicAssert.True(taggedUnion.IsNotNone); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory/Factory.Constructor.Second.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory/Factory.Constructor.Second.cs similarity index 82% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory/Factory.Constructor.Second.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory/Factory.Constructor.Second.cs index 7367ede9..c4914a8c 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory/Factory.Constructor.Second.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory/Factory.Constructor.Second.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; @@ -11,7 +10,7 @@ partial class TaggedUnionTest public void Second_ExpectIsFirstGetsFalse() { var taggedUnion = new TaggedUnion(PlusFifteenIdRefType); - Assert.False(taggedUnion.IsFirst); + ClassicAssert.False(taggedUnion.IsFirst); } [Test] @@ -20,7 +19,7 @@ public void Second_ExpectIsSecondGetsTrue( object? sourceValue) { var taggedUnion = new TaggedUnion(sourceValue); - Assert.True(taggedUnion.IsSecond); + ClassicAssert.True(taggedUnion.IsSecond); } [Test] @@ -29,7 +28,7 @@ public void Second_ExpectIsNoneGetsFalse( object? sourceValue) { var taggedUnion = new TaggedUnion(sourceValue); - Assert.False(taggedUnion.IsNone); + ClassicAssert.False(taggedUnion.IsNone); } [Test] @@ -38,6 +37,6 @@ public void Second_ExpectIsNotNoneGetsTrue( object? sourceValue) { var taggedUnion = new TaggedUnion(sourceValue); - Assert.True(taggedUnion.IsNotNone); + ClassicAssert.True(taggedUnion.IsNotNone); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory/Factory.Default.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory/Factory.Default.cs similarity index 73% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory/Factory.Default.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory/Factory.Default.cs index da235d56..9c3d3b42 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory/Factory.Default.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory/Factory.Default.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; namespace PrimeFuncPack.Core.Tests; @@ -10,27 +9,27 @@ partial class TaggedUnionTest public void Default_ExpectIsFirstGetsFalse() { var taggedUnion = default(TaggedUnion); - Assert.False(taggedUnion.IsFirst); + ClassicAssert.False(taggedUnion.IsFirst); } [Test] public void Default_ExpectIsSecondGetsFalse() { var taggedUnion = default(TaggedUnion); - Assert.False(taggedUnion.IsSecond); + ClassicAssert.False(taggedUnion.IsSecond); } [Test] public void Default_ExpectIsNoneGetsTrue() { var taggedUnion = default(TaggedUnion); - Assert.True(taggedUnion.IsNone); + ClassicAssert.True(taggedUnion.IsNone); } [Test] public void Default_ExpectIsNotNoneGetsFalse() { var taggedUnion = default(TaggedUnion); - Assert.False(taggedUnion.IsNotNone); + ClassicAssert.False(taggedUnion.IsNotNone); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory/Factory.DefaultConstructor.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory/Factory.DefaultConstructor.cs similarity index 74% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory/Factory.DefaultConstructor.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory/Factory.DefaultConstructor.cs index 15fb0b1b..62b4996b 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory/Factory.DefaultConstructor.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory/Factory.DefaultConstructor.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; namespace PrimeFuncPack.Core.Tests; @@ -10,27 +9,27 @@ partial class TaggedUnionTest public void DefaultConstructor_ExpectIsFirstGetsFalse() { var taggedUnion = new TaggedUnion(); - Assert.False(taggedUnion.IsFirst); + ClassicAssert.False(taggedUnion.IsFirst); } [Test] public void DefaultConstructor_ExpectIsSecondGetsFalse() { var taggedUnion = new TaggedUnion(); - Assert.False(taggedUnion.IsSecond); + ClassicAssert.False(taggedUnion.IsSecond); } [Test] public void DefaultConstructor_ExpectIsNoneGetsTrue() { var taggedUnion = new TaggedUnion(); - Assert.True(taggedUnion.IsNone); + ClassicAssert.True(taggedUnion.IsNone); } [Test] public void DefaultConstructor_ExpectIsNotNoneGetsFalse() { var taggedUnion = new TaggedUnion(); - Assert.False(taggedUnion.IsNotNone); + ClassicAssert.False(taggedUnion.IsNotNone); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory/Factory.Explicit.First.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory/Factory.Explicit.First.cs similarity index 82% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory/Factory.Explicit.First.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory/Factory.Explicit.First.cs index 5e828a17..21833e24 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory/Factory.Explicit.First.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory/Factory.Explicit.First.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; @@ -13,14 +12,14 @@ public void First_Explicit_ExpectIsFirstGetsTrue( object? sourceValue) { var taggedUnion = TaggedUnion.First(sourceValue); - Assert.True(taggedUnion.IsFirst); + ClassicAssert.True(taggedUnion.IsFirst); } [Test] public void First_Explicit_ExpectIsSecondGetsFalse() { var taggedUnion = TaggedUnion.First(SomeTextStructType); - Assert.False(taggedUnion.IsSecond); + ClassicAssert.False(taggedUnion.IsSecond); } [Test] @@ -29,7 +28,7 @@ public void First_Explicit_ExpectIsNoneGetsFalse( object? sourceValue) { var taggedUnion = TaggedUnion.First(sourceValue); - Assert.False(taggedUnion.IsNone); + ClassicAssert.False(taggedUnion.IsNone); } [Test] @@ -38,6 +37,6 @@ public void First_Explicit_ExpectIsNotNoneGetsTrue( object? sourceValue) { var taggedUnion = TaggedUnion.First(sourceValue); - Assert.True(taggedUnion.IsNotNone); + ClassicAssert.True(taggedUnion.IsNotNone); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory/Factory.Explicit.Second.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory/Factory.Explicit.Second.cs similarity index 83% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory/Factory.Explicit.Second.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory/Factory.Explicit.Second.cs index 74e30125..056b6f8e 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory/Factory.Explicit.Second.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory/Factory.Explicit.Second.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; @@ -11,7 +10,7 @@ partial class TaggedUnionTest public void Second_Explicit_ExpectIsFirstGetsFalse() { var taggedUnion = TaggedUnion.Second(PlusFifteenIdRefType); - Assert.False(taggedUnion.IsFirst); + ClassicAssert.False(taggedUnion.IsFirst); } [Test] @@ -20,7 +19,7 @@ public void Second_Explicit_ExpectIsSecondGetsTrue( object? sourceValue) { var taggedUnion = TaggedUnion.Second(sourceValue); - Assert.True(taggedUnion.IsSecond); + ClassicAssert.True(taggedUnion.IsSecond); } [Test] @@ -29,7 +28,7 @@ public void Second_Explicit_ExpectIsNoneGetsFalse( object? sourceValue) { var taggedUnion = TaggedUnion.Second(sourceValue); - Assert.False(taggedUnion.IsNone); + ClassicAssert.False(taggedUnion.IsNone); } [Test] @@ -38,6 +37,6 @@ public void Second_Explicit_ExpectIsNotNoneGetsTrue( object? sourceValue) { var taggedUnion = TaggedUnion.Second(sourceValue); - Assert.True(taggedUnion.IsNotNone); + ClassicAssert.True(taggedUnion.IsNotNone); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory/Factory.Implicit.First.Alt.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory/Factory.Implicit.First.Alt.cs similarity index 82% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory/Factory.Implicit.First.Alt.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory/Factory.Implicit.First.Alt.cs index 6bbe4d96..07c6e982 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory/Factory.Implicit.First.Alt.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory/Factory.Implicit.First.Alt.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; @@ -13,14 +12,14 @@ public void First_Implicit_Alt_ExpectIsFirstGetsTrue( object? sourceValue) { TaggedUnion taggedUnion = sourceValue; - Assert.True(taggedUnion.IsFirst); + ClassicAssert.True(taggedUnion.IsFirst); } [Test] public void First_Implicit_Alt_ExpectIsSecondGetsFalse() { TaggedUnion taggedUnion = MinusFifteenIdRefType; - Assert.False(taggedUnion.IsSecond); + ClassicAssert.False(taggedUnion.IsSecond); } [Test] @@ -29,7 +28,7 @@ public void First_Implicit_Alt_ExpectIsNoneGetsFalse( object? sourceValue) { TaggedUnion taggedUnion = sourceValue; - Assert.False(taggedUnion.IsNone); + ClassicAssert.False(taggedUnion.IsNone); } [Test] @@ -38,6 +37,6 @@ public void First_Implicit_Alt_ExpectIsNotNoneGetsTrue( object? sourceValue) { TaggedUnion taggedUnion = sourceValue; - Assert.True(taggedUnion.IsNotNone); + ClassicAssert.True(taggedUnion.IsNotNone); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory/Factory.Implicit.First.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory/Factory.Implicit.First.cs similarity index 82% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory/Factory.Implicit.First.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory/Factory.Implicit.First.cs index ebedf99e..c30793a1 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory/Factory.Implicit.First.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory/Factory.Implicit.First.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; @@ -13,14 +12,14 @@ public void First_Implicit_ExpectIsFirstGetsTrue( object? sourceValue) { TaggedUnion taggedUnion = sourceValue; - Assert.True(taggedUnion.IsFirst); + ClassicAssert.True(taggedUnion.IsFirst); } [Test] public void First_Implicit_ExpectIsSecondGetsFalse() { TaggedUnion taggedUnion = SomeTextStructType; - Assert.False(taggedUnion.IsSecond); + ClassicAssert.False(taggedUnion.IsSecond); } [Test] @@ -29,7 +28,7 @@ public void First_Implicit_ExpectIsNoneGetsFalse( object? sourceValue) { TaggedUnion taggedUnion = sourceValue; - Assert.False(taggedUnion.IsNone); + ClassicAssert.False(taggedUnion.IsNone); } [Test] @@ -38,6 +37,6 @@ public void First_Implicit_ExpectIsNotNoneGetsTrue( object? sourceValue) { TaggedUnion taggedUnion = sourceValue; - Assert.True(taggedUnion.IsNotNone); + ClassicAssert.True(taggedUnion.IsNotNone); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory/Factory.Implicit.Second.Alt.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory/Factory.Implicit.Second.Alt.cs similarity index 82% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory/Factory.Implicit.Second.Alt.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory/Factory.Implicit.Second.Alt.cs index 4527b8a6..e40b08f2 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory/Factory.Implicit.Second.Alt.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory/Factory.Implicit.Second.Alt.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; @@ -11,7 +10,7 @@ partial class TaggedUnionTest public void Second_Implicit_Alt_ExpectIsFirstGetsFalse() { TaggedUnion taggedUnion = ZeroIdRefType; - Assert.False(taggedUnion.IsFirst); + ClassicAssert.False(taggedUnion.IsFirst); } [Test] @@ -20,7 +19,7 @@ public void Second_Implicit_Alt_ExpectIsSecondGetsTrue( object? sourceValue) { TaggedUnion taggedUnion = sourceValue; - Assert.True(taggedUnion.IsSecond); + ClassicAssert.True(taggedUnion.IsSecond); } [Test] @@ -29,7 +28,7 @@ public void Second_Implicit_Alt_ExpectIsNoneGetsFalse( object? sourceValue) { TaggedUnion taggedUnion = sourceValue; - Assert.False(taggedUnion.IsNone); + ClassicAssert.False(taggedUnion.IsNone); } [Test] @@ -38,6 +37,6 @@ public void Second_Implicit_Alt_ExpectIsNotNoneGetsTrue( object? sourceValue) { TaggedUnion taggedUnion = sourceValue; - Assert.True(taggedUnion.IsNotNone); + ClassicAssert.True(taggedUnion.IsNotNone); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory/Factory.Implicit.Second.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory/Factory.Implicit.Second.cs similarity index 82% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory/Factory.Implicit.Second.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory/Factory.Implicit.Second.cs index e3b68805..a083b166 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Factory/Factory.Implicit.Second.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Factory/Factory.Implicit.Second.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; @@ -11,7 +10,7 @@ partial class TaggedUnionTest public void Second_Implicit_ExpectIsFirstGetsFalse() { TaggedUnion taggedUnion = PlusFifteenIdRefType; - Assert.False(taggedUnion.IsFirst); + ClassicAssert.False(taggedUnion.IsFirst); } [Test] @@ -20,7 +19,7 @@ public void Second_Implicit_ExpectIsSecondGetsTrue( object? sourceValue) { TaggedUnion taggedUnion = sourceValue; - Assert.True(taggedUnion.IsSecond); + ClassicAssert.True(taggedUnion.IsSecond); } [Test] @@ -29,7 +28,7 @@ public void Second_Implicit_ExpectIsNoneGetsFalse( object? sourceValue) { TaggedUnion taggedUnion = sourceValue; - Assert.False(taggedUnion.IsNone); + ClassicAssert.False(taggedUnion.IsNone); } [Test] @@ -38,6 +37,6 @@ public void Second_Implicit_ExpectIsNotNoneGetsTrue( object? sourceValue) { TaggedUnion taggedUnion = sourceValue; - Assert.True(taggedUnion.IsNotNone); + ClassicAssert.True(taggedUnion.IsNotNone); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Fold/Fold.Other.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Fold/Fold.Other.cs similarity index 86% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Fold/Fold.Other.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Fold/Fold.Other.cs index 9105fca6..7ed1f8a6 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Fold/Fold.Other.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Fold/Fold.Other.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; @@ -16,7 +15,7 @@ public void FoldWithOther_MapFirstIsNull_ExpectArgumentNullException() var other = int.MaxValue; var ex = Assert.Throws(() => _ = source.Fold(null!, _ => second, other)); - Assert.AreEqual("mapFirst", ex!.ParamName); + ClassicAssert.AreEqual("mapFirst", ex!.ParamName); } [Test] @@ -28,7 +27,7 @@ public void FoldWithOther_MapSecondIsNull_ExpectArgumentNullException() var other = TabString; var ex = Assert.Throws(() => _ = source.Fold(_ => first, null!, other)); - Assert.AreEqual("mapSecond", ex!.ParamName); + ClassicAssert.AreEqual("mapSecond", ex!.ParamName); } [Test] @@ -42,7 +41,7 @@ public void FoldWithOther_SourceIsDefault_ExpectOther( var second = new { Id = 251 }; var actual = source.Fold(_ => first, _ => second, other); - Assert.AreEqual(other, actual); + ClassicAssert.AreEqual(other, actual); } [Test] @@ -55,7 +54,7 @@ public void FoldWithOther_SourceIsFirst_ExpectFirstResult() var other = PlusFifteenIdRefType; var actual = source.Fold(_ => first, _ => second, other); - Assert.AreEqual(first, actual); + ClassicAssert.AreEqual(first, actual); } [Test] @@ -68,6 +67,6 @@ public void FoldWithOther_SourceIsSecond_ExpectSecondResult() var other = PlusFifteenIdRefType; var actual = source.Fold(_ => first, _ => second, other); - Assert.AreEqual(second, actual); + ClassicAssert.AreEqual(second, actual); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Fold/Fold.OtherFactory.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Fold/Fold.OtherFactory.cs similarity index 86% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Fold/Fold.OtherFactory.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Fold/Fold.OtherFactory.cs index 70b9b630..93d8a54b 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Fold/Fold.OtherFactory.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Fold/Fold.OtherFactory.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; @@ -16,7 +15,7 @@ public void FoldWithOtherFactory_MapFirstIsNull_ExpectArgumentNullException() var other = MinusFifteenIdRefType; var ex = Assert.Throws(() => _ = source.Fold(null!, _ => second, () => other)); - Assert.AreEqual("mapFirst", ex!.ParamName); + ClassicAssert.AreEqual("mapFirst", ex!.ParamName); } [Test] @@ -28,7 +27,7 @@ public void FoldWithOtherFactory_MapSecondIsNull_ExpectArgumentNullException() var other = new object(); var ex = Assert.Throws(() => _ = source.Fold(_ => first, null!, () => other)); - Assert.AreEqual("mapSecond", ex!.ParamName); + ClassicAssert.AreEqual("mapSecond", ex!.ParamName); } [Test] @@ -40,7 +39,7 @@ public void FoldWithOtherFactory_OtherFactoryIsNull_ExpectArgumentNullException( var second = decimal.MaxValue; var ex = Assert.Throws(() => _ = source.Fold(_ => first, _ => second, null!)); - Assert.AreEqual("otherFactory", ex!.ParamName); + ClassicAssert.AreEqual("otherFactory", ex!.ParamName); } [Test] @@ -53,7 +52,7 @@ public void FoldWithOtherFactory_SourceIsDefault_ExpectOther() var other = new { Id = 515 }; var actual = source.Fold(_ => first, _ => second, () => other); - Assert.AreEqual(other, actual); + ClassicAssert.AreEqual(other, actual); } [Test] @@ -66,7 +65,7 @@ public void FoldWithOtherFactory_SourceIsFirst_ExpectFirstResult() var other = int.MinValue; var actual = source.Fold(_ => first, _ => second, () => other); - Assert.AreEqual(first, actual); + ClassicAssert.AreEqual(first, actual); } [Test] @@ -79,6 +78,6 @@ public void FoldWithOtherFactory_SourceIsSecond_ExpectSecondResult() var other = PlusFifteenIdRefType; var actual = source.Fold(_ => first, _ => second, () => other); - Assert.AreEqual(second, actual); + ClassicAssert.AreEqual(second, actual); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Fold/Fold.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Fold/Fold.cs similarity index 84% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Fold/Fold.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Fold/Fold.cs index a7e0e09e..7684f231 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Fold/Fold.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Fold/Fold.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; @@ -13,7 +12,7 @@ public void Fold_MapFirstIsNull_ExpectArgumentNullException() var source = TaggedUnion.First(PlusFifteenIdRefType); var ex = Assert.Throws(() => _ = source.Fold(null!, _ => new object())); - Assert.AreEqual("mapFirst", ex!.ParamName); + ClassicAssert.AreEqual("mapFirst", ex!.ParamName); } [Test] @@ -22,7 +21,7 @@ public void Fold_MapSecondIsNull_ExpectArgumentNullException() var source = TaggedUnion.First(PlusFifteenIdRefType); var ex = Assert.Throws(() => _ = source.Fold(_ => new object(), null!)); - Assert.AreEqual("mapSecond", ex!.ParamName); + ClassicAssert.AreEqual("mapSecond", ex!.ParamName); } [Test] @@ -34,7 +33,7 @@ public void Fold_SourceIsDefault_ExpectDefault() var second = MinusFifteenIdRefType; var actual = source.Fold(_ => first, _ => second); - Assert.IsNull(actual); + ClassicAssert.IsNull(actual); } [Test] @@ -46,7 +45,7 @@ public void Fold_SourceIsFirst_ExpectFirstResult() var second = NullTextStructType; var actual = source.Fold(_ => first, _ => second); - Assert.AreEqual(first, actual); + ClassicAssert.AreEqual(first, actual); } [Test] @@ -58,6 +57,6 @@ public void Fold_SourceIsSecond_ExpectSecondResult() var second = ZeroIdRefType; var actual = source.Fold(_ => first, _ => second); - Assert.AreEqual(second, actual); + ClassicAssert.AreEqual(second, actual); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Fold/FoldAsync.Other.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Fold/FoldAsync.Other.cs similarity index 87% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Fold/FoldAsync.Other.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Fold/FoldAsync.Other.cs index bd13f3e4..add1eca7 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Fold/FoldAsync.Other.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Fold/FoldAsync.Other.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; using static PrimeFuncPack.UnitTest.TestData; @@ -19,7 +18,7 @@ public void FoldAsyncWithOther_MapFirstAsyncIsNull_ExpectArgumentNullException() var ex = Assert.ThrowsAsync( async () => _ = await source.FoldAsync(null!, _ => Task.FromResult(second), other)); - Assert.AreEqual("mapFirstAsync", ex!.ParamName); + ClassicAssert.AreEqual("mapFirstAsync", ex!.ParamName); } [Test] @@ -33,7 +32,7 @@ public void FoldAsyncWithOther_MapSecondAsyncIsNull_ExpectArgumentNullException( var ex = Assert.ThrowsAsync( async () => _ = await source.FoldAsync(_ => Task.FromResult(first), null!, other)); - Assert.AreEqual("mapSecondAsync", ex!.ParamName); + ClassicAssert.AreEqual("mapSecondAsync", ex!.ParamName); } [Test] @@ -46,7 +45,7 @@ public async Task FoldAsyncWithOther_SourceIsDefault_ExpectOther() object other = SomeString; var actual = await source.FoldAsync(_ => Task.FromResult(first), _ => Task.FromResult(second), other); - Assert.AreEqual(other, actual); + ClassicAssert.AreEqual(other, actual); } [Test] @@ -59,7 +58,7 @@ public async Task FoldAsyncWithOther_SourceIsFirst_ExpectFirstResult() var other = PlusFifteenIdRefType; var actual = await source.FoldAsync(_ => Task.FromResult(first), _ => Task.FromResult(second), other); - Assert.AreEqual(first, actual); + ClassicAssert.AreEqual(first, actual); } [Test] @@ -72,6 +71,6 @@ public async Task FoldAsyncWithOther_SourceIsSecond_ExpectSecondResult() StructType? other = null; var actual = await source.FoldAsync(_ => Task.FromResult(first), _ => Task.FromResult(second), other); - Assert.AreEqual(second, actual); + ClassicAssert.AreEqual(second, actual); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Fold/FoldAsync.OtherFactory.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Fold/FoldAsync.OtherFactory.cs similarity index 88% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Fold/FoldAsync.OtherFactory.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Fold/FoldAsync.OtherFactory.cs index b1d63d94..0eea1a68 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Fold/FoldAsync.OtherFactory.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Fold/FoldAsync.OtherFactory.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; using static PrimeFuncPack.UnitTest.TestData; @@ -19,7 +18,7 @@ public void FoldAsyncWithOtherFactory_MapFirstAsyncIsNull_ExpectArgumentNullExce var ex = Assert.ThrowsAsync( async () => _ = await source.FoldAsync(null!, _ => Task.FromResult(second), () => other)); - Assert.AreEqual("mapFirstAsync", ex!.ParamName); + ClassicAssert.AreEqual("mapFirstAsync", ex!.ParamName); } [Test] @@ -33,7 +32,7 @@ public void FoldAsyncWithOtherFactory_MapSecondAsyncIsNull_ExpectArgumentNullExc var ex = Assert.ThrowsAsync( async () => _ = await source.FoldAsync(_ => Task.FromResult(first), null!, () => other)); - Assert.AreEqual("mapSecondAsync", ex!.ParamName); + ClassicAssert.AreEqual("mapSecondAsync", ex!.ParamName); } [Test] @@ -49,7 +48,7 @@ public void FoldAsyncWithOtherFactory_OtherFactoryIsNull_ExpectArgumentNullExcep async () => _ = await source.FoldAsync( _ => Task.FromResult(first), _ => Task.FromResult(second), otherFactory)); - Assert.AreEqual("otherFactory", ex!.ParamName); + ClassicAssert.AreEqual("otherFactory", ex!.ParamName); } [Test] @@ -64,7 +63,7 @@ public async Task FoldAsyncWithOtherFactory_SourceIsDefault_ExpectOther() var actual = await source.FoldAsync( _ => Task.FromResult(first), _ => Task.FromResult(second), () => other); - Assert.AreEqual(other, actual); + ClassicAssert.AreEqual(other, actual); } [Test] @@ -79,7 +78,7 @@ public async Task FoldAsyncWithOtherFactory_SourceIsFirst_ExpectFirstResult() var actual = await source.FoldAsync( _ => Task.FromResult(first), _ => Task.FromResult(second), () => other); - Assert.AreEqual(first, actual); + ClassicAssert.AreEqual(first, actual); } [Test] @@ -94,6 +93,6 @@ public async Task FoldAsyncWithOtherFactory_SourceIsSecond_ExpectSecondResult() var actual = await source.FoldAsync( _ => Task.FromResult(first), _ => Task.FromResult(second), () => other); - Assert.AreEqual(second, actual); + ClassicAssert.AreEqual(second, actual); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Fold/FoldAsync.OtherFactoryAsync.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Fold/FoldAsync.OtherFactoryAsync.cs similarity index 89% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Fold/FoldAsync.OtherFactoryAsync.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Fold/FoldAsync.OtherFactoryAsync.cs index c0efee7e..f14b7e38 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Fold/FoldAsync.OtherFactoryAsync.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Fold/FoldAsync.OtherFactoryAsync.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; using static PrimeFuncPack.UnitTest.TestData; @@ -20,7 +19,7 @@ public void FoldAsyncWithOtherFactoryAsync_MapFirstAsyncIsNull_ExpectArgumentNul async () => _ = await source.FoldAsync( null!, _ => Task.FromResult(second), () => Task.FromResult(other))); - Assert.AreEqual("mapFirstAsync", ex!.ParamName); + ClassicAssert.AreEqual("mapFirstAsync", ex!.ParamName); } [Test] @@ -35,7 +34,7 @@ public void FoldAsyncWithOtherFactoryAsync_MapSecondAsyncIsNull_ExpectArgumentNu async () => _ = await source.FoldAsync( _ => Task.FromResult(first), null!, () => Task.FromResult(other))); - Assert.AreEqual("mapSecondAsync", ex!.ParamName); + ClassicAssert.AreEqual("mapSecondAsync", ex!.ParamName); } [Test] @@ -51,7 +50,7 @@ public void FoldAsyncWithOtherFactoryAsync_OtherFactoryAsyncIsNull_ExpectArgumen async () => _ = await source.FoldAsync( _ => Task.FromResult(first), _ => Task.FromResult(second), otherFactoryAsync)); - Assert.AreEqual("otherFactoryAsync", ex!.ParamName); + ClassicAssert.AreEqual("otherFactoryAsync", ex!.ParamName); } [Test] @@ -66,7 +65,7 @@ public async Task FoldAsyncWithOtherFactoryAsync_SourceIsDefault_ExpectOther() var actual = await source.FoldAsync( _ => Task.FromResult(first), _ => Task.FromResult(second), () => Task.FromResult(other)); - Assert.AreEqual(other, actual); + ClassicAssert.AreEqual(other, actual); } [Test] @@ -81,7 +80,7 @@ public async Task FoldAsyncWithOtherFactoryAsync_SourceIsFirst_ExpectFirstResult var actual = await source.FoldAsync( _ => Task.FromResult(first), _ => Task.FromResult(second), () => Task.FromResult(other)); - Assert.AreEqual(first, actual); + ClassicAssert.AreEqual(first, actual); } [Test] @@ -96,6 +95,6 @@ public async Task FoldAsyncWithOtherFactoryAsync_SourceIsSecond_ExpectSecondResu var actual = await source.FoldAsync( _ => Task.FromResult(first), _ => Task.FromResult(second), () => Task.FromResult(other)); - Assert.AreEqual(second, actual); + ClassicAssert.AreEqual(second, actual); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Fold/FoldValueAsync.Other.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Fold/FoldValueAsync.Other.cs similarity index 88% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Fold/FoldValueAsync.Other.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Fold/FoldValueAsync.Other.cs index 44b51797..25e0cc54 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Fold/FoldValueAsync.Other.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Fold/FoldValueAsync.Other.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; using static PrimeFuncPack.UnitTest.TestData; @@ -19,7 +18,7 @@ public void FoldValueAsyncWithOther_MapFirstAsyncIsNull_ExpectArgumentNullExcept var ex = Assert.ThrowsAsync( async () => _ = await source.FoldValueAsync(null!, _ => ValueTask.FromResult(second), other)); - Assert.AreEqual("mapFirstAsync", ex!.ParamName); + ClassicAssert.AreEqual("mapFirstAsync", ex!.ParamName); } [Test] @@ -33,7 +32,7 @@ public void FoldValueAsyncWithOther_MapSecondAsyncIsNull_ExpectArgumentNullExcep var ex = Assert.ThrowsAsync( async () => _ = await source.FoldValueAsync(_ => ValueTask.FromResult(first), null!, other)); - Assert.AreEqual("mapSecondAsync", ex!.ParamName); + ClassicAssert.AreEqual("mapSecondAsync", ex!.ParamName); } [Test] @@ -48,7 +47,7 @@ public async Task FoldValueAsyncWithOther_SourceIsDefault_ExpectOther() var actual = await source.FoldValueAsync( _ => ValueTask.FromResult(first), _ => ValueTask.FromResult(second), other); - Assert.AreEqual(other, actual); + ClassicAssert.AreEqual(other, actual); } [Test] @@ -62,7 +61,7 @@ public async Task FoldValueAsyncWithOther_SourceIsFirst_ExpectFirstResult() var actual = await source.FoldValueAsync( static _ => default(ValueTask), _ => ValueTask.FromResult(second), other); - Assert.IsNull(actual); + ClassicAssert.IsNull(actual); } [Test] @@ -79,6 +78,6 @@ public async Task FoldValueAsyncWithOther_SourceIsSecond_ExpectSecondResult() _ => ValueTask.FromResult(second), other); - Assert.AreEqual(second, actual); + ClassicAssert.AreEqual(second, actual); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Fold/FoldValueAsync.OtherFactory.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Fold/FoldValueAsync.OtherFactory.cs similarity index 89% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Fold/FoldValueAsync.OtherFactory.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Fold/FoldValueAsync.OtherFactory.cs index 3f1d7970..52d60495 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Fold/FoldValueAsync.OtherFactory.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Fold/FoldValueAsync.OtherFactory.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; using static PrimeFuncPack.UnitTest.TestData; @@ -19,7 +18,7 @@ public void FoldValueAsyncWithOtherFactory_MapFirstAsyncIsNull_ExpectArgumentNul var ex = Assert.ThrowsAsync( async () => _ = await source.FoldValueAsync(null!, _ => ValueTask.FromResult(second), () => other)); - Assert.AreEqual("mapFirstAsync", ex!.ParamName); + ClassicAssert.AreEqual("mapFirstAsync", ex!.ParamName); } [Test] @@ -33,7 +32,7 @@ public void FoldValueAsyncWithOtherFactory_MapSecondAsyncIsNull_ExpectArgumentNu var ex = Assert.ThrowsAsync( async () => _ = await source.FoldValueAsync(_ => ValueTask.FromResult(first), null!, () => other)); - Assert.AreEqual("mapSecondAsync", ex!.ParamName); + ClassicAssert.AreEqual("mapSecondAsync", ex!.ParamName); } [Test] @@ -49,7 +48,7 @@ public void FoldValueAsyncWithOtherFactory_OtherFactoryIsNull_ExpectArgumentNull async () => _ = await source.FoldValueAsync( _ => ValueTask.FromResult(first), _ => ValueTask.FromResult(second), otherFactory)); - Assert.AreEqual("otherFactory", ex!.ParamName); + ClassicAssert.AreEqual("otherFactory", ex!.ParamName); } [Test] @@ -64,7 +63,7 @@ public async Task FoldValueAsyncWithOtherFactory_SourceIsDefault_ExpectOther() var actual = await source.FoldValueAsync( _ => ValueTask.FromResult(first), _ => ValueTask.FromResult(second), () => other); - Assert.AreEqual(other, actual); + ClassicAssert.AreEqual(other, actual); } [Test] @@ -79,7 +78,7 @@ public async Task FoldValueAsyncWithOtherFactory_SourceIsFirst_ExpectFirstResult var actual = await source.FoldValueAsync( _ => ValueTask.FromResult(first), _ => ValueTask.FromResult(second), () => other); - Assert.AreEqual(first, actual); + ClassicAssert.AreEqual(first, actual); } [Test] @@ -94,6 +93,6 @@ public async Task FoldValueAsyncWithOtherFactory_SourceIsSecond_ExpectSecondResu var actual = await source.FoldValueAsync( _ => ValueTask.FromResult(first), _ => ValueTask.FromResult(second), () => other); - Assert.AreEqual(second, actual); + ClassicAssert.AreEqual(second, actual); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Fold/FoldValueAsync.OtherFactoryAsync.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Fold/FoldValueAsync.OtherFactoryAsync.cs similarity index 89% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Fold/FoldValueAsync.OtherFactoryAsync.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Fold/FoldValueAsync.OtherFactoryAsync.cs index 3dcb346e..15ae2e71 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Fold/FoldValueAsync.OtherFactoryAsync.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Fold/FoldValueAsync.OtherFactoryAsync.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; using static PrimeFuncPack.UnitTest.TestData; @@ -20,7 +19,7 @@ public void FoldValueAsyncWithOtherFactoryAsync_MapFirstAsyncIsNull_ExpectArgume async () => _ = await source.FoldValueAsync( null!, _ => ValueTask.FromResult(second), () => ValueTask.FromResult(other))); - Assert.AreEqual("mapFirstAsync", ex!.ParamName); + ClassicAssert.AreEqual("mapFirstAsync", ex!.ParamName); } [Test] @@ -35,7 +34,7 @@ public void FoldValueAsyncWithOtherFactoryAsync_MapSecondAsyncIsNull_ExpectArgum async () => _ = await source.FoldValueAsync( _ => ValueTask.FromResult(first), null!, () => ValueTask.FromResult(other))); - Assert.AreEqual("mapSecondAsync", ex!.ParamName); + ClassicAssert.AreEqual("mapSecondAsync", ex!.ParamName); } [Test] @@ -51,7 +50,7 @@ public void FoldValueAsyncWithOtherFactoryAsync_OtherFactoryAsyncIsNull_ExpectAr async () => _ = await source.FoldValueAsync( _ => ValueTask.FromResult(first), _ => ValueTask.FromResult(second), otherFactoryAsync)); - Assert.AreEqual("otherFactoryAsync", ex!.ParamName); + ClassicAssert.AreEqual("otherFactoryAsync", ex!.ParamName); } [Test] @@ -68,7 +67,7 @@ public async Task FoldValueAsyncWithOtherFactoryAsync_SourceIsDefault_ExpectOthe _ => ValueTask.FromResult(second), () => ValueTask.FromResult(other)); - Assert.AreEqual(other, actual); + ClassicAssert.AreEqual(other, actual); } [Test] @@ -85,7 +84,7 @@ public async Task FoldValueAsyncWithOtherFactoryAsync_SourceIsFirst_ExpectFirstR _ => ValueTask.FromResult(second), () => ValueTask.FromResult(other)); - Assert.AreEqual(first, actual); + ClassicAssert.AreEqual(first, actual); } [Test] @@ -102,6 +101,6 @@ public async Task FoldValueAsyncWithOtherFactoryAsync_SourceIsSecond_ExpectSecon _ => ValueTask.FromResult(second), () => ValueTask.FromResult(other)); - Assert.AreEqual(second, actual); + ClassicAssert.AreEqual(second, actual); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Map/Map.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Map/Map.cs similarity index 87% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Map/Map.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Map/Map.cs index 9b070f80..f04ecb39 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Map/Map.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Map/Map.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; @@ -15,7 +14,7 @@ public void Map_MapFirstFuncIsNull_ExpectArgumentNullException( var ex = Assert.Throws( () => _ = source.Map(null!, _ => SomeTextStructType)); - Assert.AreEqual("mapFirst", ex!.ParamName); + ClassicAssert.AreEqual("mapFirst", ex!.ParamName); } [Test] @@ -26,7 +25,7 @@ public void Map_MapSecondFuncIsNull_ExpectArgumentNullException( var ex = Assert.Throws( () => _ = source.Map(_ => 275, null!)); - Assert.AreEqual("mapSecond", ex!.ParamName); + ClassicAssert.AreEqual("mapSecond", ex!.ParamName); } [Test] @@ -41,7 +40,7 @@ public void Map_SourceIsFirst_ExpectMapppedValueFirstUnion() var actual = source.Map(_ => mappedFirst, _ => mappedSecond); var expected = TaggedUnion.First(mappedFirst); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } [Test] @@ -56,7 +55,7 @@ public void Map_SourceIsSecond_ExpectMappedValueSecondUnion() var actual = source.Map(_ => mappedFirst, _ => mappedSecond); var expected = TaggedUnion.Second(mappedSecond); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } [Test] @@ -70,6 +69,6 @@ public void Map_SourceIsDefault_ExpectDefault() var actual = source.Map(_ => mappedFirst, _ => mappedSecond); var expected = default(TaggedUnion); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Map/MapAsync.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Map/MapAsync.cs similarity index 88% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Map/MapAsync.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Map/MapAsync.cs index bdb0df05..d78dc6ec 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Map/MapAsync.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Map/MapAsync.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; using static PrimeFuncPack.UnitTest.TestData; @@ -16,7 +15,7 @@ public void MapAsync_MapFirstAsyncFuncIsNull_ExpectArgumentNullException( var ex = Assert.ThrowsAsync( async () => _ = await source.MapAsync(null!, _ => Task.FromResult(SomeString))); - Assert.AreEqual("mapFirstAsync", ex!.ParamName); + ClassicAssert.AreEqual("mapFirstAsync", ex!.ParamName); } [Test] @@ -27,7 +26,7 @@ public void MapAsync_MapSecondAsyncFuncIsNull_ExpectArgumentNullException( var ex = Assert.ThrowsAsync( async () => _ = await source.MapAsync(_ => Task.FromResult(21.5m), null!)); - Assert.AreEqual("mapSecondAsync", ex!.ParamName); + ClassicAssert.AreEqual("mapSecondAsync", ex!.ParamName); } [Test] @@ -42,7 +41,7 @@ public async Task MapAsync_SourceIsFirst_ExpectMapppedValueFirstUnion() var actual = await source.MapAsync(_ => Task.FromResult(mappedFirst), _ => Task.FromResult(mappedSecond)); var expected = TaggedUnion.First(mappedFirst); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } [Test] @@ -57,7 +56,7 @@ public async Task MapAsync_SourceIsSecond_ExpectMappedValueSecondUnion() var actual = await source.MapAsync(_ => Task.FromResult(mappedFirst), _ => Task.FromResult(mappedSecond)); var expected = TaggedUnion.Second(mappedSecond); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } [Test] @@ -71,6 +70,6 @@ public async Task MapAsync_SourceIsDefault_ExpectDefault() var actual = await source.MapAsync(_ => Task.FromResult(mappedFirst), _ => Task.FromResult(mappedSecond)); var expected = default(TaggedUnion); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Map/MapValueAsync.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Map/MapValueAsync.cs similarity index 89% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Map/MapValueAsync.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Map/MapValueAsync.cs index dfcada83..fd13da8a 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Map/MapValueAsync.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Map/MapValueAsync.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; using static PrimeFuncPack.UnitTest.TestData; @@ -16,7 +15,7 @@ public void MapValueAsync_MapFirstAsyncFuncIsNull_ExpectArgumentNullException( var ex = Assert.ThrowsAsync( async () => _ = await source.MapValueAsync(null!, _ => ValueTask.FromResult(157))); - Assert.AreEqual("mapFirstAsync", ex!.ParamName); + ClassicAssert.AreEqual("mapFirstAsync", ex!.ParamName); } [Test] @@ -27,7 +26,7 @@ public void MapValueAsync_MapSecondAsyncFuncIsNull_ExpectArgumentNullException( var ex = Assert.ThrowsAsync( async () => _ = await source.MapValueAsync(_ => ValueTask.FromResult(1), null!)); - Assert.AreEqual("mapSecondAsync", ex!.ParamName); + ClassicAssert.AreEqual("mapSecondAsync", ex!.ParamName); } [Test] @@ -44,7 +43,7 @@ public async Task MapValueAsync_SourceIsFirst_ExpectMapppedValueFirstUnion() _ => ValueTask.FromResult(mappedSecond)); var expected = TaggedUnion.First(mappedFirst); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } [Test] @@ -61,7 +60,7 @@ public async Task MapValueAsync_SourceIsSecond_ExpectMappedValueSecondUnion() _ => ValueTask.FromResult(mappedSecond)); var expected = TaggedUnion.Second(mappedSecond); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } [Test] @@ -77,6 +76,6 @@ public async Task MapValueAsync_SourceIsDefault_ExpectDefault() _ => ValueTask.FromResult(mappedSecond)); var expected = default(TaggedUnion); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/MapFirst/MapFirst.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/MapFirst/MapFirst.cs similarity index 86% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/MapFirst/MapFirst.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/MapFirst/MapFirst.cs index b941dcc4..0ac83af5 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/MapFirst/MapFirst.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/MapFirst/MapFirst.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; @@ -13,7 +12,7 @@ public void MapFirst_MapFirstFuncIsNull_ExpectArgumentNullException( TaggedUnion source) { var ex = Assert.Throws(() => _ = source.MapFirst(null!)); - Assert.AreEqual("mapFirst", ex!.ParamName); + ClassicAssert.AreEqual("mapFirst", ex!.ParamName); } [Test] @@ -26,7 +25,7 @@ public void MapFirst_SourceIsFirst_ExpectMappedValueFirstUnion() var actual = source.MapFirst(_ => mappedValue); var expected = TaggedUnion.First(mappedValue); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } [Test] @@ -39,7 +38,7 @@ public void MapFirst_SourceIsSecond_ExpectSourceValueSecondUnion() var actual = source.MapFirst(_ => mappedValue); var expected = TaggedUnion.Second(sourceValue); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } [Test] @@ -51,6 +50,6 @@ public void MapFirst_SourceIsDefault_ExpectDefault() var actual = source.MapFirst(_ => mappedValue); var expected = default(TaggedUnion); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/MapFirst/MapFirstAsync.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/MapFirst/MapFirstAsync.cs similarity index 87% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/MapFirst/MapFirstAsync.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/MapFirst/MapFirstAsync.cs index dc1eeb2a..a77b675b 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/MapFirst/MapFirstAsync.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/MapFirst/MapFirstAsync.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; using static PrimeFuncPack.UnitTest.TestData; @@ -16,7 +15,7 @@ public void MapFirstAsync_MapFirstAsyncFuncIsNull_ExpectArgumentNullException( var ex = Assert.ThrowsAsync( async () => _ = await source.MapFirstAsync(null!)); - Assert.AreEqual("mapFirstAsync", ex!.ParamName); + ClassicAssert.AreEqual("mapFirstAsync", ex!.ParamName); } [Test] @@ -29,7 +28,7 @@ public async Task MapFirstAsync_SourceIsFirst_ExpectMappedValueFirstUnion() var actual = await source.MapFirstAsync(_ => Task.FromResult(mappedValue)); var expected = TaggedUnion.First(mappedValue); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } [Test] @@ -42,7 +41,7 @@ public async Task MapFirstAsync_SourceIsSecond_ExpectSourceValueSecondUnion() var actual = await source.MapFirstAsync(_ => Task.FromResult(mappedValue)); var expected = TaggedUnion.Second(sourceValue); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } [Test] @@ -54,6 +53,6 @@ public async Task MapFirstAsync_SourceIsDefault_ExpectDefault() var actual = await source.MapFirstAsync(_ => Task.FromResult(mappedValue)); var expected = default(TaggedUnion); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/MapFirst/MapFirstValueAsync.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/MapFirst/MapFirstValueAsync.cs similarity index 87% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/MapFirst/MapFirstValueAsync.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/MapFirst/MapFirstValueAsync.cs index a7e4c8ac..f5db7b90 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/MapFirst/MapFirstValueAsync.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/MapFirst/MapFirstValueAsync.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; using static PrimeFuncPack.UnitTest.TestData; @@ -16,7 +15,7 @@ public void MapFirstValueAsync_MapFirstValueAsyncFuncIsNull_ExpectArgumentNullEx var ex = Assert.ThrowsAsync( async () => _ = await source.MapFirstValueAsync(null!)); - Assert.AreEqual("mapFirstAsync", ex!.ParamName); + ClassicAssert.AreEqual("mapFirstAsync", ex!.ParamName); } [Test] @@ -29,7 +28,7 @@ public async Task MapFirstValueAsync_SourceIsFirst_ExpectMappedValueFirstUnion() var actual = await source.MapFirstValueAsync(_ => ValueTask.FromResult(mappedValue)); var expected = TaggedUnion.First(mappedValue); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } [Test] @@ -42,7 +41,7 @@ public async Task MapFirstValueAsync_SourceIsSecond_ExpectSourceValueSecondUnion var actual = await source.MapFirstValueAsync(_ => ValueTask.FromResult(mappedValue)); var expected = TaggedUnion.Second(sourceValue); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } [Test] @@ -54,6 +53,6 @@ public async Task MapFirstValueAsync_SourceIsDefault_ExpectDefault() var actual = await source.MapFirstValueAsync(_ => ValueTask.FromResult(mappedValue)); var expected = default(TaggedUnion); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/MapSecond/MapSecond.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/MapSecond/MapSecond.cs similarity index 86% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/MapSecond/MapSecond.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/MapSecond/MapSecond.cs index 4e09c1f5..5d86f094 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/MapSecond/MapSecond.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/MapSecond/MapSecond.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; @@ -13,7 +12,7 @@ public void MapSecond_MapSecondFuncIsNull_ExpectArgumentNullException( TaggedUnion source) { var ex = Assert.Throws(() => _ = source.MapSecond(null!)); - Assert.AreEqual("mapSecond", ex!.ParamName); + ClassicAssert.AreEqual("mapSecond", ex!.ParamName); } [Test] @@ -26,7 +25,7 @@ public void MapSecond_SourceIsFirst_ExpectSourceValueFirstUnion() var actual = source.MapSecond(_ => mappedValue); var expected = TaggedUnion.First(sourceValue); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } [Test] @@ -39,7 +38,7 @@ public void MapSecond_SourceIsSecond_ExpectMappedValueSecondUnion() var actual = source.MapSecond(_ => mappedValue); var expected = TaggedUnion.Second(mappedValue); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } [Test] @@ -51,6 +50,6 @@ public void MapSecond_SourceIsDefault_ExpectDefault() var actual = source.MapSecond(_ => mappedValue); var expected = default(TaggedUnion); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/MapSecond/MapSecondAsync.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/MapSecond/MapSecondAsync.cs similarity index 87% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/MapSecond/MapSecondAsync.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/MapSecond/MapSecondAsync.cs index b4a3fb69..822d0c1c 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/MapSecond/MapSecondAsync.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/MapSecond/MapSecondAsync.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; using static PrimeFuncPack.UnitTest.TestData; @@ -16,7 +15,7 @@ public void MapSecondAsync_MapSecondAsyncFuncIsNull_ExpectArgumentNullException( var ex = Assert.ThrowsAsync( async () => _ = await source.MapSecondAsync(null!)); - Assert.AreEqual("mapSecondAsync", ex!.ParamName); + ClassicAssert.AreEqual("mapSecondAsync", ex!.ParamName); } [Test] @@ -29,7 +28,7 @@ public async Task MapSecondAsync_SourceIsFirst_ExpectSourceValueFirstUnion() var actual = await source.MapSecondAsync(_ => Task.FromResult(mappedValue)); var expected = TaggedUnion.First(sourceValue); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } [Test] @@ -42,7 +41,7 @@ public async Task MapSecondAsync_SourceIsSecond_ExpectMapppedValueSecondUnion() var actual = await source.MapSecondAsync(_ => Task.FromResult(mappedValue)); var expected = TaggedUnion.Second(mappedValue); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } [Test] @@ -54,6 +53,6 @@ public async Task MapSecondAsync_SourceIsDefault_ExpectDefault() var actual = await source.MapSecondAsync(_ => Task.FromResult(mappedValue)); var expected = default(TaggedUnion); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/MapSecond/MapSecondValueAsync.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/MapSecond/MapSecondValueAsync.cs similarity index 87% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/MapSecond/MapSecondValueAsync.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/MapSecond/MapSecondValueAsync.cs index c7e6e10b..4b4db740 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/MapSecond/MapSecondValueAsync.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/MapSecond/MapSecondValueAsync.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; using static PrimeFuncPack.UnitTest.TestData; @@ -16,7 +15,7 @@ public void MapSecondValueAsync_MapSecondValueAsyncFuncIsNull_ExpectArgumentNull var ex = Assert.ThrowsAsync( async () => _ = await source.MapSecondValueAsync(null!)); - Assert.AreEqual("mapSecondAsync", ex!.ParamName); + ClassicAssert.AreEqual("mapSecondAsync", ex!.ParamName); } [Test] @@ -29,7 +28,7 @@ public async Task MapSecondValueAsync_SourceIsFirst_ExpectSourceValueFirstUnion( var actual = await source.MapSecondValueAsync(_ => ValueTask.FromResult(mappedValue)); var expected = TaggedUnion.First(sourceValue); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } [Test] @@ -42,7 +41,7 @@ public async Task MapSecondValueAsync_SourceIsSecond_ExpectMapppedValueSecondUni var actual = await source.MapSecondValueAsync(_ => ValueTask.FromResult(mappedValue)); var expected = TaggedUnion.Second(mappedValue); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } [Test] @@ -54,6 +53,6 @@ public async Task MapSecondValueAsync_SourceIsDefault_ExpectDefault() var actual = await source.MapSecondValueAsync(_ => ValueTask.FromResult(mappedValue)); var expected = new TaggedUnion(); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Or/Or.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Or/Or.cs similarity index 83% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Or/Or.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Or/Or.cs index 2720ca71..97649b4f 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Or/Or.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Or/Or.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; @@ -13,7 +12,7 @@ public void Or_OtherFactoryIsNull_ExpectArgumentNullException( TaggedUnion source) { var ex = Assert.Throws(() => _ = source.Or(null!)); - Assert.AreEqual("otherFactory", ex!.ParamName); + ClassicAssert.AreEqual("otherFactory", ex!.ParamName); } [Test] @@ -23,7 +22,7 @@ public void Or_SourceIsFirst_ExpectSource() var other = TaggedUnion.Second(SomeTextStructType); var actual = source.Or(() => other); - Assert.AreEqual(source, actual); + ClassicAssert.AreEqual(source, actual); } [Test] @@ -33,7 +32,7 @@ public void Or_SourceIsSecond_ExpectSource() var other = TaggedUnion.Second(PlusFifteenIdRefType); var actual = source.Or(() => other); - Assert.AreEqual(source, actual); + ClassicAssert.AreEqual(source, actual); } [Test] @@ -43,6 +42,6 @@ public void Or_SourceIsDefault_ExpectOther() var other = TaggedUnion.First(new object()); var actual = source.Or(() => other); - Assert.AreEqual(other, actual); + ClassicAssert.AreEqual(other, actual); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Or/OrAsync.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Or/OrAsync.cs similarity index 85% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Or/OrAsync.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Or/OrAsync.cs index 72654968..ab75790e 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Or/OrAsync.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Or/OrAsync.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; using static PrimeFuncPack.UnitTest.TestData; @@ -14,7 +13,7 @@ public void OrAsync_OtherFactoryAsyncIsNull_ExpectArgumentNullException( TaggedUnion source) { var ex = Assert.ThrowsAsync(async () => _ = await source.OrAsync(null!)); - Assert.AreEqual("otherFactoryAsync", ex!.ParamName); + ClassicAssert.AreEqual("otherFactoryAsync", ex!.ParamName); } [Test] @@ -24,7 +23,7 @@ public async Task OrAsync_SourceIsFirst_ExpectSource() var other = TaggedUnion.First(ZeroIdRefType); var actual = await source.OrAsync(() => Task.FromResult(other)); - Assert.AreEqual(source, actual); + ClassicAssert.AreEqual(source, actual); } [Test] @@ -34,7 +33,7 @@ public async Task OrAsync_SourceIsSecond_ExpectSource() var other = default(TaggedUnion); var actual = await source.OrAsync(() => Task.FromResult(other)); - Assert.AreEqual(source, actual); + ClassicAssert.AreEqual(source, actual); } [Test] @@ -44,6 +43,6 @@ public async Task OrAsync_SourceIsDefault_ExpectOther() var other = TaggedUnion.Second(new RefType()); var actual = await source.OrAsync(() => Task.FromResult(other)); - Assert.AreEqual(other, actual); + ClassicAssert.AreEqual(other, actual); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Or/OrValueAsync.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Or/OrValueAsync.cs similarity index 85% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Or/OrValueAsync.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Or/OrValueAsync.cs index f1964507..a3fc2ffd 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/Or/OrValueAsync.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/Or/OrValueAsync.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; using static PrimeFuncPack.UnitTest.TestData; @@ -14,7 +13,7 @@ public void OrValueAsync_OtherFactoryAsyncIsNull_ExpectArgumentNullException( TaggedUnion source) { var ex = Assert.ThrowsAsync(async () => _ = await source.OrValueAsync(null!)); - Assert.AreEqual("otherFactoryAsync", ex!.ParamName); + ClassicAssert.AreEqual("otherFactoryAsync", ex!.ParamName); } [Test] @@ -24,7 +23,7 @@ public async Task OrValueAsync_SourceIsFirst_ExpectSource() var other = default(TaggedUnion); var actual = await source.OrValueAsync(() => ValueTask.FromResult(other)); - Assert.AreEqual(source, actual); + ClassicAssert.AreEqual(source, actual); } [Test] @@ -34,7 +33,7 @@ public async Task OrValueAsync_SourceIsSecond_ExpectSource() var other = TaggedUnion.Second(SomeTextStructType); var actual = await source.OrValueAsync(() => ValueTask.FromResult(other)); - Assert.AreEqual(source, actual); + ClassicAssert.AreEqual(source, actual); } [Test] @@ -44,6 +43,6 @@ public async Task OrValueAsync_SourceIsDefault_ExpectOther() var other = TaggedUnion.First(MinusFifteenIdRefType); var actual = await source.OrValueAsync(() => ValueTask.FromResult(other)); - Assert.AreEqual(other, actual); + ClassicAssert.AreEqual(other, actual); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/OrThrow/FirstOrThrow.ExceptionFactory.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/OrThrow/FirstOrThrow.ExceptionFactory.cs similarity index 80% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/OrThrow/FirstOrThrow.ExceptionFactory.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/OrThrow/FirstOrThrow.ExceptionFactory.cs index f7733994..71712b32 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/OrThrow/FirstOrThrow.ExceptionFactory.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/OrThrow/FirstOrThrow.ExceptionFactory.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; @@ -13,7 +12,7 @@ public void FirstOrThrowWithFactory_ExceptionFactoryIsNull_ExpectArgumentNullExc var source = TaggedUnion.First(SomeTextStructType); var ex = Assert.Throws(() => _ = source.FirstOrThrow(null!)); - Assert.AreEqual("exceptionFactory", ex!.ParamName); + ClassicAssert.AreEqual("exceptionFactory", ex!.ParamName); } [Test] @@ -25,7 +24,7 @@ public void FirstOrThrowWithFactory_SourceIsFirst_ExpectSourceValue() var resultException = new SomeException(); var actual = source.FirstOrThrow(() => resultException); - Assert.AreEqual(sourceValue, actual); + ClassicAssert.AreEqual(sourceValue, actual); } [Test] @@ -34,10 +33,10 @@ public void FirstOrThrowWithFactory_SourceIsSecond_ExpectCreatedException() var source = TaggedUnion.Second(new object()); var resultException = new SomeException(); - var actualExcepption = Assert.Throws( + var actualException = Assert.Throws( () => _ = source.FirstOrThrow(() => resultException)); - Assert.AreSame(resultException, actualExcepption); + ClassicAssert.AreSame(resultException, actualException); } [Test] @@ -49,6 +48,6 @@ public void FirstOrThrowWithFactory_SourceIsDefault_ExpectInvalidOperationExcept var actualException = Assert.Throws( () => _ = source.FirstOrThrow(() => resultException)); - Assert.AreSame(resultException, actualException); + ClassicAssert.AreSame(resultException, actualException); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/OrThrow/FirstOrThrow.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/OrThrow/FirstOrThrow.cs similarity index 91% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/OrThrow/FirstOrThrow.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/OrThrow/FirstOrThrow.cs index 3bce7084..158a3579 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/OrThrow/FirstOrThrow.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/OrThrow/FirstOrThrow.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; @@ -15,7 +14,7 @@ public void FirstOrThrow_SourceIsFirst_ExpectSourceValue( var source = TaggedUnion.First(sourceValue); var actual = source.FirstOrThrow(); - Assert.AreEqual(sourceValue, actual); + ClassicAssert.AreEqual(sourceValue, actual); } [Test] diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/OrThrow/SecondOrThrow.ExceptionFactory.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/OrThrow/SecondOrThrow.ExceptionFactory.cs similarity index 84% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/OrThrow/SecondOrThrow.ExceptionFactory.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/OrThrow/SecondOrThrow.ExceptionFactory.cs index 6b5e5ecd..f631feab 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/OrThrow/SecondOrThrow.ExceptionFactory.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/OrThrow/SecondOrThrow.ExceptionFactory.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; @@ -13,7 +12,7 @@ public void SecondOrThrowWithFactory_ExceptionFactoryIsNull_ExpectArgumentNullEx var source = TaggedUnion.Second(MinusFifteenIdRefType); var ex = Assert.Throws(() => _ = source.SecondOrThrow(null!)); - Assert.AreEqual("exceptionFactory", ex!.ParamName); + ClassicAssert.AreEqual("exceptionFactory", ex!.ParamName); } [Test] @@ -25,7 +24,7 @@ public void SecondOrThrowWithFactory_SourceIsSecond_ExpectSourceValue( var resultException = new SomeException(); var actual = source.SecondOrThrow(() => resultException); - Assert.AreEqual(sourceValue, actual); + ClassicAssert.AreEqual(sourceValue, actual); } [Test] @@ -37,7 +36,7 @@ public void SecondOrThrowWithFactory_SourceIsFirst_ExpectCreatedException() var actualExcepption = Assert.Throws( () => _ = source.SecondOrThrow(() => resultException)); - Assert.AreSame(resultException, actualExcepption); + ClassicAssert.AreSame(resultException, actualExcepption); } [Test] @@ -49,6 +48,6 @@ public void SecondOrThrowWithFactory_SourceIsDefault_ExpectInvalidOperationExcep var actualExcepption = Assert.Throws( () => _ = source.SecondOrThrow(() => resultException)); - Assert.AreSame(resultException, actualExcepption); + ClassicAssert.AreSame(resultException, actualExcepption); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/OrThrow/SecondOrThrow.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/OrThrow/SecondOrThrow.cs similarity index 90% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/OrThrow/SecondOrThrow.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/OrThrow/SecondOrThrow.cs index 355bd505..b6ba57e2 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/OrThrow/SecondOrThrow.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/OrThrow/SecondOrThrow.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; @@ -14,7 +13,7 @@ public void SecondOrThrow_SourceIsSecond_ExpectSourceValue() TaggedUnion source = sourceValue; var actual = source.SecondOrThrow(); - Assert.AreEqual(sourceValue, actual); + ClassicAssert.AreEqual(sourceValue, actual); } [Test] diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/TaggedUnionTest.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/TaggedUnionTest.cs similarity index 71% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/TaggedUnionTest.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/TaggedUnionTest.cs index 036fa11a..d4029d35 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/TaggedUnionTest.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/TaggedUnionTest.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using System; +using System; namespace PrimeFuncPack.Core.Tests; @@ -14,7 +13,7 @@ private static void AssertContains( string? actual, StringComparison comparison = StringComparison.Ordinal) { - Assert.NotNull(actual); - Assert.True(actual!.Contains(expectedSubstring, comparison)); + ClassicAssert.NotNull(actual); + ClassicAssert.True(actual!.Contains(expectedSubstring, comparison)); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/ToString/ToString.First.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/ToString/ToString.First.cs similarity index 92% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/ToString/ToString.First.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/ToString/ToString.First.cs index 6b421f05..540a5d74 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/ToString/ToString.First.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/ToString/ToString.First.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using System.Collections.Generic; using System.Globalization; @@ -22,7 +21,7 @@ public void ToString_SourceIsFirstAndValueIsNull() typeof(StructType).Name, string.Empty); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } [Test] @@ -39,7 +38,7 @@ public void ToString_SourceIsFirstAndValueToStringReturnsNull() typeof(RefType).Name, string.Empty); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } [Test] @@ -66,7 +65,7 @@ public void ToString_SourceIsFirst_ValueToString_Common( typeof(RefType).Name, resultOfValueToString); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } [Test] @@ -95,7 +94,7 @@ public void ToString_SourceIsFirst_Common( typeof(RefType).Name, sourceValue); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } [Test] @@ -113,7 +112,7 @@ public void ToString_SourceIsFirst_DecimalPoint( typeof(RefType).Name, expectedDecimalSubstr); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } private static IEnumerable ToString_SourceIsFirst_DecimalPoint_TestCaseSource() diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/ToString/ToString.None.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/ToString/ToString.None.cs similarity index 82% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/ToString/ToString.None.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/ToString/ToString.None.cs index fe8aff9d..b63a3440 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/ToString/ToString.None.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/ToString/ToString.None.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using System.Globalization; @@ -20,6 +19,6 @@ public void ToString_SourceIsNone() typeof(StructType).Name, typeof(RefType).Name); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } } diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/ToString/ToString.Second.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/ToString/ToString.Second.cs similarity index 92% rename from src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/ToString/ToString.Second.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/ToString/ToString.Second.cs index a444b279..ff0b0d78 100644 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Test/ToString/ToString.Second.cs +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Test/ToString/ToString.Second.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using System.Collections.Generic; using System.Globalization; @@ -22,7 +21,7 @@ public void ToString_SourceIsSecondAndValueIsNull() typeof(StructType?).Name, string.Empty); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } [Test] @@ -39,7 +38,7 @@ public void ToString_SourceIsSecondAndValueToStringReturnsNull() typeof(StubToStringType).Name, string.Empty); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } [Test] @@ -66,7 +65,7 @@ public void ToString_SourceIsSecond_ValueToString_Common( typeof(StubToStringType).Name, resultOfValueToString); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } [Test] @@ -95,7 +94,7 @@ public void ToString_SourceIsSecond_Common( typeof(object).Name, sourceValue); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } [Test] @@ -113,7 +112,7 @@ public void ToString_SourceIsSecond_DecimalPoint( typeof(object).Name, expectedDecimalSubstr); - Assert.AreEqual(expected, actual); + ClassicAssert.AreEqual(expected, actual); } private static IEnumerable ToString_SourceIsSecond_DecimalPoint_TestCaseSource() diff --git a/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Tests.Old.csproj b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Tests.Old.csproj new file mode 100644 index 00000000..161f96d8 --- /dev/null +++ b/src/core-taggeds-union/TaggedUnion.Tests.Old/TaggedUnion.Tests.Old.csproj @@ -0,0 +1,38 @@ + + + + net6.0;net7.0;net8.0 + latest + disable + enable + true + true + false + true + Andrei Sergeev, Pavel Moskovoy + Copyright © 2020-2024 Andrei Sergeev, Pavel Moskovoy + PrimeFuncPack.Core.Tests + PrimeFuncPack.Core.TaggedUnion.Tests.Old + + + + CS0618;NUnit2001;NUnit2004;NUnit2005;NUnit2006;NUnit2015;NUnit2017;NUnit2018 + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TestData/SomeException.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TestData/SomeException.cs similarity index 100% rename from src/core-taggeds-union/TaggedUnion.Tests/TestData/SomeException.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TestData/SomeException.cs diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TestData/StubToStringType.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TestData/StubToStringType.cs similarity index 100% rename from src/core-taggeds-union/TaggedUnion.Tests/TestData/StubToStringType.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TestData/StubToStringType.cs diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TestData/TestDataSource.cs b/src/core-taggeds-union/TaggedUnion.Tests.Old/TestData/TestDataSource.cs similarity index 100% rename from src/core-taggeds-union/TaggedUnion.Tests/TestData/TestDataSource.cs rename to src/core-taggeds-union/TaggedUnion.Tests.Old/TestData/TestDataSource.cs diff --git a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Tests.csproj b/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Tests.csproj deleted file mode 100644 index 533a5a83..00000000 --- a/src/core-taggeds-union/TaggedUnion.Tests/TaggedUnion.Tests.csproj +++ /dev/null @@ -1,27 +0,0 @@ - - - - net6.0;net7.0 - disable - enable - true - true - false - Andrei Sergeev, Pavel Moskovoy - Copyright © 2020-2023 Andrei Sergeev, Pavel Moskovoy - PrimeFuncPack.Core.Tests - PrimeFuncPack.Core.TaggedUnion.Tests - - - - - - - - - - - - - - diff --git a/src/core-taggeds-union/TaggedUnion/TaggedUnion.T/TaggedUnion.T.cs b/src/core-taggeds-union/TaggedUnion/TaggedUnion.T/TaggedUnion.T.cs index 1ea5cc9d..e0ae7ea1 100644 --- a/src/core-taggeds-union/TaggedUnion/TaggedUnion.T/TaggedUnion.T.cs +++ b/src/core-taggeds-union/TaggedUnion/TaggedUnion.T/TaggedUnion.T.cs @@ -1,5 +1,6 @@ namespace System; +[Obsolete("TaggedUnion is obsolete and will be removed in Taggeds v3.0.", error: false)] public readonly partial struct TaggedUnion : IEquatable> { private readonly Tag tag; diff --git a/src/core-taggeds-union/TaggedUnion/TaggedUnion.csproj b/src/core-taggeds-union/TaggedUnion/TaggedUnion.csproj index 678ce4f8..6e328b79 100644 --- a/src/core-taggeds-union/TaggedUnion/TaggedUnion.csproj +++ b/src/core-taggeds-union/TaggedUnion/TaggedUnion.csproj @@ -1,7 +1,8 @@  - net6.0;net7.0 + net6.0;net7.0;net8.0 + latest disable enable true @@ -13,11 +14,11 @@ https://github.com/pfpack/pfpack-core-taggeds pfpack Andrei Sergeev, Pavel Moskovoy - Copyright © 2020-2023 Andrei Sergeev, Pavel Moskovoy + Copyright © 2020-2024 Andrei Sergeev, Pavel Moskovoy PrimeFuncPack Core.TaggedUnion is a core library for .NET consisting of Tagged Union targeted for use in functional programming. System PrimeFuncPack.Core.TaggedUnion - 2.1.0-preview.2 + 2.1.0-preview.3 @@ -32,7 +33,7 @@ - + diff --git a/src/core-taggeds-union/TaggedUnion/TaggedUnion/TaggedUnion.cs b/src/core-taggeds-union/TaggedUnion/TaggedUnion/TaggedUnion.cs index 8e311e5a..d5097094 100644 --- a/src/core-taggeds-union/TaggedUnion/TaggedUnion/TaggedUnion.cs +++ b/src/core-taggeds-union/TaggedUnion/TaggedUnion/TaggedUnion.cs @@ -1,5 +1,6 @@ namespace System; +[Obsolete("TaggedUnion is obsolete and will be removed in Taggeds v3.0.", error: false)] public static partial class TaggedUnion { } diff --git a/src/core-taggeds/Taggeds.Tests.Old/TaggedsExtensionsTests/Optional.ToTaggedUnion.cs b/src/core-taggeds/Taggeds.Tests.Old/TaggedsExtensionsTests/Obsolete.Optional.ToTaggedUnion.cs similarity index 96% rename from src/core-taggeds/Taggeds.Tests.Old/TaggedsExtensionsTests/Optional.ToTaggedUnion.cs rename to src/core-taggeds/Taggeds.Tests.Old/TaggedsExtensionsTests/Obsolete.Optional.ToTaggedUnion.cs index 76f0bbe2..5f2bed61 100644 --- a/src/core-taggeds/Taggeds.Tests.Old/TaggedsExtensionsTests/Optional.ToTaggedUnion.cs +++ b/src/core-taggeds/Taggeds.Tests.Old/TaggedsExtensionsTests/Obsolete.Optional.ToTaggedUnion.cs @@ -5,6 +5,7 @@ namespace PrimeFuncPack.Core.Tests; partial class TaggedsExtensionsTests { + [Obsolete] [Test] [TestCaseSource(typeof(TestDataSource), nameof(TestDataSource.ObjectNullableTestSource))] public void Optional_ToTaggedUnion_OptionalIsPresent_ExpectActualIsFirst( @@ -17,6 +18,7 @@ public void Optional_ToTaggedUnion_OptionalIsPresent_ExpectActualIsFirst( Assert.That(actual, Is.EqualTo(expected)); } + [Obsolete] [Test] public void Optional_ToTaggedUnion_OptionalIsAbsent_ExpectActualIsSecond() { diff --git a/src/core-taggeds/Taggeds.Tests.Old/TaggedsExtensionsTests/Result.ToTaggedUnion.cs b/src/core-taggeds/Taggeds.Tests.Old/TaggedsExtensionsTests/Obsolete.Result.ToTaggedUnion.cs similarity index 97% rename from src/core-taggeds/Taggeds.Tests.Old/TaggedsExtensionsTests/Result.ToTaggedUnion.cs rename to src/core-taggeds/Taggeds.Tests.Old/TaggedsExtensionsTests/Obsolete.Result.ToTaggedUnion.cs index 08a55128..0d11f8af 100644 --- a/src/core-taggeds/Taggeds.Tests.Old/TaggedsExtensionsTests/Result.ToTaggedUnion.cs +++ b/src/core-taggeds/Taggeds.Tests.Old/TaggedsExtensionsTests/Obsolete.Result.ToTaggedUnion.cs @@ -6,6 +6,7 @@ namespace PrimeFuncPack.Core.Tests; partial class TaggedUnionResultExtensions { + [Obsolete] [Test] [TestCaseSource(typeof(TestDataSource), nameof(TestDataSource.FailureDefaultTestSource))] public void Result_ToTaggedUnion_SourceResultIsDefault_ExpectUnionSecondOfDefaultValue( @@ -17,6 +18,7 @@ public void Result_ToTaggedUnion_SourceResultIsDefault_ExpectUnionSecondOfDefaul Assert.That(actual, Is.EqualTo(expected)); } + [Obsolete] [Test] [TestCaseSource(typeof(TestDataSource), nameof(TestDataSource.FailureSomeTextStructTypeTestSource))] public void Result_ToTaggedUnion_SourceResultIsFailure_ExpectUnionSecondOfSourceFailureValue( @@ -28,6 +30,7 @@ public void Result_ToTaggedUnion_SourceResultIsFailure_ExpectUnionSecondOfSource Assert.That(actual, Is.EqualTo(expected)); } + [Obsolete] [Test] [TestCaseSource(typeof(TestDataSource), nameof(TestDataSource.SuccessNullTestSource))] public void Result_ToTaggedUnion_SourceResultIsSuccessAndSourceValueIsNull_ExpectUnionFirstOfNullValue( @@ -39,6 +42,7 @@ public void Result_ToTaggedUnion_SourceResultIsSuccessAndSourceValueIsNull_Expec Assert.That(actual, Is.EqualTo(expected)); } + [Obsolete] [Test] [TestCaseSource(typeof(TestDataSource), nameof(TestDataSource.SuccessPlusFifteenIdRefTypeTestSource))] public void Result_ToTaggedUnion_SourceResultIsSuccessAndSourceValueIsNotNull_ExpectUnionFirstOfSourceSuccessValue( diff --git a/src/core-taggeds/Taggeds.Tests.Old/TaggedsExtensionsTests/TaggedUnion.ToOptional.cs b/src/core-taggeds/Taggeds.Tests.Old/TaggedsExtensionsTests/Obsolete.TaggedUnion.ToOptional.cs similarity index 96% rename from src/core-taggeds/Taggeds.Tests.Old/TaggedsExtensionsTests/TaggedUnion.ToOptional.cs rename to src/core-taggeds/Taggeds.Tests.Old/TaggedsExtensionsTests/Obsolete.TaggedUnion.ToOptional.cs index f520f55e..8a832eef 100644 --- a/src/core-taggeds/Taggeds.Tests.Old/TaggedsExtensionsTests/TaggedUnion.ToOptional.cs +++ b/src/core-taggeds/Taggeds.Tests.Old/TaggedsExtensionsTests/Obsolete.TaggedUnion.ToOptional.cs @@ -5,6 +5,7 @@ namespace PrimeFuncPack.Core.Tests; partial class TaggedsExtensionsTests { + [Obsolete] [Test] [TestCaseSource(typeof(TestDataSource), nameof(TestDataSource.ObjectNullableTestSource))] public void TaggedUnion_ToOptional_UnionIsFirst_ExpectPresent( @@ -17,6 +18,7 @@ public void TaggedUnion_ToOptional_UnionIsFirst_ExpectPresent( Assert.That(actual, Is.EqualTo(expected)); } + [Obsolete] [Test] public void TaggedUnion_ToOptional_UnionIsDefault_ExpectAbsent() { @@ -27,6 +29,7 @@ public void TaggedUnion_ToOptional_UnionIsDefault_ExpectAbsent() Assert.That(actual, Is.EqualTo(expected)); } + [Obsolete] [Test] public void TaggedUnion_ToOptional_UnionIsSecond_ExpectAbsent() { diff --git a/src/core-taggeds/Taggeds.Tests.Old/TaggedsExtensionsTests/TaggedUnion.ToResult.cs b/src/core-taggeds/Taggeds.Tests.Old/TaggedsExtensionsTests/Obsolete.TaggedUnion.ToResult.cs similarity index 96% rename from src/core-taggeds/Taggeds.Tests.Old/TaggedsExtensionsTests/TaggedUnion.ToResult.cs rename to src/core-taggeds/Taggeds.Tests.Old/TaggedsExtensionsTests/Obsolete.TaggedUnion.ToResult.cs index c7ef2071..cbdb6247 100644 --- a/src/core-taggeds/Taggeds.Tests.Old/TaggedsExtensionsTests/TaggedUnion.ToResult.cs +++ b/src/core-taggeds/Taggeds.Tests.Old/TaggedsExtensionsTests/Obsolete.TaggedUnion.ToResult.cs @@ -6,6 +6,7 @@ namespace PrimeFuncPack.Core.Tests; partial class TaggedUnionResultExtensions { + [Obsolete] [Test] public void TaggedUnion_ToResult_SourceUnionIsDefault_ExpectDefaultResult() { @@ -17,6 +18,7 @@ public void TaggedUnion_ToResult_SourceUnionIsDefault_ExpectDefaultResult() Assert.That(actual, Is.EqualTo(expected)); } + [Obsolete] [Test] public void TaggedUnion_ToResult_SourceUnionIsSecond_ExpectFailureResult() { @@ -29,6 +31,7 @@ public void TaggedUnion_ToResult_SourceUnionIsSecond_ExpectFailureResult() Assert.That(actual, Is.EqualTo(expected)); } + [Obsolete] [Test] public void TaggedUnion_ToResult_SourceUnionIsFirstAndSourceValueIsNull_ExpectSuccessResultOfNullValue() { @@ -40,6 +43,7 @@ public void TaggedUnion_ToResult_SourceUnionIsFirstAndSourceValueIsNull_ExpectSu Assert.That(actual, Is.EqualTo(expected)); } + [Obsolete] [Test] public void TaggedUnion_ToResult_SourceUnionIsFirstAndSourceValueIsNotNull_ExpectSuccessResultOfSourceValue() { diff --git a/src/core-taggeds/Taggeds/Taggeds.csproj b/src/core-taggeds/Taggeds/Taggeds.csproj index 80a8636d..b926a1b6 100644 --- a/src/core-taggeds/Taggeds/Taggeds.csproj +++ b/src/core-taggeds/Taggeds/Taggeds.csproj @@ -36,7 +36,7 @@ - + diff --git a/src/core-taggeds/Taggeds/TaggedsExtensions/Optional.ToTaggedUnion.cs b/src/core-taggeds/Taggeds/TaggedsExtensions/Obsolete.Optional.ToTaggedUnion.cs similarity index 71% rename from src/core-taggeds/Taggeds/TaggedsExtensions/Optional.ToTaggedUnion.cs rename to src/core-taggeds/Taggeds/TaggedsExtensions/Obsolete.Optional.ToTaggedUnion.cs index 48de4292..09ff9522 100644 --- a/src/core-taggeds/Taggeds/TaggedsExtensions/Optional.ToTaggedUnion.cs +++ b/src/core-taggeds/Taggeds/TaggedsExtensions/Obsolete.Optional.ToTaggedUnion.cs @@ -2,6 +2,7 @@ partial class TaggedsExtensions { + [Obsolete("TaggedUnion and this method are obsolete and will be removed in Taggeds v3.0.", error: false)] public static TaggedUnion ToTaggedUnion(this Optional optional) => optional.Fold>( diff --git a/src/core-taggeds/Taggeds/TaggedsExtensions/Result.ToTaggedUnion.cs b/src/core-taggeds/Taggeds/TaggedsExtensions/Obsolete.Result.ToTaggedUnion.cs similarity index 76% rename from src/core-taggeds/Taggeds/TaggedsExtensions/Result.ToTaggedUnion.cs rename to src/core-taggeds/Taggeds/TaggedsExtensions/Obsolete.Result.ToTaggedUnion.cs index b5671c21..68892a72 100644 --- a/src/core-taggeds/Taggeds/TaggedsExtensions/Result.ToTaggedUnion.cs +++ b/src/core-taggeds/Taggeds/TaggedsExtensions/Obsolete.Result.ToTaggedUnion.cs @@ -2,6 +2,7 @@ partial class TaggedsExtensions { + [Obsolete("TaggedUnion and this method are obsolete and will be removed in Taggeds v3.0.", error: false)] public static TaggedUnion ToTaggedUnion( this Result result) where TFailure : struct diff --git a/src/core-taggeds/Taggeds/TaggedsExtensions/TaggedUnion.ToOptional.cs b/src/core-taggeds/Taggeds/TaggedsExtensions/Obsolete.TaggedUnion.ToOptional.cs similarity index 69% rename from src/core-taggeds/Taggeds/TaggedsExtensions/TaggedUnion.ToOptional.cs rename to src/core-taggeds/Taggeds/TaggedsExtensions/Obsolete.TaggedUnion.ToOptional.cs index da736440..9881983b 100644 --- a/src/core-taggeds/Taggeds/TaggedsExtensions/TaggedUnion.ToOptional.cs +++ b/src/core-taggeds/Taggeds/TaggedsExtensions/Obsolete.TaggedUnion.ToOptional.cs @@ -2,6 +2,7 @@ partial class TaggedsExtensions { + [Obsolete("TaggedUnion and this method are obsolete and will be removed in Taggeds v3.0.", error: false)] public static Optional ToOptional(this TaggedUnion union) => union.Fold>( diff --git a/src/core-taggeds/Taggeds/TaggedsExtensions/TaggedUnion.ToResult.cs b/src/core-taggeds/Taggeds/TaggedsExtensions/Obsolete.TaggedUnion.ToResult.cs similarity index 76% rename from src/core-taggeds/Taggeds/TaggedsExtensions/TaggedUnion.ToResult.cs rename to src/core-taggeds/Taggeds/TaggedsExtensions/Obsolete.TaggedUnion.ToResult.cs index d2754e83..3a7bf604 100644 --- a/src/core-taggeds/Taggeds/TaggedsExtensions/TaggedUnion.ToResult.cs +++ b/src/core-taggeds/Taggeds/TaggedsExtensions/Obsolete.TaggedUnion.ToResult.cs @@ -2,6 +2,7 @@ partial class TaggedsExtensions { + [Obsolete("TaggedUnion and this method are obsolete and will be removed in Taggeds v3.0.", error: false)] public static Result ToResult( this TaggedUnion union) where TFailure : struct