From 0be5d6c30e3dcf0c1e91bcfae342267eca776dca Mon Sep 17 00:00:00 2001 From: Andrei Sergeev Date: Tue, 6 Feb 2024 22:25:50 +0400 Subject: [PATCH 1/7] Result Builders: Add WithAsync; Success/Nonsuccess: Add ToResultAsync --- LICENSE | 2 +- .../FailureBuilder.T/FailureBuilder.T.With.cs | 11 +++++++++++ .../Result/FailureBuilder.T/FailureBuilder.T.cs | 5 +---- .../Result/Nonsuccess.T/Nonsuccess.T.ToResult.cs | 12 +++++++++++- .../Result/Nonsuccess.T/Nonsuccess.T.cs | 4 ---- .../Result/Result.T/Result.T.Factory.Implicit.cs | 8 ++++---- .../Result/Result.T/Result.T.MapFailure.Sync.cs | 2 -- src/core-taggeds-result/Result/Result.csproj | 8 ++++---- .../Result/Success.T/Success.T.ToResult.cs | 14 +++++++++++++- .../Result/Success.T/Success.T.cs | 4 ---- .../SuccessBuilder.T/SuccessBuilder.T.With.cs | 13 +++++++++++++ .../Result/SuccessBuilder.T/SuccessBuilder.T.cs | 5 +---- 12 files changed, 59 insertions(+), 29 deletions(-) diff --git a/LICENSE b/LICENSE index 64bdac4b..48f4c860 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020-2023 Andrei Sergeev, Pavel Moskovoy +Copyright (c) 2020-2024 Andrei Sergeev, Pavel Moskovoy Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/core-taggeds-result/Result/FailureBuilder.T/FailureBuilder.T.With.cs b/src/core-taggeds-result/Result/FailureBuilder.T/FailureBuilder.T.With.cs index 6f89c9d7..c14aee15 100644 --- a/src/core-taggeds-result/Result/FailureBuilder.T/FailureBuilder.T.With.cs +++ b/src/core-taggeds-result/Result/FailureBuilder.T/FailureBuilder.T.With.cs @@ -1,4 +1,5 @@ using System; +using System.Threading.Tasks; namespace PrimeFuncPack.Core; @@ -7,4 +8,14 @@ partial struct FailureBuilder public Result With() => new(failure); + + // TODO: Add the tests + public Task> WithAsync() + => + Task.FromResult>(new(failure)); + + // TODO: Add the tests + public ValueTask> WithValueAsync() + => + ValueTask.FromResult>(new(failure)); } diff --git a/src/core-taggeds-result/Result/FailureBuilder.T/FailureBuilder.T.cs b/src/core-taggeds-result/Result/FailureBuilder.T/FailureBuilder.T.cs index 802f8db1..b0cf21a9 100644 --- a/src/core-taggeds-result/Result/FailureBuilder.T/FailureBuilder.T.cs +++ b/src/core-taggeds-result/Result/FailureBuilder.T/FailureBuilder.T.cs @@ -1,5 +1,6 @@ using System; +// TODO: Move to System namespace in Result v3.0 namespace PrimeFuncPack.Core; public readonly partial struct FailureBuilder : IEquatable> @@ -10,8 +11,4 @@ namespace PrimeFuncPack.Core; internal FailureBuilder(TFailure failure) => this.failure = failure; - - internal TFailure InternalFailure - => - failure; } diff --git a/src/core-taggeds-result/Result/Nonsuccess.T/Nonsuccess.T.ToResult.cs b/src/core-taggeds-result/Result/Nonsuccess.T/Nonsuccess.T.ToResult.cs index 533b45d2..c5d84a03 100644 --- a/src/core-taggeds-result/Result/Nonsuccess.T/Nonsuccess.T.ToResult.cs +++ b/src/core-taggeds-result/Result/Nonsuccess.T/Nonsuccess.T.ToResult.cs @@ -1,8 +1,18 @@ -namespace System; +using System.Threading.Tasks; + +namespace System; partial struct Nonsuccess { public Result ToResult() => new(failure); + + public Task> ToResultAsync() + => + Task.FromResult>(new(failure)); + + public ValueTask> ToResultValueAsync() + => + ValueTask.FromResult>(new(failure)); } diff --git a/src/core-taggeds-result/Result/Nonsuccess.T/Nonsuccess.T.cs b/src/core-taggeds-result/Result/Nonsuccess.T/Nonsuccess.T.cs index 69cc62c9..b71300af 100644 --- a/src/core-taggeds-result/Result/Nonsuccess.T/Nonsuccess.T.cs +++ b/src/core-taggeds-result/Result/Nonsuccess.T/Nonsuccess.T.cs @@ -5,8 +5,4 @@ where TFailure : struct { private readonly TFailure failure; - - internal TFailure InternalFailure - => - failure; } diff --git a/src/core-taggeds-result/Result/Result.T/Result.T.Factory.Implicit.cs b/src/core-taggeds-result/Result/Result.T/Result.T.Factory.Implicit.cs index 347a823f..5389bb93 100644 --- a/src/core-taggeds-result/Result/Result.T/Result.T.Factory.Implicit.cs +++ b/src/core-taggeds-result/Result/Result.T/Result.T.Factory.Implicit.cs @@ -15,18 +15,18 @@ public static implicit operator Result(TFailure failure) // TODO: Add the tests! public static implicit operator Result(Success success) => - new(success.InternalSuccess); + success.ToResult(); // TODO: Add the tests! public static implicit operator Result(Nonsuccess nonsuccess) => - new(nonsuccess.InternalFailure); + nonsuccess.ToResult(); public static implicit operator Result(SuccessBuilder success) => - new(success.InternalSuccess); + success.With(); public static implicit operator Result(FailureBuilder failure) => - new(failure.InternalFailure); + failure.With(); } diff --git a/src/core-taggeds-result/Result/Result.T/Result.T.MapFailure.Sync.cs b/src/core-taggeds-result/Result/Result.T/Result.T.MapFailure.Sync.cs index 857082bb..e7c617c8 100644 --- a/src/core-taggeds-result/Result/Result.T/Result.T.MapFailure.Sync.cs +++ b/src/core-taggeds-result/Result/Result.T/Result.T.MapFailure.Sync.cs @@ -1,5 +1,3 @@ -using System.Threading.Tasks; - namespace System; partial struct Result diff --git a/src/core-taggeds-result/Result/Result.csproj b/src/core-taggeds-result/Result/Result.csproj index c6b32c8f..ecee4599 100644 --- a/src/core-taggeds-result/Result/Result.csproj +++ b/src/core-taggeds-result/Result/Result.csproj @@ -1,7 +1,7 @@ - net6.0;net7.0 + net6.0;net7.0;net8.0 disable enable true @@ -13,11 +13,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.Result is a core library for .NET consisting of Result monad targeted for use in functional programming. System PrimeFuncPack.Core.Result - 2.1.0-preview.3 + 2.1.0-preview.4 @@ -32,7 +32,7 @@ - + diff --git a/src/core-taggeds-result/Result/Success.T/Success.T.ToResult.cs b/src/core-taggeds-result/Result/Success.T/Success.T.ToResult.cs index 3479e2b2..b2bb1d66 100644 --- a/src/core-taggeds-result/Result/Success.T/Success.T.ToResult.cs +++ b/src/core-taggeds-result/Result/Success.T/Success.T.ToResult.cs @@ -1,4 +1,6 @@ -namespace System; +using System.Threading.Tasks; + +namespace System; partial struct Success { @@ -6,4 +8,14 @@ public Result ToResult() where TFailure : struct => new(success); + + public Task> ToResultAsync() + where TFailure : struct + => + Task.FromResult>(new(success)); + + public ValueTask> ToResultValueAsync() + where TFailure : struct + => + ValueTask.FromResult>(new(success)); } diff --git a/src/core-taggeds-result/Result/Success.T/Success.T.cs b/src/core-taggeds-result/Result/Success.T/Success.T.cs index 332dd4e9..c1345d7d 100644 --- a/src/core-taggeds-result/Result/Success.T/Success.T.cs +++ b/src/core-taggeds-result/Result/Success.T/Success.T.cs @@ -4,8 +4,4 @@ public readonly partial struct Success : IEquatable> { private readonly TSuccess success; - - internal TSuccess InternalSuccess - => - success; } diff --git a/src/core-taggeds-result/Result/SuccessBuilder.T/SuccessBuilder.T.With.cs b/src/core-taggeds-result/Result/SuccessBuilder.T/SuccessBuilder.T.With.cs index e9754d6d..cbd8e0b8 100644 --- a/src/core-taggeds-result/Result/SuccessBuilder.T/SuccessBuilder.T.With.cs +++ b/src/core-taggeds-result/Result/SuccessBuilder.T/SuccessBuilder.T.With.cs @@ -1,4 +1,5 @@ using System; +using System.Threading.Tasks; namespace PrimeFuncPack.Core; @@ -8,4 +9,16 @@ public Result With() where TFailure : struct => new(success); + + // TODO: Add the tests + public Task> WithAsync() + where TFailure : struct + => + Task.FromResult>(new(success)); + + // TODO: Add the tests + public ValueTask> WithValueAsync() + where TFailure : struct + => + ValueTask.FromResult>(new(success)); } diff --git a/src/core-taggeds-result/Result/SuccessBuilder.T/SuccessBuilder.T.cs b/src/core-taggeds-result/Result/SuccessBuilder.T/SuccessBuilder.T.cs index 682dc91c..ed9a39a2 100644 --- a/src/core-taggeds-result/Result/SuccessBuilder.T/SuccessBuilder.T.cs +++ b/src/core-taggeds-result/Result/SuccessBuilder.T/SuccessBuilder.T.cs @@ -1,5 +1,6 @@ using System; +// TODO: Move to System namespace in Result v3.0 namespace PrimeFuncPack.Core; public readonly partial struct SuccessBuilder : IEquatable> @@ -9,8 +10,4 @@ namespace PrimeFuncPack.Core; internal SuccessBuilder(TSuccess success) => this.success = success; - - internal TSuccess InternalSuccess - => - success; } From 301b8589216228774df776bf5218ebd08c540055 Mon Sep 17 00:00:00 2001 From: Andrei Sergeev Date: Tue, 6 Feb 2024 22:26:30 +0400 Subject: [PATCH 2/7] Result Tests: Update NUnit --- .../Result.Tests/Result.Tests.csproj | 18 +++++--- .../Equality/Equality.Equals.Object.cs | 28 ++++++------- .../Equality/Equality.Equals.Other.cs | 18 ++++---- .../Equality/Equality.Equals.Static.cs | 14 +++---- .../Equality/Equality.GetHashCode.cs | 28 ++++++------- .../Equality/Equality.Operator.Equality.cs | 14 +++---- .../Equality/Equality.Operator.Inequality.cs | 14 +++---- .../Test.FailureBuilder/ToString/ToString.cs | 8 ++-- .../Equality/Equality.Equals.Object.cs | 42 +++++++++---------- .../Equality/Equality.Equals.Other.cs | 28 ++++++------- .../Equality/Equality.Equals.Static.cs | 28 ++++++------- .../Equality/Equality.GetHashCode.cs | 34 +++++++-------- .../Equality/Equality.Operator.Equality.cs | 28 ++++++------- .../Equality/Equality.Operator.Inequality.cs | 28 ++++++------- .../Factory/Factory.Constructor.Failure.cs | 4 +- .../Factory/Factory.Constructor.Success.cs | 16 +++---- .../Test.Result/Factory/Factory.Default.cs | 4 +- .../Factory/Factory.Explicit.Failure.cs | 4 +- .../Factory/Factory.Explicit.Success.cs | 16 +++---- .../Factory/Factory.Implicit.Failure.cs | 4 +- .../Factory.Implicit.FailureBuilder.cs | 4 +- .../Factory/Factory.Implicit.Success.cs | 16 +++---- .../Factory.Implicit.SuccessBuilder.cs | 4 +- .../Flow.Filter/Filter.MapFailure.cs | 16 +++---- .../Test.Result/Flow.Filter/Filter.cs | 10 ++--- .../FilterAsync.MapFailure.Sync.cs | 16 +++---- .../Flow.Filter/FilterAsync.MapFailure.cs | 16 +++---- .../Test.Result/Flow.Filter/FilterAsync.cs | 10 ++--- .../FilterValueAsync.MapFailure.Sync.cs | 17 ++++---- .../FilterValueAsync.MapFailure.cs | 16 +++---- .../Flow.Filter/FilterValueAsync.cs | 10 ++--- .../Flow.Forward/Forward.MapFailure.cs | 12 +++--- .../Test.Result/Flow.Forward/Forward.Self.cs | 10 ++--- .../Flow.Forward/Forward.Success.cs | 12 +++--- .../ForwardAsync.MapFailure.Sync.cs | 12 +++--- .../Flow.Forward/ForwardAsync.MapFailure.cs | 12 +++--- .../Flow.Forward/ForwardAsync.Self.cs | 10 ++--- .../Flow.Forward/ForwardAsync.Success.cs | 12 +++--- .../ForwardValueAsync.MapFailure.Sync.cs | 12 +++--- .../ForwardValueAsync.MapFailure.cs | 12 +++--- .../Flow.Forward/ForwardValueAsync.Self.cs | 13 +++--- .../Flow.Forward/ForwardValueAsync.Success.cs | 12 +++--- .../Flow.Recover/Recover.Failure.cs | 12 +++--- .../Flow.Recover/Recover.MapSuccess.cs | 12 +++--- .../Test.Result/Flow.Recover/Recover.Self.cs | 10 ++--- .../Flow.Recover/RecoverAsync.Failure.cs | 12 +++--- .../RecoverAsync.MapSuccess.Sync.cs | 12 +++--- .../Flow.Recover/RecoverAsync.MapSuccess.cs | 12 +++--- .../Flow.Recover/RecoverAsync.Self.cs | 10 ++--- .../Flow.Recover/RecoverValueAsync.Failure.cs | 12 +++--- .../RecoverValueAsync.MapSuccess.Sync.cs | 12 +++--- .../RecoverValueAsync.MapSuccess.cs | 12 +++--- .../Flow.Recover/RecoverValueAsync.Self.cs | 10 ++--- .../Result.Tests/Test.Result/Fold/Fold.cs | 8 ++-- .../Test.Result/Fold/FoldAsync.cs | 8 ++-- .../Test.Result/Fold/FoldValueAsync.cs | 8 ++-- .../Test.Result/Map/Map.Failure.cs | 14 +++---- .../Test.Result/Map/Map.Success.cs | 14 +++---- .../Result.Tests/Test.Result/Map/Map.cs | 12 +++--- .../Test.Result/Map/MapAsync.Failure.cs | 14 +++---- .../Test.Result/Map/MapAsync.Success.cs | 14 +++---- .../Result.Tests/Test.Result/Map/MapAsync.cs | 12 +++--- .../Test.Result/Map/MapValueAsync.Failure.cs | 14 +++---- .../Test.Result/Map/MapValueAsync.Success.cs | 14 +++---- .../Test.Result/Map/MapValueAsync.cs | 12 +++--- .../OrDefault.Success/OrDefault.Success.cs | 12 +++--- .../OrThrow.Failure.Factory.cs | 8 ++-- .../OrThrow.Failure.FactoryFrom.cs | 8 ++-- .../OrThrow.Failure/OrThrow.Failure.cs | 6 +-- .../OrThrow.Success.Factory.cs | 8 ++-- .../OrThrow.Success.FactoryFrom.cs | 10 ++--- .../OrThrow.Success/OrThrow.Success.cs | 6 +-- .../Test.Result/ToString/ToString.Failure.cs | 8 ++-- .../ToString/ToString.FailureDefault.cs | 2 +- .../Test.Result/ToString/ToString.Success.cs | 10 ++--- .../Equality/Equality.Equals.cs | 28 ++++++------- .../Factory/Factory.Bool.False.cs | 4 +- .../Factory/Factory.Bool.True.cs | 5 ++- .../Factory/Factory.Failure.cs | 4 +- .../Factory/Factory.Optional.Absent.cs | 4 +- .../Factory/Factory.Optional.Present.cs | 16 +++---- .../Factory/Factory.Success.cs | 16 +++---- .../Equality/Equality.Equals.Object.cs | 32 +++++++------- .../Equality/Equality.Equals.Other.cs | 14 +++---- .../Equality/Equality.Equals.Static.cs | 14 +++---- .../Equality/Equality.GetHashCode.cs | 28 ++++++------- .../Equality/Equality.Operator.Equality.cs | 14 +++---- .../Equality/Equality.Operator.Inequality.cs | 14 +++---- .../Test.SuccessBuilder/ToString/ToString.cs | 10 ++--- 89 files changed, 602 insertions(+), 591 deletions(-) diff --git a/src/core-taggeds-result/Result.Tests/Result.Tests.csproj b/src/core-taggeds-result/Result.Tests/Result.Tests.csproj index ef2a7530..dcedc9fa 100644 --- a/src/core-taggeds-result/Result.Tests/Result.Tests.csproj +++ b/src/core-taggeds-result/Result.Tests/Result.Tests.csproj @@ -1,22 +1,30 @@  - net6.0;net7.0 + net6.0;net7.0;net8.0 disable enable true true false Andrei Sergeev, Pavel Moskovoy - Copyright © 2020-2023 Andrei Sergeev, Pavel Moskovoy + Copyright © 2020-2024 Andrei Sergeev, Pavel Moskovoy PrimeFuncPack.Core.Tests PrimeFuncPack.Core.Result.Tests - - - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + diff --git a/src/core-taggeds-result/Result.Tests/Test.FailureBuilder/Equality/Equality.Equals.Object.cs b/src/core-taggeds-result/Result.Tests/Test.FailureBuilder/Equality/Equality.Equals.Object.cs index 571649a9..f45af6ff 100644 --- a/src/core-taggeds-result/Result.Tests/Test.FailureBuilder/Equality/Equality.Equals.Object.cs +++ b/src/core-taggeds-result/Result.Tests/Test.FailureBuilder/Equality/Equality.Equals.Object.cs @@ -14,7 +14,7 @@ public void EqualsObject_SourceIsDefaultAndOtherIsDefaultAndTypesAreSame_ExpectT object? other = default(FailureBuilder); var actual = source.Equals(other); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -24,7 +24,7 @@ public void EqualsObject_SourceIsDefaultAndOtherFailureIsDefaultAndTypesAreSame_ object? other = Result.Failure(default(StructType)); var actual = source.Equals(other); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -34,7 +34,7 @@ public void EqualsObject_SourceFailureIsDefaultAndOtherIsDefaultAndTypesAreSame_ object? other = default(FailureBuilder); var actual = source.Equals(other); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -44,7 +44,7 @@ public void EqualsObject_SourceFailureIsDefaultAndOtherFailureIsDefaultAndTypesA object? other = Result.Failure(new SomeError()); var actual = source.Equals(other); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -59,7 +59,7 @@ public void EqualsObject_SourceFailureIsEqualToOtherFailureAndTypesAreSame_Expec object? other = Result.Failure(otherFailure); var actual = source.Equals(other); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -69,7 +69,7 @@ public void EqualsObject_SourceIsDefaultAndOtherIsDefaultAndTypesAreNotSame_Expe object? other = new FailureBuilder(); var actual = source.Equals(other); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -79,7 +79,7 @@ public void EqualsObject_SourceIsDefaultAndOtherFailureIsDefaultAndTypesAreNotSa object? other = Result.Failure(default(SomeError)); var actual = source.Equals(other); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -89,7 +89,7 @@ public void EqualsObject_SourceFailureIsDefaultAndOtherIsDefaultAndTypesAreNotSa object? other = default(FailureBuilder); var actual = source.Equals(other); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -99,7 +99,7 @@ public void EqualsObject_SourceFailureIsDefaultAndOtherFailureIsDefaultAndTypesA object? other = Result.Failure(new SomeError()); var actual = source.Equals(other); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -110,7 +110,7 @@ public void EqualsObject_SourceFailureIsEqualToOtherFailureAndTypesAreNotSame_Ex object? other = Result.Failure(someValue); var actual = source.Equals(other); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -119,7 +119,7 @@ public void EqualsObject_SourceIsDefaultAndOtherIsNull_ExpectFalse() var source = new FailureBuilder(); var actual = source.Equals(null); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -128,7 +128,7 @@ public void EqualsObject_SourceIsNotDefaultAndOtherIsNull_ExpectFalse() var source = Result.Failure(MinusFifteen); var actual = source.Equals(null); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -138,7 +138,7 @@ public void EqualsObject_SourceIsDefaultAndOtherIsNotDefaultAndTypesAreSame_Expe object? other = Result.Failure(PlusFifteen); var actual = source.Equals(other); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -151,6 +151,6 @@ public void EqualsObject_SourceFailureIsNotEqualToOtherFailureAndTypesAreSame_Ex object? other = Result.Failure(otherFailure); var actual = source.Equals(other); - Assert.False(actual); + Assert.That(actual, Is.False); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.FailureBuilder/Equality/Equality.Equals.Other.cs b/src/core-taggeds-result/Result.Tests/Test.FailureBuilder/Equality/Equality.Equals.Other.cs index a59e6a74..054527dc 100644 --- a/src/core-taggeds-result/Result.Tests/Test.FailureBuilder/Equality/Equality.Equals.Other.cs +++ b/src/core-taggeds-result/Result.Tests/Test.FailureBuilder/Equality/Equality.Equals.Other.cs @@ -14,7 +14,7 @@ public void EqualsOther_SourceIsDefaultAndOtherIsDefault_ExpectTrue() var other = new FailureBuilder(); var actual = source.Equals(other); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -24,7 +24,7 @@ public void EqualsOther_SourceIsDefaultAndOtherFailureIsDefault_ExpectTrue() var other = Result.Failure(default(StructType)); var actual = source.Equals(other); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -34,7 +34,7 @@ public void EqualsOther_SourceFailureIsDefaultAndOtherIsDefault_ExpectTrue() var other = default(FailureBuilder); var actual = source.Equals(other); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -44,7 +44,7 @@ public void EqualsOther_SourceFailureIsDefaultAndOtherFailureIsDefault_ExpectTru var other = Result.Failure(new SomeError()); var actual = source.Equals(other); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -59,7 +59,7 @@ public void EqualsOther_SourceFailureIsEqualToOtherFailure_ExpectTrue() var other = Result.Failure(otherFailure); var actual = source.Equals(other); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -69,7 +69,7 @@ public void EqualsOther_SourceIsDefaultAndOtherIsNotDefault_ExpectFalse() var other = Result.Failure(PlusFifteen); var actual = source.Equals(other); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -82,7 +82,7 @@ public void EqualsOther_SourceFailureIsNotEqualToOtherFailure_ExpectFalse() var other = Result.Failure(otherFailure); var actual = source.Equals(other); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -92,7 +92,7 @@ public void EqualsObject_SourceSuccessIsNullAndOtherSuccessIsNotNull_ExpectFalse var other = Result.Success(new ()); var actual = source.Equals(other); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -102,6 +102,6 @@ public void EqualsObject_SourceSuccessIsNotNullAndOtherSuccessIsNull_ExpectFalse var other = Result.Success(null!); var actual = source.Equals(other); - Assert.False(actual); + Assert.That(actual, Is.False); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.FailureBuilder/Equality/Equality.Equals.Static.cs b/src/core-taggeds-result/Result.Tests/Test.FailureBuilder/Equality/Equality.Equals.Static.cs index be417bfc..387ef450 100644 --- a/src/core-taggeds-result/Result.Tests/Test.FailureBuilder/Equality/Equality.Equals.Static.cs +++ b/src/core-taggeds-result/Result.Tests/Test.FailureBuilder/Equality/Equality.Equals.Static.cs @@ -14,7 +14,7 @@ public void EqualsStatic_LeftIsDefaultAndRightIsDefault_ExpectTrue() var right = default(FailureBuilder); var actual = FailureBuilder.Equals(left, right); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -24,7 +24,7 @@ public void EqualsStatic_LeftIsDefaultAndRightFailureIsDefault_ExpectTrue() var right = Result.Failure(default(SomeError)); var actual = FailureBuilder.Equals(left, right); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -34,7 +34,7 @@ public void EqualsStatic_LeftFailureIsDefaultAndRightIsDefault_ExpectTrue() var right = default(FailureBuilder); var actual = FailureBuilder.Equals(left, right); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -44,7 +44,7 @@ public void EqualsStatic_LeftFailureIsDefaultAndRightFailureIsDefault_ExpectTrue var right = Result.Failure(default(StructType)); var actual = FailureBuilder.Equals(left, right); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -65,7 +65,7 @@ public void EqualsStatic_LeftFailureIsEqualToRightFailure_ExpectTrue() var right = Result.Failure(rightFailure); var actual = FailureBuilder.Equals(left, right); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -75,7 +75,7 @@ public void EqualsStatic_LeftIsDefaultAndRightIsNotDefault_ExpectFalse() var right = Result.Failure(decimal.One); var actual = FailureBuilder.Equals(left, right); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -88,6 +88,6 @@ public void EqualsStatic_LeftFailureIsNotEqualToRightFailure_ExpectFalse() var right = Result.Failure(rightFailure); var actual = FailureBuilder.Equals(left, right); - Assert.False(actual); + Assert.That(actual, Is.False); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.FailureBuilder/Equality/Equality.GetHashCode.cs b/src/core-taggeds-result/Result.Tests/Test.FailureBuilder/Equality/Equality.GetHashCode.cs index 3cc0c461..cdf3ec19 100644 --- a/src/core-taggeds-result/Result.Tests/Test.FailureBuilder/Equality/Equality.GetHashCode.cs +++ b/src/core-taggeds-result/Result.Tests/Test.FailureBuilder/Equality/Equality.GetHashCode.cs @@ -16,7 +16,7 @@ public void GetHashCode_SourceIsDefaultAndOtherIsDefaultAndTypesAreSame_ExpectHa var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.EqualTo(sourceHashCode)); } [Test] @@ -28,7 +28,7 @@ public void GetHashCode_SourceIsDefaultAndOtherFailureIsDefaultAndTypesAreSame_E var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.EqualTo(sourceHashCode)); } [Test] @@ -40,7 +40,7 @@ public void GetHashCode_SourceFailureIsDefaultAndOtherIsDefaultAndTypesAreSame_E var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.EqualTo(sourceHashCode)); } [Test] @@ -52,7 +52,7 @@ public void GetHashCode_SourceFailureIsDefaultAndOtherFailureIsDefaultAndTypesAr var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.EqualTo(sourceHashCode)); } [Test] @@ -69,7 +69,7 @@ public void GetHashCode_SourceFailureIsEqualToOtherFailureAndTypesAreSame_Expect var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.EqualTo(sourceHashCode)); } [Test] @@ -81,7 +81,7 @@ public void GetHashCode_SourceIsDefaultAndOtherIsDefaultAndTypesAreNotSame_Expec var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreNotEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.Not.EqualTo(sourceHashCode)); } [Test] @@ -93,7 +93,7 @@ public void GetHashCode_SourceIsDefaultAndOtherFailureIsDefaultAndTypesAreNotSam var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreNotEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.Not.EqualTo(sourceHashCode)); } [Test] @@ -105,7 +105,7 @@ public void GetHashCode_SourceFailureIsDefaultAndOtherIsDefaultAndTypesAreNotSam var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreNotEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.Not.EqualTo(sourceHashCode)); } [Test] @@ -117,7 +117,7 @@ public void GetHashCode_SourceFailureIsDefaultAndOtherFailureIsDefaultAndTypesAr var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreNotEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.Not.EqualTo(sourceHashCode)); } [Test] @@ -130,7 +130,7 @@ public void GetHashCode_SourceFailureIsEqualToOtherFailureAndTypesAreNotSame_Exp var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreNotEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.Not.EqualTo(sourceHashCode)); } [Test] @@ -142,7 +142,7 @@ public void GetHashCode_SourceIsDefaultAndOtherIsDefaultTypeSameSourceFailure_Ex var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreNotEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.Not.EqualTo(sourceHashCode)); } [Test] @@ -155,7 +155,7 @@ public void GetHashCode_SourceIsNotDefaultAndOtherIsSameAsSourceFailure_ExpectHa var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreNotEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.Not.EqualTo(sourceHashCode)); } [Test] @@ -167,7 +167,7 @@ public void GetHashCode_SourceIsDefaultAndOtherIsNotDefaultAndTypesAreSame_Expec var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreNotEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.Not.EqualTo(sourceHashCode)); } [Test] @@ -182,6 +182,6 @@ public void GetHashCode_SourceFailureIsNotEqualToOtherFailureAndTypesAreSame_Exp var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreNotEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.Not.EqualTo(sourceHashCode)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.FailureBuilder/Equality/Equality.Operator.Equality.cs b/src/core-taggeds-result/Result.Tests/Test.FailureBuilder/Equality/Equality.Operator.Equality.cs index d44cb725..25652181 100644 --- a/src/core-taggeds-result/Result.Tests/Test.FailureBuilder/Equality/Equality.Operator.Equality.cs +++ b/src/core-taggeds-result/Result.Tests/Test.FailureBuilder/Equality/Equality.Operator.Equality.cs @@ -14,7 +14,7 @@ public void Equality_LeftIsDefaultAndRightIsDefault_ExpectTrue() var right = default(FailureBuilder); var actual = left == right; - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -24,7 +24,7 @@ public void Equality_LeftIsDefaultAndRightFailureIsDefault_ExpectTrue() var right = Result.Failure(default(SomeError)); var actual = left == right; - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -34,7 +34,7 @@ public void Equality_LeftFailureIsDefaultAndRightIsDefault_ExpectTrue() var right = default(FailureBuilder); var actual = left == right; - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -44,7 +44,7 @@ public void Equality_LeftFailureIsDefaultAndRightFailureIsDefault_ExpectTrue() var right = Result.Failure(default(StructType)); var actual = left == right; - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -65,7 +65,7 @@ public void Equality_LeftFailureIsEqualToRightFailure_ExpectTrue() var right = Result.Failure(rightFailure); var actual = left == right; - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -75,7 +75,7 @@ public void Equality_LeftIsDefaultAndRightIsNotDefault_ExpectFalse() var right = Result.Failure(decimal.One); var actual = left == right; - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -88,6 +88,6 @@ public void Equality_LeftFailureIsNotEqualToRightFailure_ExpectFalse() var right = Result.Failure(rightFailure); var actual = left == right; - Assert.False(actual); + Assert.That(actual, Is.False); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.FailureBuilder/Equality/Equality.Operator.Inequality.cs b/src/core-taggeds-result/Result.Tests/Test.FailureBuilder/Equality/Equality.Operator.Inequality.cs index df0a7008..d7beb1f2 100644 --- a/src/core-taggeds-result/Result.Tests/Test.FailureBuilder/Equality/Equality.Operator.Inequality.cs +++ b/src/core-taggeds-result/Result.Tests/Test.FailureBuilder/Equality/Equality.Operator.Inequality.cs @@ -14,7 +14,7 @@ public void Inequality_LeftIsDefaultAndRightIsDefault_ExpectFalse() var right = default(FailureBuilder); var actual = left != right; - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -24,7 +24,7 @@ public void Inequality_LeftIsDefaultAndRightFailureIsDefault_ExpectFalse() var right = Result.Failure(default(StructType)); var actual = left != right; - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -34,7 +34,7 @@ public void Inequality_LeftFailureIsDefaultAndRightIsDefault_ExpectFalse() var right = new FailureBuilder(); var actual = left != right; - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -44,7 +44,7 @@ public void Inequality_LeftFailureIsDefaultAndRightFailureIsDefault_ExpectFalse( var right = Result.Failure(new StructType()); var actual = left != right; - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -65,7 +65,7 @@ public void Inequality_LeftFailureIsEqualToRightFailure_ExpectFalse() var right = Result.Failure(rightFailure); var actual = left != right; - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -75,7 +75,7 @@ public void Inequality_LeftIsDefaultAndRightIsNotDefault_ExpectTrue() var right = Result.Failure(new SomeError(int.MaxValue)); var actual = left != right; - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -88,6 +88,6 @@ public void Inequality_LeftFailureIsNotEqualToRightFailure_ExpectTrue() var right = Result.Failure(rightFailure); var actual = left != right; - Assert.True(actual); + Assert.That(actual, Is.True); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.FailureBuilder/ToString/ToString.cs b/src/core-taggeds-result/Result.Tests/Test.FailureBuilder/ToString/ToString.cs index fb9befe4..b2d4ce3a 100644 --- a/src/core-taggeds-result/Result.Tests/Test.FailureBuilder/ToString/ToString.cs +++ b/src/core-taggeds-result/Result.Tests/Test.FailureBuilder/ToString/ToString.cs @@ -21,7 +21,7 @@ public void ToString_SourceFailureToStringReturnsNull() typeof(StubToStringStructType).Name, string.Empty); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -47,7 +47,7 @@ public void ToString_ValueToString_Common( typeof(StubToStringStructType).Name, resultOfFailureToString); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -66,7 +66,7 @@ public void ToString_Common( typeof(int).Name, sourceFailure); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -83,7 +83,7 @@ public void ToString_DecimalPoint( typeof(decimal).Name, expectedDecimalSubstr); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } private static IEnumerable ToString_DecimalPoint_TestCaseSource() diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Equality/Equality.Equals.Object.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Equality/Equality.Equals.Object.cs index c6db2c1e..fbdf0d87 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Equality/Equality.Equals.Object.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Equality/Equality.Equals.Object.cs @@ -14,7 +14,7 @@ public void EqualsObject_SourceIsDefaultAndObjectIsDefaultAndTypesAreSame_Expect object? obj = new Result(); var actual = source.Equals(obj); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -24,7 +24,7 @@ public void EqualsObject_SourceIsSuccessAndOtherIsSuccessAndValuesAreNull_Expect object? other = Result.Success(null); var actual = source.Equals(other); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -44,7 +44,7 @@ public void EqualsObject_SourceIsSuccessAndObjectIsSuccessAndValuesAreEqual_Expe object? obj = Result.Success(objValue); var actual = source.Equals(obj); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -64,7 +64,7 @@ public void EqualsObject_SourceIsFailureAndObjectIsFailureAndValuesAreEqual_Expe object? obj = Result.Failure(objValue); var actual = source.Equals(obj); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -74,7 +74,7 @@ public void EqualsObject_SourceIsFailureWithDefaultValueAndObjectIsDefault_Expec object? obj = default(Result); var actual = source.Equals(obj); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -84,7 +84,7 @@ public void EqualsObject_SourceIsDefaultAndObjectIsFailureWithDefaultValue_Expec object? obj = Result.Failure(default); var actual = source.Equals(obj); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -97,7 +97,7 @@ public void EqualsObject_SourceIsSuccessAndObjectIsSuccessAndValuesAreNotEqual_E object? obj = Result.Success(objValue); var actual = source.Equals(obj); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -117,7 +117,7 @@ public void EqualsObject_SourceIsFailureAndObjectIsFailureAndValuesAreNotEqual_E object? obj = Result.Failure(objValue); var actual = source.Equals(obj); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -129,7 +129,7 @@ public void EqualsObject_SourceIsSuccessAndObjectIsFailure_ExpectFalse() object? obj = Result.Failure(sourceValue); var actual = source.Equals(obj); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -139,7 +139,7 @@ public void EqualsObject_SourceIsSuccessAndObjectIsDefault_ExpectFalse() object? obj = default(Result); var actual = source.Equals(obj); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -151,7 +151,7 @@ public void EqualsObject_SourceIsFailureAndObjectIsSuccess_ExpectFalse() object? obj = Result.Success(sourceValue); var actual = source.Equals(obj); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -161,7 +161,7 @@ public void EqualsObject_SourceIsFailureWithNotDefaultValueAndObjectIsDefault_Ex object? obj = default(Result); var actual = source.Equals(obj); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -171,7 +171,7 @@ public void EqualsObject_SourceIsDefaultAndObjectIsSuccess_ExpectFalse() object? obj = Result.Success(default); var actual = source.Equals(obj); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -181,7 +181,7 @@ public void EqualsObject_SourceIsDefaultAndObjectIsFailureWithNotDefaultValue_Ex object? obj = Result.Failure(new SomeError(PlusFifteen)); var actual = source.Equals(obj); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -192,7 +192,7 @@ public void EqualsObject_ObjectIsNull_ExpectFalse( object? obj = null; var actual = source.Equals(obj); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -202,7 +202,7 @@ public void EqualsObject_SourceIsDefaultAndObjectIsNotResult_ExpectFalse() object? obj = new StructType(); var actual = source.Equals(obj); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -212,7 +212,7 @@ public void EqualsObject_SourceIsDefaultAndObjectIsOtherTypeDefaultResult_Expect object? obj = default(Result); var actual = source.Equals(obj); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -224,7 +224,7 @@ public void EqualsObject_SourceIsSuccessAndObjectIsNotResult_ExpectFalse() object? obj = sourceValue; var actual = source.Equals(obj); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -236,7 +236,7 @@ public void EqualsObject_SourceIsSuccessAndObjectIsOtherTypeSuccessResult_Expect object? obj = Result.Success(sourceValue); var actual = source.Equals(obj); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -248,7 +248,7 @@ public void EqualsObject_SourceIsFailureAndObjectIsNotResult_ExpectFalse() object? obj = sourceValue; var actual = source.Equals(obj); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -260,6 +260,6 @@ public void EqualsObject_SourceIsFailureAndObjectIsOtherTypeFailureResult_Expect object? obj = Result.Failure(sourceValue); var actual = source.Equals(obj); - Assert.False(actual); + Assert.That(actual, Is.False); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Equality/Equality.Equals.Other.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Equality/Equality.Equals.Other.cs index 099e5ded..0d950d7c 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Equality/Equality.Equals.Other.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Equality/Equality.Equals.Other.cs @@ -14,7 +14,7 @@ public void EqualsOther_SourceIsDefaultAndOtherIsDefault_ExpectTrue() var other = new Result(); var actual = source.Equals(other); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -24,7 +24,7 @@ public void EqualsOther_SourceIsSuccessAndOtherIsSuccessAndValuesAreNull_ExpectT var other = Result.Success(null); var actual = source.Equals(other); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -44,7 +44,7 @@ public void EqualsOther_SourceIsSuccessAndOtherIsSuccessAndValuesAreEqual_Expect Result other = otherValue; var actual = source.Equals(other); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -58,7 +58,7 @@ public void EqualsOther_SourceIsFailureAndOtherIsFailureAndValuesAreEqual_Expect var other = Result.Failure(otherValue); var actual = source.Equals(other); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -68,7 +68,7 @@ public void EqualsOther_SourceIsFailureWithDefaultValueAndOtherIsDefault_ExpectT var other = default(Result); var actual = source.Equals(other); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -78,7 +78,7 @@ public void EqualsOther_SourceIsDefaultAndOtherIsFailureWithDefaultValue_ExpectT Result other = default(DateTime); var actual = source.Equals(other); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -91,7 +91,7 @@ public void EqualsOther_SourceIsSuccessAndOtherIsSuccessAndValuesAreNotEqual_Exp var other = Result.Success(otherValue); var actual = source.Equals(other); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -111,7 +111,7 @@ public void EqualsOther_SourceIsFailureAndOtherIsFailureAndValuesAreNotEqual_Exp var other = Result.Failure(otherValue); var actual = source.Equals(other); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -123,7 +123,7 @@ public void EqualsOther_SourceIsSuccessAndOtherIsFailure_ExpectFalse() var other = Result.Failure(sourceValue); var actual = source.Equals(other); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -133,7 +133,7 @@ public void EqualsOther_SourceIsSuccessAndOtherIsDefault_ExpectFalse() var other = default(Result); var actual = source.Equals(other); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -145,7 +145,7 @@ public void EqualsOther_SourceIsFailureAndOtherIsSuccess_ExpectFalse() var other = Result.Success(sourceValue); var actual = source.Equals(other); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -155,7 +155,7 @@ public void EqualsOther_SourceIsFailureWithNotDefaultValueAndOtherIsDefault_Expe var other = default(Result); var actual = source.Equals(other); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -165,7 +165,7 @@ public void EqualsOther_SourceIsDefaultAndOtherIsSuccess_ExpectFalse() var other = Result.Success(default); var actual = source.Equals(other); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -175,6 +175,6 @@ public void EqualsOther_SourceIsDefaultAndOtherIsFailureWithNotDefaultValue_Expe var other = Result.Failure(new SomeError(PlusFifteen)); var actual = source.Equals(other); - Assert.False(actual); + Assert.That(actual, Is.False); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Equality/Equality.Equals.Static.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Equality/Equality.Equals.Static.cs index 68f11d40..a2c2e1eb 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Equality/Equality.Equals.Static.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Equality/Equality.Equals.Static.cs @@ -14,7 +14,7 @@ public void EqualsStatic_ResultAIsDefaultAndResultBIsDefault_ExpectTrue() var resultB = default(Result); var actual = Result.Equals(resultA, resultB); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -24,7 +24,7 @@ public void EqualsStatic_ResultAIsSuccessAndResultBIsSuccessAndValuesAreNull_Exp Result resultB = null; var actual = Result.Equals(resultA, resultB); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -44,7 +44,7 @@ public void EqualsStatic_ResultAIsSuccessAndResultBIsSuccessAndValuesAreEqual_Ex Result resultB = bValue; var actual = Result.Equals(resultA, resultB); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -58,7 +58,7 @@ public void EqualsStatic_ResultAIsFailureAndResultBIsFailureAndValuesAreEqual_Ex var resultB = Result.Failure(bValue); var actual = Result.Equals(resultA, resultB); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -68,7 +68,7 @@ public void EqualsStatic_ResultAIsFailureWithDefaultValueAndResultBIsDefault_Exp Result resultB = default(DateTime); var actual = Result.Equals(resultA, resultB); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -78,7 +78,7 @@ public void EqualsStatic_ResultAIsDefaultAndResultBIsFailureWithDefaultValue_Exp var resultB = default(Result); var actual = Result.Equals(resultA, resultB); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -91,7 +91,7 @@ public void EqualsStatic_ResultAIsSuccessAndResultBIsSuccessAndValuesAreNotEqual var resultB = Result.Success(bValue); var actual = Result.Equals(resultA, resultB); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -111,7 +111,7 @@ public void EqualsStatic_ResultAIsFailureAndResultBIsFailureAndValuesAreNotEqual var resultB = Result.Failure(bValue); var actual = Result.Equals(resultA, resultB); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -123,7 +123,7 @@ public void EqualsStatic_ResultAIsSuccessAndResultBIsFailure_ExpectFalse() var resultB = Result.Failure(someValue); var actual = Result.Equals(resultA, resultB); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -133,7 +133,7 @@ public void EqualsStatic_ResultAIsSuccessAndResultBIsDefault_ExpectFalse() var resultB = default(Result); var actual = Result.Equals(resultA, resultB); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -145,7 +145,7 @@ public void EqualsStatic_ResultAIsFailureAndResultBIsSuccess_ExpectFalse() var resultB = Result.Success(someValue); var actual = Result.Equals(resultA, resultB); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -155,7 +155,7 @@ public void EqualsStatic_ResultAIsFailureWithNotDefaultValueAndResultBIsDefault_ var resultB = default(Result); var actual = Result.Equals(resultA, resultB); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -165,7 +165,7 @@ public void EqualsStatic_ResultAIsDefaultAndResultBIsSuccess_ExpectFalse() var resultB = Result.Success(default); var actual = Result.Equals(resultA, resultB); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -175,6 +175,6 @@ public void EqualsStatic_ResultAIsDefaultAndResultBIsFailureWithNotDefaultValue_ var resultB = Result.Failure(new SomeError(PlusFifteen)); var actual = Result.Equals(resultA, resultB); - Assert.False(actual); + Assert.That(actual, Is.False); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Equality/Equality.GetHashCode.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Equality/Equality.GetHashCode.cs index c1da7eda..86857f5c 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Equality/Equality.GetHashCode.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Equality/Equality.GetHashCode.cs @@ -16,7 +16,7 @@ public void GetHashCode_SourceIsDefaultAndOtherIsDefault_ExpectHashCodesAreEqual var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.EqualTo(sourceHashCode)); } [Test] @@ -28,7 +28,7 @@ public void GetHashCode_SourceIsSuccessAndOtherIsSuccessAndValuesAreNull_ExpectH var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.EqualTo(sourceHashCode)); } [Test] @@ -50,7 +50,7 @@ public void GetHashCode_SourceIsSuccessAndOtherIsSuccessAndValuesAreEqual_Expect var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.EqualTo(sourceHashCode)); } [Test] @@ -65,7 +65,7 @@ public void GetHashCode_SourceIsFailureAndOtherIsFailureAndValuesAreEqual_Expect var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.EqualTo(sourceHashCode)); } [Test] @@ -77,7 +77,7 @@ public void GetHashCode_SourceIsDefaultAndOtherIsDefaultButTypesAreNotSame_Expec var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreNotEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.Not.EqualTo(sourceHashCode)); } [Test] @@ -99,7 +99,7 @@ public void GetHashCode_SourceIsSuccessAndOtherIsSuccessAndValuesAreEqualButType var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreNotEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.Not.EqualTo(sourceHashCode)); } [Test] @@ -114,7 +114,7 @@ public void GetHashCode_SourceIsFailureAndOtherIsFailureAndValuesAreEqualButType var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreNotEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.Not.EqualTo(sourceHashCode)); } [Test] @@ -126,7 +126,7 @@ public void GetHashCode_SourceIsFailureWithDefaultValueAndOtherIsDefault_ExpectH var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.EqualTo(sourceHashCode)); } [Test] @@ -138,7 +138,7 @@ public void GetHashCode_SourceIsDefaultAndOtherIsFailureWithDefaultValue_ExpectH var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.EqualTo(sourceHashCode)); } [Test] @@ -153,7 +153,7 @@ public void GetHashCode_SourceIsSuccessAndOtherIsSuccessAndValuesAreNotEqual_Exp var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreNotEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.Not.EqualTo(sourceHashCode)); } [Test] @@ -168,7 +168,7 @@ public void GetHashCode_SourceIsFailureAndOtherIsFailureAndValuesAreNotEqual_Exp var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreNotEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.Not.EqualTo(sourceHashCode)); } [Test] @@ -182,7 +182,7 @@ public void GetHashCode_SourceIsSuccessAndOtherIsFailure_ExpectHashCodesAreNotEq var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreNotEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.Not.EqualTo(sourceHashCode)); } [Test] @@ -194,7 +194,7 @@ public void GetHashCode_SourceIsSuccessAndOtherIsDefault_ExpectHashCodesAreNotEq var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreNotEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.Not.EqualTo(sourceHashCode)); } [Test] @@ -208,7 +208,7 @@ public void GetHashCode_SourceIsFailureAndOtherIsSuccess_ExpectHashCodesAreNotEq var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreNotEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.Not.EqualTo(sourceHashCode)); } [Test] @@ -220,7 +220,7 @@ public void GetHashCode_SourceIsFailureWithNotDefaultValueAndOtherIsDefault_Expe var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreNotEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.Not.EqualTo(sourceHashCode)); } [Test] @@ -232,7 +232,7 @@ public void GetHashCode_SourceIsDefaultAndOtherIsSuccess_ExpectHashCodesAreNotEq var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreNotEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.Not.EqualTo(sourceHashCode)); } [Test] @@ -244,6 +244,6 @@ public void GetHashCode_SourceIsDefaultAndOtherIsFailureWithNotDefaultValue_Expe var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreNotEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.Not.EqualTo(sourceHashCode)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Equality/Equality.Operator.Equality.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Equality/Equality.Operator.Equality.cs index df7aa44c..d9ec3743 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Equality/Equality.Operator.Equality.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Equality/Equality.Operator.Equality.cs @@ -14,7 +14,7 @@ public void EqualsEquality_ResultAIsDefaultAndResultBIsDefault_ExpectTrue() var resultB = new Result(); var actual = resultA == resultB; - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -24,7 +24,7 @@ public void EqualsEquality_ResultAIsSuccessAndResultBIsSuccessAndValuesAreNull_E Result resultB = null; var actual = resultA == resultB; - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -44,7 +44,7 @@ public void EqualsEquality_ResultAIsSuccessAndResultBIsSuccessAndValuesAreEqual_ var resultB = new Result(bValue); var actual = resultA == resultB; - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -58,7 +58,7 @@ public void EqualsEquality_ResultAIsFailureAndResultBIsFailureAndValuesAreEqual_ var resultB = new Result(bValue); var actual = resultA == resultB; - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -68,7 +68,7 @@ public void EqualsEquality_ResultAIsFailureWithDefaultValueAndResultBIsDefault_E var resultB = new Result(default(DateTime)); var actual = resultA == resultB; - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -78,7 +78,7 @@ public void EqualsEquality_ResultAIsDefaultAndResultBIsFailureWithDefaultValue_E var resultB = new Result(); var actual = resultA == resultB; - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -91,7 +91,7 @@ public void EqualsEquality_ResultAIsSuccessAndResultBIsSuccessAndValuesAreNotEqu var resultB = Result.Success(bValue); var actual = resultA == resultB; - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -111,7 +111,7 @@ public void EqualsEquality_ResultAIsFailureAndResultBIsFailureAndValuesAreNotEqu var resultB = Result.Failure(bValue); var actual = resultA == resultB; - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -123,7 +123,7 @@ public void EqualsEquality_ResultAIsSuccessAndResultBIsFailure_ExpectFalse() var resultB = Result.Failure(someValue); var actual = resultA == resultB; - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -133,7 +133,7 @@ public void EqualsEquality_ResultAIsSuccessAndResultBIsDefault_ExpectFalse() var resultB = default(Result); var actual = resultA == resultB; - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -145,7 +145,7 @@ public void EqualsEquality_ResultAIsFailureAndResultBIsSuccess_ExpectFalse() var resultB = Result.Success(someValue); var actual = resultA == resultB; - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -155,7 +155,7 @@ public void EqualsEquality_ResultAIsFailureWithNotDefaultValueAndResultBIsDefaul var resultB = default(Result); var actual = resultA == resultB; - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -165,7 +165,7 @@ public void EqualsEquality_ResultAIsDefaultAndResultBIsSuccess_ExpectFalse() var resultB = new Result(default(StructType)); var actual = resultA == resultB; - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -175,6 +175,6 @@ public void EqualsEquality_ResultAIsDefaultAndResultBIsFailureWithNotDefaultValu var resultB = Result.Failure(new SomeError(PlusFifteen)); var actual = resultA == resultB; - Assert.False(actual); + Assert.That(actual, Is.False); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Equality/Equality.Operator.Inequality.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Equality/Equality.Operator.Inequality.cs index 123a4ea6..df11a7a8 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Equality/Equality.Operator.Inequality.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Equality/Equality.Operator.Inequality.cs @@ -14,7 +14,7 @@ public void EqualsInequality_ResultAIsDefaultAndResultBIsDefault_ExpectFalse() var resultB = default(Result); var actual = resultA != resultB; - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -24,7 +24,7 @@ public void EqualsInequality_ResultAIsSuccessAndResultBIsSuccessAndValuesAreNull var resultB = Result.Success(null); var actual = resultA != resultB; - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -44,7 +44,7 @@ public void EqualsInequality_ResultAIsSuccessAndResultBIsSuccessAndValuesAreEqua var resultB = new Result(bValue); var actual = resultA != resultB; - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -58,7 +58,7 @@ public void EqualsInequality_ResultAIsFailureAndResultBIsFailureAndValuesAreEqua var resultB = new Result(bValue); var actual = resultA != resultB; - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -68,7 +68,7 @@ public void EqualsInequality_ResultAIsFailureWithDefaultValueAndResultBIsDefault var resultB = new Result(default(SomeError)); var actual = resultA != resultB; - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -78,7 +78,7 @@ public void EqualsInequality_ResultAIsDefaultAndResultBIsFailureWithDefaultValue var resultB = new Result(); var actual = resultA != resultB; - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -91,7 +91,7 @@ public void EqualsInequality_ResultAIsSuccessAndResultBIsSuccessAndValuesAreNotE var resultB = Result.Success(bValue); var actual = resultA != resultB; - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -111,7 +111,7 @@ public void EqualsInequality_ResultAIsFailureAndResultBIsFailureAndValuesAreNotE var resultB = Result.Failure(bValue); var actual = resultA != resultB; - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -123,7 +123,7 @@ public void EqualsInequality_ResultAIsSuccessAndResultBIsFailure_ExpectTrue() var resultB = Result.Failure(someValue); var actual = resultA != resultB; - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -133,7 +133,7 @@ public void EqualsInequality_ResultAIsSuccessAndResultBIsDefault_ExpectTrue() var resultB = default(Result); var actual = resultA != resultB; - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -145,7 +145,7 @@ public void EqualsInequality_ResultAIsFailureAndResultBIsSuccess_ExpectTrue() var resultB = Result.Success(someValue); var actual = resultA != resultB; - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -155,7 +155,7 @@ public void EqualsInequality_ResultAIsFailureWithNotDefaultValueAndResultBIsDefa var resultB = default(Result); var actual = resultA != resultB; - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -165,7 +165,7 @@ public void EqualsInequality_ResultAIsDefaultAndResultBIsSuccess_ExpectTrue() var resultB = new Result(default(StructType)); var actual = resultA != resultB; - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -175,6 +175,6 @@ public void EqualsInequality_ResultAIsDefaultAndResultBIsFailureWithNotDefaultVa var resultB = new Result(new SomeError(PlusFifteen)); var actual = resultA != resultB; - Assert.True(actual); + Assert.That(actual, Is.True); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Constructor.Failure.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Constructor.Failure.cs index c7c7d335..72d530ba 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Constructor.Failure.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Constructor.Failure.cs @@ -11,13 +11,13 @@ partial class ResultTest public void ConstructorFromFailureValue_ExpectIsSuccessReturnsFalse() { var actual = new Result(default(StructType)); - Assert.False(actual.IsSuccess); + Assert.That(actual.IsSuccess, Is.False); } [Test] public void ConstructorFromFailureValue_ExpectIsFailureReturnsTrue() { var actual = new Result(new SomeError(MinusFifteen)); - Assert.True(actual.IsFailure); + Assert.That(actual.IsFailure, Is.True); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Constructor.Success.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Constructor.Success.cs index 05fc669b..89e94c16 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Constructor.Success.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Constructor.Success.cs @@ -11,55 +11,55 @@ partial class ResultTest public void ConstructorFromSuccess_SourceValueIsNullForgivenRef_ExpectIsSuccessReturnsTrue() { var actual = new Result(null!); - Assert.True(actual.IsSuccess); + Assert.That(actual.IsSuccess, Is.True); } [Test] public void ConstructorFromSuccess_SourceValueIsNullForgivenRef_ExpectIsFailureReturnsFalse() { var actual = new Result(null!); - Assert.False(actual.IsFailure); + Assert.That(actual.IsFailure, Is.False); } [Test] public void ConstructorFromSuccess_SourceValueIsNullableRef_ExpectIsSuccessReturnsTrue() { var actual = new Result(null); - Assert.True(actual.IsSuccess); + Assert.That(actual.IsSuccess, Is.True); } [Test] public void ConstructorFromSuccess_SourceValueIsNullableRef_ExpectIsFailureReturnsFalse() { var actual = new Result(null); - Assert.False(actual.IsFailure); + Assert.That(actual.IsFailure, Is.False); } [Test] public void ConstructorFromSuccess_SourceValueIsNullableStruct_ExpectIsSuccessReturnsTrue() { var actual = new Result(null); - Assert.True(actual.IsSuccess); + Assert.That(actual.IsSuccess, Is.True); } [Test] public void ConstructorFromSuccess_SourceValueIsNullableStruct_ExpectIsFailureReturnsFalse() { var actual = new Result(null); - Assert.False(actual.IsFailure); + Assert.That(actual.IsFailure, Is.False); } [Test] public void ConstructorFromSuccess_SourceValueIsNotNull_ExpectIsSuccessReturnsTrue() { var actual = new Result(default(SomeError)); - Assert.True(actual.IsSuccess); + Assert.That(actual.IsSuccess, Is.True); } [Test] public void ConstructorFromSuccess_SourceValueIsNotNull_ExpectIsFailureReturnsFalse() { var actual = new Result(PlusFifteenIdRefType); - Assert.False(actual.IsFailure); + Assert.That(actual.IsFailure, Is.False); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Default.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Default.cs index 1adb91ab..0f433857 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Default.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Default.cs @@ -10,13 +10,13 @@ partial class ResultTest public void Default_ExpectIsSuccessReturnsFalse() { var actual = default(Result); - Assert.False(actual.IsSuccess); + Assert.That(actual.IsSuccess, Is.False); } [Test] public void Default_ExpectIsFailureReturnsTrue() { var actual = default(Result); - Assert.True(actual.IsFailure); + Assert.That(actual.IsFailure, Is.True); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Explicit.Failure.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Explicit.Failure.cs index 404553fa..9d51042b 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Explicit.Failure.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Explicit.Failure.cs @@ -11,13 +11,13 @@ partial class ResultTest public void Failure_ExpectIsSuccessReturnsFalse() { var actual = Result.Failure(new SomeError(PlusFifteen)); - Assert.False(actual.IsSuccess); + Assert.That(actual.IsSuccess, Is.False); } [Test] public void Failure_ExpectIsFailureReturnsTrue() { var actual = Result.Failure(default); - Assert.True(actual.IsFailure); + Assert.That(actual.IsFailure, Is.True); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Explicit.Success.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Explicit.Success.cs index e4232597..8d5c4563 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Explicit.Success.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Explicit.Success.cs @@ -11,55 +11,55 @@ partial class ResultTest public void Success_SourceValueIsNullForgivenRef_ExpectIsSuccessReturnsTrue() { var actual = Result.Success(null!); - Assert.True(actual.IsSuccess); + Assert.That(actual.IsSuccess, Is.True); } [Test] public void Success_SourceValueIsNullForgivenRef_ExpectIsFailureReturnsFalse() { var actual = Result.Success(null!); - Assert.False(actual.IsFailure); + Assert.That(actual.IsFailure, Is.False); } [Test] public void Success_SourceValueIsNullableRef_ExpectIsSuccessReturnsTrue() { var actual = Result.Success(null); - Assert.True(actual.IsSuccess); + Assert.That(actual.IsSuccess, Is.True); } [Test] public void Success_SourceValueIsNullableRef_ExpectIsFailureReturnsFalse() { var actual = Result.Success(null); - Assert.False(actual.IsFailure); + Assert.That(actual.IsFailure, Is.False); } [Test] public void Success_SourceValueIsNullableStruct_ExpectIsSuccessReturnsTrue() { var actual = Result.Success(null); - Assert.True(actual.IsSuccess); + Assert.That(actual.IsSuccess, Is.True); } [Test] public void Success_SourceValueIsNullableStruct_ExpectIsFailureReturnsFalse() { var actual = Result.Success(null); - Assert.False(actual.IsFailure); + Assert.That(actual.IsFailure, Is.False); } [Test] public void Success_SourceValueIsNotNull_ExpectIsSuccessReturnsTrue() { var actual = Result.Success(default); - Assert.True(actual.IsSuccess); + Assert.That(actual.IsSuccess, Is.True); } [Test] public void Success_SourceValueIsNotNull_ExpectIsFailureReturnsFalse() { var actual = Result.Success(PlusFifteenIdRefType); - Assert.False(actual.IsFailure); + Assert.That(actual.IsFailure, Is.False); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Implicit.Failure.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Implicit.Failure.cs index ddac7676..81fb3b1a 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Implicit.Failure.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Implicit.Failure.cs @@ -11,13 +11,13 @@ partial class ResultTest public void ImplicitFailure_ExpectIsSuccessReturnsFalse() { var actual = Result.Failure(new SomeError(PlusFifteen)); - Assert.False(actual.IsSuccess); + Assert.That(actual.IsSuccess, Is.False); } [Test] public void ImplicitFailure_ExpectIsFailureReturnsTrue() { var actual = Result.Failure(default); - Assert.True(actual.IsFailure); + Assert.That(actual.IsFailure, Is.True); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Implicit.FailureBuilder.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Implicit.FailureBuilder.cs index f81e74b0..c09d5b1e 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Implicit.FailureBuilder.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Implicit.FailureBuilder.cs @@ -13,7 +13,7 @@ public void ImplicitFailureBuilder_ExpectIsSuccessReturnsFalse() var source = Result.Failure(SomeTextStructType); Result actual = source; - Assert.False(actual.IsSuccess); + Assert.That(actual.IsSuccess, Is.False); } [Test] @@ -22,6 +22,6 @@ public void ImplicitFailureBuilder_ExpectIsFailureReturnsTrue() var source = default(FailureBuilder); Result actual = source; - Assert.True(actual.IsFailure); + Assert.That(actual.IsFailure, Is.True); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Implicit.Success.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Implicit.Success.cs index 320e05a8..81878d97 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Implicit.Success.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Implicit.Success.cs @@ -11,55 +11,55 @@ partial class ResultTest public void ImplicitSuccess_SourceValueIsNullForgivenRef_ExpectIsSuccessReturnsTrue() { Result actual = (RefType)null!; - Assert.True(actual.IsSuccess); + Assert.That(actual.IsSuccess, Is.True); } [Test] public void ImplicitSuccess_SourceValueIsNullForgivenRef_ExpectIsFailureReturnsFalse() { Result actual = (RefType)null!; - Assert.False(actual.IsFailure); + Assert.That(actual.IsFailure, Is.False); } [Test] public void ImplicitSuccess_SourceValueIsNullableRef_ExpectIsSuccessReturnsTrue() { Result actual = (RefType?)null; - Assert.True(actual.IsSuccess); + Assert.That(actual.IsSuccess, Is.True); } [Test] public void ImplicitSuccess_SourceValueIsNullableRef_ExpectIsFailureReturnsFalse() { Result actual = (RefType?)null; - Assert.False(actual.IsFailure); + Assert.That(actual.IsFailure, Is.False); } [Test] public void ImplicitSuccess_SourceValueIsNullableStruct_ExpectIsSuccessReturnsTrue() { Result actual = (StructType?)null; - Assert.True(actual.IsSuccess); + Assert.That(actual.IsSuccess, Is.True); } [Test] public void ImplicitSuccess_SourceValueIsNullableStruct_ExpectIsFailureReturnsFalse() { Result actual = (StructType?)null; - Assert.False(actual.IsFailure); + Assert.That(actual.IsFailure, Is.False); } [Test] public void ImplicitSuccess_SourceValueIsNotNull_ExpectIsSuccessReturnsTrue() { Result actual = ZeroIdRefType; - Assert.True(actual.IsSuccess); + Assert.That(actual.IsSuccess, Is.True); } [Test] public void ImplicitSuccess_SourceValueIsNotNull_ExpectIsFailureReturnsFalse() { Result actual = default(StructType); - Assert.False(actual.IsFailure); + Assert.That(actual.IsFailure, Is.False); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Implicit.SuccessBuilder.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Implicit.SuccessBuilder.cs index 2b3451dc..7223a18c 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Implicit.SuccessBuilder.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Implicit.SuccessBuilder.cs @@ -13,7 +13,7 @@ public void ImplicitSuccessBuilder_ExpectIsSuccessReturnsTrue() var source = Result.Success(PlusFifteenIdRefType); Result actual = source; - Assert.True(actual.IsSuccess); + Assert.That(actual.IsSuccess, Is.True); } [Test] @@ -22,6 +22,6 @@ public void ImplicitSuccessBuilder_ExpectIsFailureReturnsFalse() var source = Result.Success(SomeTextStructType); Result actual = source; - Assert.False(actual.IsFailure); + Assert.That(actual.IsFailure, Is.False); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/Filter.MapFailure.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/Filter.MapFailure.cs index ab403e7f..24996d7b 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/Filter.MapFailure.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/Filter.MapFailure.cs @@ -21,7 +21,7 @@ public void FilterWithMapFailure_PredicateIsNull_ExpectArgumentNullException( var actualException = Assert.Throws( () => _ = source.Filter(null!, _ => causeFailure, _ => mappedFailure)); - Assert.AreEqual("predicate", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("predicate")); } [Test] @@ -37,7 +37,7 @@ public void FilterWithMapFailure_CauseFactoryIsNull_ExpectArgumentNullException( var actualException = Assert.Throws( () => _ = source.Filter(_ => false, null!, _ => mappedFailure)); - Assert.AreEqual("causeFactory", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("causeFactory")); } [Test] @@ -53,7 +53,7 @@ public void FilterWithMapFailure_MapFailureIsNull_ExpectArgumentNullException( var actualException = Assert.Throws( () => _ = source.Filter(_ => true, _ => causeFailure, null!)); - Assert.AreEqual("mapFailure", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("mapFailure")); } [Test] @@ -70,7 +70,7 @@ public void FilterWithMapFailure_PredicateReturnsTrueAndSourceIsNullSuccess_Expe _ => mappedFailure); var expected = new Result(null); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -87,7 +87,7 @@ public void FilterWithMapFailure_PredicateReturnsTrueAndSourceIsNotNullSuccess_E _ => mappedFailure); var expected = new Result(MinusFifteenIdRefType); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -105,7 +105,7 @@ public void FilterWithMapFailure_PredicateReturnsTrueAndSourceIsFailure_ExpectFa _ => mappedFailure); var expected = new Result(mappedFailure); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -123,7 +123,7 @@ public void FilterWithMapFailure_PredicateReturnsFalseAndSourceIsSuccess_ExpectR _ => mappedFailure); var expected = new Result(causeFailure); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -141,6 +141,6 @@ public void FilterWithMapFailure_PredicateReturnsFalseAndSourceIsDefaultOrFailur _ => mappedFailure); var expected = new Result(mappedFailure); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/Filter.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/Filter.cs index 85a33f03..73330b40 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/Filter.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/Filter.cs @@ -18,7 +18,7 @@ public void Filter_PredicateIsNull_ExpectArgumentNullException( var actualException = Assert.Throws( () => _ = source.Filter(null!, _ => SomeTextStructType)); - Assert.AreEqual("predicate", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("predicate")); } [Test] @@ -32,7 +32,7 @@ public void Filter_CauseFactoryIsNull_ExpectArgumentNullException( var actualException = Assert.Throws( () => _ = source.Filter(_ => true, null!)); - Assert.AreEqual("causeFactory", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("causeFactory")); } [Test] @@ -49,7 +49,7 @@ public void Filter_PredicateReturnsTrue_ExpectSourceResult( _ => true, _ => causeFailure); - Assert.AreEqual(source, actual); + Assert.That(actual, Is.EqualTo(source)); } [Test] @@ -64,7 +64,7 @@ public void Filter_PredicateReturnsFalseAndSourceIsSuccess_ExpectResultOfCauseFa _ => causeFailure); var expected = new Result(causeFailure); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -82,6 +82,6 @@ public void Filter_PredicateReturnsFalseAndSourceIsDefaultOrFailure_ExpectSource _ => false, _ => causeFailure); - Assert.AreEqual(source, actual); + Assert.That(actual, Is.EqualTo(source)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/FilterAsync.MapFailure.Sync.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/FilterAsync.MapFailure.Sync.cs index cb455b9d..b9a39d6f 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/FilterAsync.MapFailure.Sync.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/FilterAsync.MapFailure.Sync.cs @@ -22,7 +22,7 @@ public void FilterAsyncWithMapFailureSync_PredicateIsNull_ExpectArgumentNullExce var actualException = Assert.ThrowsAsync( async () => _ = await source.FilterAsync(null!, _ => Task.FromResult(cause), _ => mapped)); - Assert.AreEqual("predicateAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("predicateAsync")); } [Test] @@ -39,7 +39,7 @@ public void FilterAsyncWithMapFailureSync_CauseFactoryIsNull_ExpectArgumentNullE var actualException = Assert.ThrowsAsync( async () => _ = await source.FilterAsync(_ => Task.FromResult(true), causeFactoryAsync, _ => mapped)); - Assert.AreEqual("causeFactoryAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("causeFactoryAsync")); } [Test] @@ -56,7 +56,7 @@ public void FilterAsyncWithMapFailureSync_MapFailureIsNull_ExpectArgumentNullExc var actualException = Assert.ThrowsAsync( async () => _ = await source.FilterAsync(_ => Task.FromResult(false), _ => Task.FromResult(cause), mapFailure)); - Assert.AreEqual("mapFailure", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("mapFailure")); } [Test] @@ -73,7 +73,7 @@ public async Task FilterAsyncWithMapFailureSync_PredicateReturnsTrueAndSourceIsN _ => mapped); var expected = new Result(null); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -90,7 +90,7 @@ public async Task FilterAsyncWithMapFailureSync_PredicateReturnsTrueAndSourceIsN _ => mapped); var expected = new Result(PlusFifteenIdRefType); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -108,7 +108,7 @@ public async Task FilterAsyncWithMapFailureSync_PredicateReturnsTrueAndSourceIsF _ => mapped); var expected = new Result(mapped); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -126,7 +126,7 @@ public async Task FilterAsyncWithMapFailureSync_PredicateReturnsFalseAndSourceIs _ => mapped); var expected = new Result(cause); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -144,6 +144,6 @@ public async Task FilterAsyncWithMapFailureSync_PredicateReturnsFalseAndSourceIs _ => mapped); var expected = new Result(mapped); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/FilterAsync.MapFailure.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/FilterAsync.MapFailure.cs index f3651223..d1442edf 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/FilterAsync.MapFailure.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/FilterAsync.MapFailure.cs @@ -22,7 +22,7 @@ public void FilterAsyncWithMapFailure_PredicateIsNull_ExpectArgumentNullExceptio var actualException = Assert.ThrowsAsync( async () => _ = await source.FilterAsync(null!, _ => Task.FromResult(cause), _ => Task.FromResult(mapped))); - Assert.AreEqual("predicateAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("predicateAsync")); } [Test] @@ -39,7 +39,7 @@ public void FilterAsyncWithMapFailure_CauseFactoryIsNull_ExpectArgumentNullExcep var actualException = Assert.ThrowsAsync( async () => _ = await source.FilterAsync(_ => Task.FromResult(true), causeFactoryAsync, _ => Task.FromResult(mapped))); - Assert.AreEqual("causeFactoryAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("causeFactoryAsync")); } [Test] @@ -56,7 +56,7 @@ public void FilterAsyncWithMapFailure_MapFailureIsNull_ExpectArgumentNullExcepti var actualException = Assert.ThrowsAsync( async () => _ = await source.FilterAsync(_ => Task.FromResult(false), _ => Task.FromResult(cause), mapFailureAsync)); - Assert.AreEqual("mapFailureAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("mapFailureAsync")); } [Test] @@ -73,7 +73,7 @@ public async Task FilterAsyncWithMapFailure_PredicateReturnsTrueAndSourceIsNullS _ => Task.FromResult(mapped)); var expected = new Result(null); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -90,7 +90,7 @@ public async Task FilterAsyncWithMapFailure_PredicateReturnsTrueAndSourceIsNotNu _ => Task.FromResult(mapped)); var expected = new Result(PlusFifteenIdRefType); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -108,7 +108,7 @@ public async Task FilterAsyncWithMapFailure_PredicateReturnsTrueAndSourceIsFailu _ => Task.FromResult(mapped)); var expected = new Result(mapped); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -126,7 +126,7 @@ public async Task FilterAsyncWithMapFailure_PredicateReturnsFalseAndSourceIsSucc _ => Task.FromResult(mapped)); var expected = new Result(cause); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -144,6 +144,6 @@ public async Task FilterAsyncWithMapFailure_PredicateReturnsFalseAndSourceIsDefa _ => Task.FromResult(mapped)); var expected = new Result(mapped); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/FilterAsync.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/FilterAsync.cs index 77f9fdb0..3e9d7b4e 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/FilterAsync.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/FilterAsync.cs @@ -21,7 +21,7 @@ public void FilterAsync_PredicateAsyncIsNull_ExpectArgumentNullException( var actualException = Assert.ThrowsAsync( async () => _ = await source.FilterAsync(null!, _ => Task.FromResult(causeFailure))); - Assert.AreEqual("predicateAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("predicateAsync")); } [Test] @@ -35,7 +35,7 @@ public void FilterAsync_CauseFactoryAsyncIsNull_ExpectArgumentNullException( var actualException = Assert.ThrowsAsync( async () => _ = await source.FilterAsync(_ => Task.FromResult(false), null!)); - Assert.AreEqual("causeFactoryAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("causeFactoryAsync")); } [Test] @@ -52,7 +52,7 @@ public async Task FilterAsync_PredicateReturnsTrue_ExpectSourceResult( _ => Task.FromResult(true), _ => Task.FromResult(causeFailure)); - Assert.AreEqual(source, actual); + Assert.That(actual, Is.EqualTo(source)); } [Test] @@ -68,7 +68,7 @@ public async Task FilterAsync_PredicateReturnsTrueAndSourceIsSuccess_ExpectResul _ => Task.FromResult(causeFailure)); var expected = Result.Failure(causeFailure); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -86,6 +86,6 @@ public async Task FilterAsync_PredicateReturnsTrueAndSourceIsDefaultOrFailure_Ex _ => Task.FromResult(false), _ => Task.FromResult(causeFailure)); - Assert.AreEqual(source, actual); + Assert.That(actual, Is.EqualTo(source)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/FilterValueAsync.MapFailure.Sync.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/FilterValueAsync.MapFailure.Sync.cs index 4a55830a..61d720af 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/FilterValueAsync.MapFailure.Sync.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/FilterValueAsync.MapFailure.Sync.cs @@ -23,7 +23,7 @@ public void FilterValueAsyncWithMapFailureSync_PredicateIsNull_ExpectArgumentNul async () => _ = await source.FilterValueAsync( null!, _ => ValueTask.FromResult(cause), _ => mapped)); - Assert.AreEqual("predicateAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("predicateAsync")); } [Test] @@ -41,7 +41,8 @@ public void FilterValueAsyncWithMapFailureSync_CauseFactoryIsNull_ExpectArgument async () => _ = await source.FilterValueAsync( _ => ValueTask.FromResult(true), causeFactoryAsync, _ => mapped)); - Assert.AreEqual("causeFactoryAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("causeFactoryAsync")); + Assert.That(actualException!.ParamName, Is.EqualTo("causeFactoryAsync")); } [Test] @@ -59,7 +60,7 @@ public void FilterValueAsyncWithMapFailureSync_MapFailureIsNull_ExpectArgumentNu async () => _ = await source.FilterValueAsync( _ => ValueTask.FromResult(false), _ => ValueTask.FromResult(cause), mapFailure)); - Assert.AreEqual("mapFailure", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("mapFailure")); } [Test] @@ -76,7 +77,7 @@ public async Task FilterValueAsyncWithMapFailureSync_PredicateReturnsTrueAndSour _ => mapped); var expected = new Result(null); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -93,7 +94,7 @@ public async Task FilterValueAsyncWithMapFailureSync_PredicateReturnsTrueAndSour _ => mapped); var expected = new Result(MinusFifteenIdRefType); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -111,7 +112,7 @@ public async Task FilterValueAsyncWithMapFailureSync_PredicateReturnsTrueAndSour _ => mapped); var expected = new Result(mapped); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -129,7 +130,7 @@ public async Task FilterValueAsyncWithMapFailureSync_PredicateReturnsFalseAndSou _ => mapped); var expected = new Result(cause); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -147,6 +148,6 @@ public async Task FilterValueAsyncWithMapFailureSync_PredicateReturnsFalseAndSou _ => mapped); var expected = new Result(mapped); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/FilterValueAsync.MapFailure.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/FilterValueAsync.MapFailure.cs index 8b251cda..2fdbf936 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/FilterValueAsync.MapFailure.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/FilterValueAsync.MapFailure.cs @@ -23,7 +23,7 @@ public void FilterValueAsyncWithMapFailure_PredicateIsNull_ExpectArgumentNullExc async () => _ = await source.FilterValueAsync( null!, _ => ValueTask.FromResult(cause), _ => ValueTask.FromResult(mapped))); - Assert.AreEqual("predicateAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("predicateAsync")); } [Test] @@ -41,7 +41,7 @@ public void FilterValueAsyncWithMapFailure_CauseFactoryIsNull_ExpectArgumentNull async () => _ = await source.FilterValueAsync( _ => ValueTask.FromResult(true), causeFactoryAsync, _ => ValueTask.FromResult(mapped))); - Assert.AreEqual("causeFactoryAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("causeFactoryAsync")); } [Test] @@ -59,7 +59,7 @@ public void FilterValueAsyncWithMapFailure_MapFailureIsNull_ExpectArgumentNullEx async () => _ = await source.FilterValueAsync( _ => ValueTask.FromResult(false), _ => ValueTask.FromResult(cause), mapFailureAsync)); - Assert.AreEqual("mapFailureAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("mapFailureAsync")); } [Test] @@ -76,7 +76,7 @@ public async Task FilterValueAsyncWithMapFailure_PredicateReturnsTrueAndSourceIs _ => ValueTask.FromResult(mapped)); var expected = new Result(null); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -93,7 +93,7 @@ public async Task FilterValueAsyncWithMapFailure_PredicateReturnsTrueAndSourceIs _ => ValueTask.FromResult(mapped)); var expected = new Result(MinusFifteenIdRefType); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -111,7 +111,7 @@ public async Task FilterValueAsyncWithMapFailure_PredicateReturnsTrueAndSourceIs _ => ValueTask.FromResult(mapped)); var expected = new Result(mapped); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -129,7 +129,7 @@ public async Task FilterValueAsyncWithMapFailure_PredicateReturnsFalseAndSourceI _ => ValueTask.FromResult(mapped)); var expected = new Result(cause); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -147,6 +147,6 @@ public async Task FilterValueAsyncWithMapFailure_PredicateReturnsFalseAndSourceI _ => ValueTask.FromResult(mapped)); var expected = new Result(mapped); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/FilterValueAsync.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/FilterValueAsync.cs index e7518f19..c48f4e7f 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/FilterValueAsync.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/FilterValueAsync.cs @@ -21,7 +21,7 @@ public void FilterValueAsync_PredicateAsyncIsNull_ExpectArgumentNullException( var actualException = Assert.ThrowsAsync( async () => _ = await source.FilterValueAsync(null!, _ => ValueTask.FromResult(causeFailure))); - Assert.AreEqual("predicateAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("predicateAsync")); } [Test] @@ -35,7 +35,7 @@ public void FilterValueAsync_CauseFactoryAsyncIsNull_ExpectArgumentNullException var actualException = Assert.ThrowsAsync( async () => _ = await source.FilterValueAsync(_ => ValueTask.FromResult(false), null!)); - Assert.AreEqual("causeFactoryAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("causeFactoryAsync")); } [Test] @@ -52,7 +52,7 @@ public async Task FilterValueAsync_PredicateReturnsTrue_ExpectSourceResult( _ => ValueTask.FromResult(true), _ => ValueTask.FromResult(causeFailure)); - Assert.AreEqual(source, actual); + Assert.That(actual, Is.EqualTo(source)); } [Test] @@ -71,7 +71,7 @@ public async Task FilterValueAsync_PredicateReturnsFalseAndSourceIsSuccess_Expec _ => ValueTask.FromResult(causeFailure)); var expected = new Result(causeFailure); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -89,6 +89,6 @@ public async Task FilterValueAsync_PredicateReturnsFalseAndSourceIsDefaultOrFail _ => ValueTask.FromResult(false), _ => ValueTask.FromResult(causeFailure)); - Assert.AreEqual(source, actual); + Assert.That(actual, Is.EqualTo(source)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/Forward.MapFailure.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/Forward.MapFailure.cs index 0148af3f..82fe1273 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/Forward.MapFailure.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/Forward.MapFailure.cs @@ -20,7 +20,7 @@ public void ForwardMapFailure_NextFactoryIsNull_ExpectArgumentNullException( var actualException = Assert.Throws( () => _ = source.Forward(null!, _ => mappedFailure)); - Assert.AreEqual("nextFactory", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("nextFactory")); } [Test] @@ -36,7 +36,7 @@ public void ForwardMapFailure_MapFailureIsNull_ExpectArgumentNullException( var actualException = Assert.Throws( () => _ = source.Forward(_ => next, null!)); - Assert.AreEqual("mapFailure", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("mapFailure")); } [Test] @@ -51,7 +51,7 @@ public void ForwardMapFailure_SourceIsDefaultOrFailure_ExpectResultOfMappedFailu var actual = source.Forward(_ => next, _ => mappedFailure); var expected = new Result(mappedFailure); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -64,7 +64,7 @@ public void ForwardMapFailure_SourceIsSuccessAndNextIsDefault_ExpectDefault( var mappedFailure = MinusFifteen; var actual = source.Forward(_ => next, _ => mappedFailure); - Assert.AreEqual(next, actual); + Assert.That(actual, Is.EqualTo(next)); } [Test] @@ -77,7 +77,7 @@ public void ForwardMapFailure_SourceIsSuccessAndNextIsSuccess_ExpectNext( var mappedFailure = decimal.One; var actual = source.Forward(_ => next, _ => mappedFailure); - Assert.AreEqual(next, actual); + Assert.That(actual, Is.EqualTo(next)); } [Test] @@ -90,6 +90,6 @@ public void ForwardMapFailure_SourceIsSuccessAndNextIsFailure_ExpectNext( var mappedFailure = new SomeError(int.MaxValue); var actual = source.Forward(_ => next, _ => mappedFailure); - Assert.AreEqual(next, actual); + Assert.That(actual, Is.EqualTo(next)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/Forward.Self.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/Forward.Self.cs index ab05ff01..c0012aa3 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/Forward.Self.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/Forward.Self.cs @@ -18,7 +18,7 @@ public void ForwardSelf_NextFactoryIsNull_ExpectArgumentNullException( var actualException = Assert.Throws( () => _ = source.Forward(null!)); - Assert.AreEqual("nextFactory", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("nextFactory")); } [Test] @@ -30,7 +30,7 @@ public void ForwardSelf_SourceIsDefaultOrFailure_ExpectSourceResult( var next = new Result(PlusFifteenIdRefType); var actual = source.Forward(_ => next); - Assert.AreEqual(source, actual); + Assert.That(actual, Is.EqualTo(source)); } [Test] @@ -42,7 +42,7 @@ public void ForwardSelf_SourceIsSuccessAndNextIsDefault_ExpectDefault( var next = new Result(); var actual = source.Forward(_ => next); - Assert.AreEqual(next, actual); + Assert.That(actual, Is.EqualTo(next)); } [Test] @@ -54,7 +54,7 @@ public void ForwardSelf_SourceIsSuccessAndNextIsSuccess_ExpectNext( var next = new Result(PlusFifteenIdRefType); var actual = source.Forward(_ => next); - Assert.AreEqual(next, actual); + Assert.That(actual, Is.EqualTo(next)); } [Test] @@ -66,6 +66,6 @@ public void ForwardSelf_SourceIsSuccessAndNextIsFailure_ExpectNext( var next = Result.Failure(SomeTextStructType).With(); var actual = source.Forward(_ => next); - Assert.AreEqual(next, actual); + Assert.That(actual, Is.EqualTo(next)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/Forward.Success.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/Forward.Success.cs index 0f46bc74..e5016d72 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/Forward.Success.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/Forward.Success.cs @@ -18,7 +18,7 @@ public void Forward_NextFactoryIsNull_ExpectArgumentNullException( var actualException = Assert.Throws( () => _ = source.Forward(null!)); - Assert.AreEqual("nextFactory", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("nextFactory")); } [Test] @@ -30,7 +30,7 @@ public void Forward_SourceIsDefault_ExpectDefault( var actual = source.Forward(_ => next); var expected = default(Result); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -42,7 +42,7 @@ public void Forward_SourceIsFailure_ExpectResultOfSourceFailure( var actual = source.Forward(_ => next); var expected = new Result(SomeTextStructType); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -54,7 +54,7 @@ public void Forward_SourceIsSuccessAndNextIsDefault_ExpectDefault( var next = new Result(); var actual = source.Forward(_ => next); - Assert.AreEqual(next, actual); + Assert.That(actual, Is.EqualTo(next)); } [Test] @@ -66,7 +66,7 @@ public void Forward_SourceIsSuccessAndNextIsSuccess_ExpectNext( var next = Result.Success(PlusFifteenIdRefType).With(); var actual = source.Forward(_ => next); - Assert.AreEqual(next, actual); + Assert.That(actual, Is.EqualTo(next)); } [Test] @@ -78,6 +78,6 @@ public void Forward_SourceIsSuccessAndNextIsFailure_ExpectNext( var next = new Result(SomeTextStructType); var actual = source.Forward(_ => next); - Assert.AreEqual(next, actual); + Assert.That(actual, Is.EqualTo(next)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardAsync.MapFailure.Sync.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardAsync.MapFailure.Sync.cs index 7d48e099..13c0ca6a 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardAsync.MapFailure.Sync.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardAsync.MapFailure.Sync.cs @@ -21,7 +21,7 @@ public void ForwardAsyncMapFailureSync_NextFactoryAsyncIsNull_ExpectArgumentNull var actualException = Assert.ThrowsAsync( async () => _ = await source.ForwardAsync(null!, _ => mappedFailure)); - Assert.AreEqual("nextFactoryAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("nextFactoryAsync")); } [Test] @@ -38,7 +38,7 @@ public void ForwardAsyncMapFailureSync_MapFailureIsNull_ExpectArgumentNullExcept var actualException = Assert.ThrowsAsync( async () => _ = await source.ForwardAsync(_ => Task.FromResult(next), mapFailure)); - Assert.AreEqual("mapFailure", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("mapFailure")); } [Test] @@ -53,7 +53,7 @@ public async Task ForwardAsyncMapFailureSync_SourceIsDefaultOrFailure_ExpectResu var actual = await source.ForwardAsync(_ => Task.FromResult(next), _ => mappedFailure); var expected = new Result(mappedFailure); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -66,7 +66,7 @@ public async Task ForwardAsyncMapFailureSync_SourceIsSuccessAndNextIsDefault_Exp var mappedFailure = new SomeError(PlusFifteen); var actual = await source.ForwardAsync(_ => Task.FromResult(next), _ => mappedFailure); - Assert.AreEqual(next, actual); + Assert.That(actual, Is.EqualTo(next)); } [Test] @@ -79,7 +79,7 @@ public async Task ForwardAsyncMapFailureSync_SourceIsSuccessAndNextIsSuccess_Exp var mappedFailure = new SomeError(int.MaxValue); var actual = await source.ForwardAsync(_ => Task.FromResult(next), _ => mappedFailure); - Assert.AreEqual(next, actual); + Assert.That(actual, Is.EqualTo(next)); } [Test] @@ -92,6 +92,6 @@ public async Task ForwardAsyncMapFailureSync_SourceIsSuccessAndNextIsFailure_Exp var mappedFailure = new SomeError(int.MinValue); var actual = await source.ForwardAsync(_ => Task.FromResult(next), _ => mappedFailure); - Assert.AreEqual(next, actual); + Assert.That(actual, Is.EqualTo(next)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardAsync.MapFailure.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardAsync.MapFailure.cs index bb0230c6..ed92b583 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardAsync.MapFailure.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardAsync.MapFailure.cs @@ -21,7 +21,7 @@ public void ForwardAsyncMapFailure_NextFactoryAsyncIsNull_ExpectArgumentNullExce var actualException = Assert.ThrowsAsync( async () => _ = await source.ForwardAsync(null!, _ => Task.FromResult(mappedFailure))); - Assert.AreEqual("nextFactoryAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("nextFactoryAsync")); } [Test] @@ -38,7 +38,7 @@ public void ForwardAsyncMapFailure_MapFailureIsNull_ExpectArgumentNullException( var actualException = Assert.ThrowsAsync( async () => _ = await source.ForwardAsync(_ => Task.FromResult(next), mapFailureAsync)); - Assert.AreEqual("mapFailureAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("mapFailureAsync")); } [Test] @@ -53,7 +53,7 @@ public async Task ForwardAsyncMapFailure_SourceIsDefaultOrFailure_ExpectResultOf var actual = await source.ForwardAsync(_ => Task.FromResult(next), _ => Task.FromResult(mappedFailure)); var expected = new Result(mappedFailure); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -66,7 +66,7 @@ public async Task ForwardAsyncMapFailure_SourceIsSuccessAndNextIsDefault_ExpectD var mappedFailure = new SomeError(PlusFifteen); var actual = await source.ForwardAsync(_ => Task.FromResult(next), _ => Task.FromResult(mappedFailure)); - Assert.AreEqual(next, actual); + Assert.That(actual, Is.EqualTo(next)); } [Test] @@ -79,7 +79,7 @@ public async Task ForwardAsyncMapFailure_SourceIsSuccessAndNextIsSuccess_ExpectN var mappedFailure = new SomeError(int.MaxValue); var actual = await source.ForwardAsync(_ => Task.FromResult(next), _ => Task.FromResult(mappedFailure)); - Assert.AreEqual(next, actual); + Assert.That(actual, Is.EqualTo(next)); } [Test] @@ -92,6 +92,6 @@ public async Task ForwardAsyncMapFailure_SourceIsSuccessAndNextIsFailure_ExpectN var mappedFailure = new SomeError(int.MinValue); var actual = await source.ForwardAsync(_ => Task.FromResult(next), _ => Task.FromResult(mappedFailure)); - Assert.AreEqual(next, actual); + Assert.That(actual, Is.EqualTo(next)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardAsync.Self.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardAsync.Self.cs index f5cfc394..c01cda82 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardAsync.Self.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardAsync.Self.cs @@ -19,7 +19,7 @@ public void ForwardAsyncSelf_NextFactoryAsyncIsNull_ExpectArgumentNullException( var actualException = Assert.ThrowsAsync( async () => _ = await source.ForwardAsync(null!)); - Assert.AreEqual("nextFactoryAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("nextFactoryAsync")); } [Test] @@ -34,7 +34,7 @@ public async Task ForwardAsyncSelf_SourceIsDefaultOrFailure_ExpectSourceResult( }; var actual = await source.ForwardAsync(_ => Task.FromResult(next)); - Assert.AreEqual(source, actual); + Assert.That(actual, Is.EqualTo(source)); } [Test] @@ -46,7 +46,7 @@ public async Task ForwardAsyncSelf_SourceIsSuccessAndNextIsDefault_ExpectDefault var next = default(Result); var actual = await source.ForwardAsync(_ => Task.FromResult(next)); - Assert.AreEqual(next, actual); + Assert.That(actual, Is.EqualTo(next)); } [Test] @@ -58,7 +58,7 @@ public async Task ForwardAsyncSelf_SourceIsSuccessAndNextIsSuccess_ExpectNext( Result next = Result.Success(null); var actual = await source.ForwardAsync(_ => Task.FromResult(next)); - Assert.AreEqual(next, actual); + Assert.That(actual, Is.EqualTo(next)); } [Test] @@ -70,6 +70,6 @@ public async Task ForwardAsyncSelf_SourceIsSuccessAndNextIsFailure_ExpectNext( var next = new Result(SomeTextStructType); var actual = await source.ForwardAsync(_ => Task.FromResult(next)); - Assert.AreEqual(next, actual); + Assert.That(actual, Is.EqualTo(next)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardAsync.Success.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardAsync.Success.cs index 03c42c2f..03697732 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardAsync.Success.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardAsync.Success.cs @@ -19,7 +19,7 @@ public void ForwardAsync_NextFactoryIsNull_ExpectArgumentNullException( var actualException = Assert.ThrowsAsync( async () => _ = await source.ForwardAsync(null!)); - Assert.AreEqual("nextFactoryAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("nextFactoryAsync")); } [Test] @@ -31,7 +31,7 @@ public async Task ForwardAsync_SourceIsDefault_ExpectDefault( var actual = await source.ForwardAsync(_ => Task.FromResult(next)); var expected = default(Result); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -43,7 +43,7 @@ public async Task ForwardAsync_SourceIsFailure_ExpectResultOfSourceFailure( var actual = await source.ForwardAsync(_ => Task.FromResult(next)); var expected = Result.Failure(SomeTextStructType).With(); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -55,7 +55,7 @@ public async Task ForwardAsync_SourceIsSuccessAndNextIsDefault_ExpectDefault( var next = default(Result); var actual = await source.ForwardAsync(_ => Task.FromResult(next)); - Assert.AreEqual(next, actual); + Assert.That(actual, Is.EqualTo(next)); } [Test] @@ -67,7 +67,7 @@ public async Task ForwardAsync_SourceIsSuccessAndNextIsSuccess_ExpectNext( var next = Result.Success(decimal.One).With(); var actual = await source.ForwardAsync(_ => Task.FromResult(next)); - Assert.AreEqual(next, actual); + Assert.That(actual, Is.EqualTo(next)); } [Test] @@ -79,6 +79,6 @@ public async Task ForwardAsync_SourceIsSuccessAndNextIsFailure_ExpectNext( var next = Result.Failure(SomeTextStructType); var actual = await source.ForwardAsync(_ => Task.FromResult(next)); - Assert.AreEqual(next, actual); + Assert.That(actual, Is.EqualTo(next)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardValueAsync.MapFailure.Sync.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardValueAsync.MapFailure.Sync.cs index 695b065c..4ee6ab12 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardValueAsync.MapFailure.Sync.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardValueAsync.MapFailure.Sync.cs @@ -21,7 +21,7 @@ public void ForwardValueAsyncMapFailureSync_NextFactoryAsyncIsNull_ExpectArgumen var actualException = Assert.ThrowsAsync( async () => _ = await source.ForwardValueAsync(null!, _ => mappedFailure)); - Assert.AreEqual("nextFactoryAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("nextFactoryAsync")); } [Test] @@ -38,7 +38,7 @@ public void ForwardValueAsyncMapFailureSync_MapFailureIsNull_ExpectArgumentNullE var actualException = Assert.ThrowsAsync( async () => _ = await source.ForwardValueAsync(_ => ValueTask.FromResult(next), mapFailure)); - Assert.AreEqual("mapFailure", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("mapFailure")); } [Test] @@ -53,7 +53,7 @@ public async Task ForwardValueAsyncMapFailureSync_SourceIsDefaultOrFailure_Expec var actual = await source.ForwardValueAsync(_ => ValueTask.FromResult(next), _ => mappedFailure); var expected = new Result(mappedFailure); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -66,7 +66,7 @@ public async Task ForwardValueAsyncMapFailureSync_SourceIsSuccessAndNextIsDefaul var mappedFailure = new SomeError(PlusFifteen); var actual = await source.ForwardValueAsync(_ => ValueTask.FromResult(next), _ => mappedFailure); - Assert.AreEqual(next, actual); + Assert.That(actual, Is.EqualTo(next)); } [Test] @@ -79,7 +79,7 @@ public async Task ForwardValueAsyncMapFailureSync_SourceIsSuccessAndNextIsSucces var mappedFailure = new SomeError(int.MaxValue); var actual = await source.ForwardValueAsync(_ => ValueTask.FromResult(next), _ => mappedFailure); - Assert.AreEqual(next, actual); + Assert.That(actual, Is.EqualTo(next)); } [Test] @@ -92,6 +92,6 @@ public async Task ForwardValueAsyncMapFailureSync_SourceIsSuccessAndNextIsFailur var mappedFailure = new SomeError(PlusFifteen); var actual = await source.ForwardValueAsync(_ => ValueTask.FromResult(next), _ => mappedFailure); - Assert.AreEqual(next, actual); + Assert.That(actual, Is.EqualTo(next)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardValueAsync.MapFailure.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardValueAsync.MapFailure.cs index 4a1f8feb..c03b783a 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardValueAsync.MapFailure.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardValueAsync.MapFailure.cs @@ -21,7 +21,7 @@ public void ForwardValueAsyncMapFailure_NextFactoryAsyncIsNull_ExpectArgumentNul var actualException = Assert.ThrowsAsync( async () => _ = await source.ForwardValueAsync(null!, _ => ValueTask.FromResult(mappedFailure))); - Assert.AreEqual("nextFactoryAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("nextFactoryAsync")); } [Test] @@ -38,7 +38,7 @@ public void ForwardValueAsyncMapFailure_MapFailureIsNull_ExpectArgumentNullExcep var actualException = Assert.ThrowsAsync( async () => _ = await source.ForwardValueAsync(_ => ValueTask.FromResult(next), mapFailureAsync)); - Assert.AreEqual("mapFailureAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("mapFailureAsync")); } [Test] @@ -53,7 +53,7 @@ public async Task ForwardValueAsyncMapFailure_SourceIsDefaultOrFailure_ExpectRes var actual = await source.ForwardValueAsync(_ => ValueTask.FromResult(next), _ => ValueTask.FromResult(mappedFailure)); var expected = new Result(mappedFailure); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -66,7 +66,7 @@ public async Task ForwardValueAsyncMapFailure_SourceIsSuccessAndNextIsDefault_Ex var mappedFailure = new SomeError(PlusFifteen); var actual = await source.ForwardValueAsync(_ => ValueTask.FromResult(next), _ => ValueTask.FromResult(mappedFailure)); - Assert.AreEqual(next, actual); + Assert.That(actual, Is.EqualTo(next)); } [Test] @@ -79,7 +79,7 @@ public async Task ForwardValueAsyncMapFailure_SourceIsSuccessAndNextIsSuccess_Ex var mappedFailure = new SomeError(int.MaxValue); var actual = await source.ForwardValueAsync(_ => ValueTask.FromResult(next), _ => ValueTask.FromResult(mappedFailure)); - Assert.AreEqual(next, actual); + Assert.That(actual, Is.EqualTo(next)); } [Test] @@ -92,6 +92,6 @@ public async Task ForwardValueAsyncMapFailure_SourceIsSuccessAndNextIsFailure_Ex var mappedFailure = new SomeError(PlusFifteen); var actual = await source.ForwardValueAsync(_ => ValueTask.FromResult(next), _ => ValueTask.FromResult(mappedFailure)); - Assert.AreEqual(next, actual); + Assert.That(actual, Is.EqualTo(next)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardValueAsync.Self.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardValueAsync.Self.cs index ba7b72f5..b2b539a2 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardValueAsync.Self.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardValueAsync.Self.cs @@ -19,7 +19,7 @@ public void ForwardValueAsyncSelf_NextFactoryAsyncIsNull_ExpectArgumentNullExcep var actualException = Assert.ThrowsAsync( async () => _ = await source.ForwardValueAsync(null!)); - Assert.AreEqual("nextFactoryAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("nextFactoryAsync")); } [Test] @@ -34,7 +34,7 @@ public async Task ForwardValueAsyncSelf_SourceIsDefaultOrFailure_ExpectSourceRes }); var actual = await source.ForwardValueAsync(_ => ValueTask.FromResult(next)); - Assert.AreEqual(source, actual); + Assert.That(actual, Is.EqualTo(source)); } [Test] @@ -43,8 +43,9 @@ public async Task ForwardValueAsyncSelf_SourceIsDefaultOrFailure_ExpectSourceRes public async Task ForwardValueAsyncSelf_SourceIsSuccessAndNextIsDefault_ExpectDefault( Result source) { - var actual = await source.ForwardValueAsync(_ => default(ValueTask>)); - Assert.AreEqual(default(Result), actual); + var actual = await source.ForwardValueAsync(_ => default); + + Assert.That(actual, Is.EqualTo(default(Result))); } [Test] @@ -56,7 +57,7 @@ public async Task ForwardValueAsyncSelf_SourceIsSuccessAndNextIsSuccess_ExpectNe var next = Result.Success(PlusFifteenIdRefType).With(); var actual = await source.ForwardValueAsync(_ => ValueTask.FromResult(next)); - Assert.AreEqual(next, actual); + Assert.That(actual, Is.EqualTo(next)); } [Test] @@ -68,6 +69,6 @@ public async Task ForwardValueAsyncSelf_SourceIsSuccessAndNextIsFailure_ExpectNe var next = new Result(SomeTextStructType); var actual = await source.ForwardValueAsync(_ => ValueTask.FromResult(next)); - Assert.AreEqual(next, actual); + Assert.That(actual, Is.EqualTo(next)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardValueAsync.Success.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardValueAsync.Success.cs index 25cd2236..8140a096 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardValueAsync.Success.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardValueAsync.Success.cs @@ -19,7 +19,7 @@ public void ForwardValueAsync_NextFactoryIsNull_ExpectArgumentNullException( var actualException = Assert.ThrowsAsync( async () => _ = await source.ForwardValueAsync(null!)); - Assert.AreEqual("nextFactoryAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("nextFactoryAsync")); } [Test] @@ -31,7 +31,7 @@ public async Task ForwardValueAsync_SourceIsDefault_ExpectDefault( var actual = await source.ForwardValueAsync(_ => ValueTask.FromResult(next)); var expected = default(Result); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -43,7 +43,7 @@ public async Task ForwardValueAsync_SourceIsFailure_ExpectResultOfSourceFailure( var actual = await source.ForwardValueAsync(_ => ValueTask.FromResult(next)); var expected = Result.Failure(SomeTextStructType).With(); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -55,7 +55,7 @@ public async Task ForwardValueAsync_SourceIsSuccessAndNextIsDefault_ExpectDefaul var next = default(Result); var actual = await source.ForwardValueAsync(_ => ValueTask.FromResult(next)); - Assert.AreEqual(next, actual); + Assert.That(actual, Is.EqualTo(next)); } [Test] @@ -67,7 +67,7 @@ public async Task ForwardValueAsync_SourceIsSuccessAndNextIsSuccess_ExpectNext( var next = new Result(MinusFifteen); var actual = await source.ForwardValueAsync(_ => ValueTask.FromResult(next)); - Assert.AreEqual(next, actual); + Assert.That(actual, Is.EqualTo(next)); } [Test] @@ -79,6 +79,6 @@ public async Task ForwardValueAsync_SourceIsSuccessAndNextIsFailure_ExpectNext( var next = new Result(SomeTextStructType); var actual = await source.ForwardValueAsync(_ => ValueTask.FromResult(next)); - Assert.AreEqual(next, actual); + Assert.That(actual, Is.EqualTo(next)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/Recover.Failure.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/Recover.Failure.cs index a83e5e93..58b347fe 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/Recover.Failure.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/Recover.Failure.cs @@ -18,7 +18,7 @@ public void RecoverFailure_OtherFactoryIsNull_ExpectArgumentNullException( var actualException = Assert.Throws( () => _ = source.Recover(null!)); - Assert.AreEqual("otherFactory", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("otherFactory")); } [Test] @@ -31,7 +31,7 @@ public void RecoverFailure_SourceIsNullSuccess_ExpectSuccessResultOfSourceValue( var actual = source.Recover(_ => other); var expected = new Result(null); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -44,7 +44,7 @@ public void RecoverFailure_SourceIsNotNullSuccess_ExpectSuccessResultOfSourceVal var actual = source.Recover(_ => other); var expected = new Result(MinusFifteenIdRefType); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -56,7 +56,7 @@ public void RecoverFailure_SourceIsDefaultOrFailureAndOtherIsDefault_ExpectOther var other = new Result(); var actual = source.Recover(_ => other); - Assert.AreEqual(other, actual); + Assert.That(actual, Is.EqualTo(other)); } [Test] @@ -68,7 +68,7 @@ public void RecoverFailure_SourceIsDefaultOrFailureAndOtherIsSuccess_ExpectOther Result other = Result.Success(ZeroIdRefType); var actual = source.Recover(_ => other); - Assert.AreEqual(other, actual); + Assert.That(actual, Is.EqualTo(other)); } [Test] @@ -80,6 +80,6 @@ public void RecoverFailure_SourceIsDefaultOrFailureAndOtherIsFailure_ExpectOther var other = new Result(decimal.One); var actual = source.Recover(_ => other); - Assert.AreEqual(other, actual); + Assert.That(actual, Is.EqualTo(other)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/Recover.MapSuccess.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/Recover.MapSuccess.cs index fd2a388e..2f539f12 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/Recover.MapSuccess.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/Recover.MapSuccess.cs @@ -20,7 +20,7 @@ public void RecoverWithMapSuccess_OtherFactoryIsNull_ExpectArgumentNullException var actualException = Assert.Throws( () => _ = source.Recover(null!, _ => mappedSuccess)); - Assert.AreEqual("otherFactory", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("otherFactory")); } [Test] @@ -36,7 +36,7 @@ public void RecoverWithMapSuccess_MapSuccessIsNull_ExpectArgumentNullException( var actualException = Assert.Throws( () => _ = source.Recover(_ => other, null!)); - Assert.AreEqual("mapSuccess", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("mapSuccess")); } [Test] @@ -58,7 +58,7 @@ public void RecoverWithMapSuccess_SourceIsSuccess_ExpectSuccessResultOfMappedVal var actual = source.Recover(_ => other, _ => mappedSuccess); var expected = new Result(mappedSuccess); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -71,7 +71,7 @@ public void RecoverWithMapSuccess_SourceIsDefaultOrFailureAndOtherIsDefault_Expe var mappedSuccess = SomeString; var actual = source.Recover(_ => other, _ => mappedSuccess); - Assert.AreEqual(other, actual); + Assert.That(actual, Is.EqualTo(other)); } [Test] @@ -84,7 +84,7 @@ public void RecoverWithMapSuccess_SourceIsDefaultOrFailureAndOtherIsSuccess_Expe var mappedSuccess = decimal.One; var actual = source.Recover(_ => other, _ => mappedSuccess); - Assert.AreEqual(other, actual); + Assert.That(actual, Is.EqualTo(other)); } [Test] @@ -97,6 +97,6 @@ public void RecoverWithMapSuccess_SourceIsDefaultOrFailureAndOtherIsFailure_Expe var mappedValue = new object(); var actual = source.Recover(_ => other, _ => mappedValue); - Assert.AreEqual(other, actual); + Assert.That(actual, Is.EqualTo(other)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/Recover.Self.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/Recover.Self.cs index 02d8c5c9..2db30cd3 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/Recover.Self.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/Recover.Self.cs @@ -18,7 +18,7 @@ public void RecoverSelf_OtherFactoryIsNull_ExpectArgumentNullException( var actualException = Assert.Throws( () => _ = source.Recover(null!)); - Assert.AreEqual("otherFactory", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("otherFactory")); } [Test] @@ -30,7 +30,7 @@ public void RecoverSelf_SourceIsSuccess_ExpectSourceResult( var other = new Result(MinusFifteenIdRefType); var actual = source.Recover(_ => other); - Assert.AreEqual(source, actual); + Assert.That(actual, Is.EqualTo(source)); } [Test] @@ -42,7 +42,7 @@ public void RecoverSelf_SourceIsDefaultOrFailureAndOtherIsDefault_ExpectDefault( var other = default(Result); var actual = source.Recover(_ => other); - Assert.AreEqual(other, actual); + Assert.That(actual, Is.EqualTo(other)); } [Test] @@ -54,7 +54,7 @@ public void RecoverSelf_SourceIsDefaultOrFailureAndOtherIsSuccess_ExpectOther( var other = Result.Success(PlusFifteenIdRefType).With(); var actual = source.Recover(_ => other); - Assert.AreEqual(other, actual); + Assert.That(actual, Is.EqualTo(other)); } [Test] @@ -66,6 +66,6 @@ public void RecoverSelf_SourceIsDefaultOrFailureAndOtherIsFailure_ExpectOther( Result other = Result.Failure(SomeTextStructType); var actual = source.Recover(_ => other); - Assert.AreEqual(other, actual); + Assert.That(actual, Is.EqualTo(other)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverAsync.Failure.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverAsync.Failure.cs index c0909045..71127b25 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverAsync.Failure.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverAsync.Failure.cs @@ -19,7 +19,7 @@ public void RecoverAsyncFailure_OtherFactoryAsyncIsNull_ExpectArgumentNullExcept var actualException = Assert.ThrowsAsync( async () => _ = await source.RecoverAsync(null!)); - Assert.AreEqual("otherFactoryAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("otherFactoryAsync")); } [Test] @@ -32,7 +32,7 @@ public async Task RecoverAsyncFailure_SourceIsNullSuccess_ExpectSuccessResultOfS var actual = await source.RecoverAsync(_ => Task.FromResult(other)); Result expected = Result.Success(null); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -45,7 +45,7 @@ public async Task RecoverAsyncFailure_SourceIsNotNullSuccess_ExpectSuccessResult var actual = await source.RecoverAsync(_ => Task.FromResult(other)); var expected = new Result(MinusFifteenIdRefType); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -57,7 +57,7 @@ public async Task RecoverAsyncFailure_SourceIsDefaultOrFailureAndOtherIsDefault_ Result other = default(FailureBuilder); var actual = await source.RecoverAsync(_ => Task.FromResult(other)); - Assert.AreEqual(other, actual); + Assert.That(actual, Is.EqualTo(other)); } [Test] @@ -69,7 +69,7 @@ public async Task RecoverAsyncFailure_SourceIsDefaultOrFailureAndOtherIsSuccess_ var other = Result.Success(ZeroIdRefType).With(); var actual = await source.RecoverAsync(_ => Task.FromResult(other)); - Assert.AreEqual(other, actual); + Assert.That(actual, Is.EqualTo(other)); } [Test] @@ -81,6 +81,6 @@ public async Task RecoverAsyncFailure_SourceIsDefaultOrFailureAndOtherIsFailure_ var other = new Result(new SomeError(PlusFifteen)); var actual = await source.RecoverAsync(_ => Task.FromResult(other)); - Assert.AreEqual(other, actual); + Assert.That(actual, Is.EqualTo(other)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverAsync.MapSuccess.Sync.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverAsync.MapSuccess.Sync.cs index 235d8c7b..9312ea1c 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverAsync.MapSuccess.Sync.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverAsync.MapSuccess.Sync.cs @@ -21,7 +21,7 @@ public void RecoverAsyncWithMapSuccessSync_OtherFactoryAsyncIsNull_ExpectArgumen var actualException = Assert.ThrowsAsync( async () => _ = await source.RecoverAsync(null!, _ => mappedSuccess)); - Assert.AreEqual("otherFactoryAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("otherFactoryAsync")); } [Test] @@ -38,7 +38,7 @@ public void RecoverAsyncWithMapSuccessSync_MapSuccessIsNull_ExpectArgumentNullEx var actualException = Assert.ThrowsAsync( async () => _ = await source.RecoverAsync(_ => Task.FromResult(other), mapSuccess)); - Assert.AreEqual("mapSuccess", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("mapSuccess")); } [Test] @@ -53,7 +53,7 @@ public async Task RecoverAsyncWithMapSuccessSync_SourceIsSuccess_ExpectSuccessRe var actual = await source.RecoverAsync(_ => Task.FromResult(other), _ => mappedSuccess); Result expected = mappedSuccess; - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -66,7 +66,7 @@ public async Task RecoverAsyncWithMapSuccessSync_SourceIsDefaultOrFailureAndOthe var mappedSuccess = new object(); var actual = await source.RecoverAsync(_ => Task.FromResult(other), _ => mappedSuccess); - Assert.AreEqual(other, actual); + Assert.That(actual, Is.EqualTo(other)); } [Test] @@ -82,7 +82,7 @@ public async Task RecoverAsyncWithMapSuccessSync_SourceIsDefaultOrFailureAndOthe }; var actual = await source.RecoverAsync(_ => Task.FromResult(other), _ => mappedSuccess); - Assert.AreEqual(other, actual); + Assert.That(actual, Is.EqualTo(other)); } [Test] @@ -95,6 +95,6 @@ public async Task RecoverAsyncWithMapSuccessSync_SourceIsDefaultOrFailureAndOthe var mappedValue = "Some success text value"; var actual = await source.RecoverAsync(_ => Task.FromResult(other), _ => mappedValue); - Assert.AreEqual(other, actual); + Assert.That(actual, Is.EqualTo(other)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverAsync.MapSuccess.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverAsync.MapSuccess.cs index 114879f3..591af393 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverAsync.MapSuccess.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverAsync.MapSuccess.cs @@ -21,7 +21,7 @@ public void RecoverAsyncWithMapSuccess_OtherFactoryAsyncIsNull_ExpectArgumentNul var actualException = Assert.ThrowsAsync( async () => _ = await source.RecoverAsync(null!, _ => Task.FromResult(mappedSuccess))); - Assert.AreEqual("otherFactoryAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("otherFactoryAsync")); } [Test] @@ -38,7 +38,7 @@ public void RecoverAsyncWithMapSuccess_MapSuccessIsNull_ExpectArgumentNullExcept var actualException = Assert.ThrowsAsync( async () => _ = await source.RecoverAsync(_ => Task.FromResult(other), mapSuccessAsync)); - Assert.AreEqual("mapSuccessAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("mapSuccessAsync")); } [Test] @@ -53,7 +53,7 @@ public async Task RecoverAsyncWithMapSuccess_SourceIsSuccess_ExpectSuccessResult var actual = await source.RecoverAsync(_ => Task.FromResult(other), _ => Task.FromResult(mappedSuccess)); Result expected = mappedSuccess; - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -66,7 +66,7 @@ public async Task RecoverAsyncWithMapSuccess_SourceIsDefaultOrFailureAndOtherIsD var mappedSuccess = new object(); var actual = await source.RecoverAsync(_ => Task.FromResult(other), _ => Task.FromResult(mappedSuccess)); - Assert.AreEqual(other, actual); + Assert.That(actual, Is.EqualTo(other)); } [Test] @@ -82,7 +82,7 @@ public async Task RecoverAsyncWithMapSuccess_SourceIsDefaultOrFailureAndOtherIsS }; var actual = await source.RecoverAsync(_ => Task.FromResult(other), _ => Task.FromResult(mappedSuccess)); - Assert.AreEqual(other, actual); + Assert.That(actual, Is.EqualTo(other)); } [Test] @@ -95,6 +95,6 @@ public async Task RecoverAsyncWithMapSuccess_SourceIsDefaultOrFailureAndOtherIsF var mappedValue = "Some success text value"; var actual = await source.RecoverAsync(_ => Task.FromResult(other), _ => Task.FromResult(mappedValue)); - Assert.AreEqual(other, actual); + Assert.That(actual, Is.EqualTo(other)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverAsync.Self.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverAsync.Self.cs index e9185042..da86044c 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverAsync.Self.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverAsync.Self.cs @@ -19,7 +19,7 @@ public void RecoverAsyncSelf_OtherFactoryAsyncIsNull_ExpectArgumentNullException var actualException = Assert.ThrowsAsync( async () => _ = await source.RecoverAsync(null!)); - Assert.AreEqual("otherFactoryAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("otherFactoryAsync")); } [Test] @@ -31,7 +31,7 @@ public async Task RecoverAsyncSelf_SourceIsSuccess_ExpectSourceResult( Result other = null!; var actual = await source.RecoverAsync(_ => Task.FromResult(other)); - Assert.AreEqual(source, actual); + Assert.That(actual, Is.EqualTo(source)); } [Test] @@ -43,7 +43,7 @@ public async Task RecoverAsyncSelf_SourceIsDefaultOrFailureAndOtherIsDefault_Exp var other = new Result(); var actual = await source.RecoverAsync(_ => Task.FromResult(other)); - Assert.AreEqual(other, actual); + Assert.That(actual, Is.EqualTo(other)); } [Test] @@ -55,7 +55,7 @@ public async Task RecoverAsyncSelf_SourceIsDefaultOrFailureAndOtherIsSuccess_Exp Result other = Result.Success(PlusFifteenIdRefType); var actual = await source.RecoverAsync(_ => Task.FromResult(other)); - Assert.AreEqual(other, actual); + Assert.That(actual, Is.EqualTo(other)); } [Test] @@ -67,6 +67,6 @@ public async Task RecoverAsyncSelf_SourceIsDefaultOrFailureAndOtherIsFailure_Exp var other = new Result(SomeTextStructType); var actual = await source.RecoverAsync(_ => Task.FromResult(other)); - Assert.AreEqual(other, actual); + Assert.That(actual, Is.EqualTo(other)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverValueAsync.Failure.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverValueAsync.Failure.cs index 91bb8bee..c624e248 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverValueAsync.Failure.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverValueAsync.Failure.cs @@ -19,7 +19,7 @@ public void RecoverValueAsyncFailure_OtherFactoryAsyncIsNull_ExpectArgumentNullE var actualException = Assert.ThrowsAsync( async () => _ = await source.RecoverValueAsync(null!)); - Assert.AreEqual("otherFactoryAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("otherFactoryAsync")); } [Test] @@ -32,7 +32,7 @@ public async Task RecoverValueAsyncFailure_SourceIsNullSuccess_ExpectSuccessResu var actual = await source.RecoverValueAsync(_ => ValueTask.FromResult(other)); var expected = new Result(null); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -45,7 +45,7 @@ public async Task RecoverValueAsyncFailure_SourceIsNotNullSuccess_ExpectSuccessR var actual = await source.RecoverValueAsync(_ => ValueTask.FromResult(other)); var expected = new Result(PlusFifteenIdRefType); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -57,7 +57,7 @@ public async Task RecoverValueAsyncFailure_SourceIsDefaultOrFailureAndOtherIsDef Result other = int.MaxValue; var actual = await source.RecoverValueAsync(_ => ValueTask.FromResult(other)); - Assert.AreEqual(other, actual); + Assert.That(actual, Is.EqualTo(other)); } [Test] @@ -69,7 +69,7 @@ public async Task RecoverValueAsyncFailure_SourceIsDefaultOrFailureAndOtherIsSuc var other = Result.Success(ZeroIdRefType).With(); var actual = await source.RecoverValueAsync(_ => ValueTask.FromResult(other)); - Assert.AreEqual(other, actual); + Assert.That(actual, Is.EqualTo(other)); } [Test] @@ -81,6 +81,6 @@ public async Task RecoverValueAsyncFailure_SourceIsDefaultOrFailureAndOtherIsFai Result other = new SomeError(PlusFifteen); var actual = await source.RecoverValueAsync(_ => ValueTask.FromResult(other)); - Assert.AreEqual(other, actual); + Assert.That(actual, Is.EqualTo(other)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverValueAsync.MapSuccess.Sync.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverValueAsync.MapSuccess.Sync.cs index 696bbdee..c6d502ad 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverValueAsync.MapSuccess.Sync.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverValueAsync.MapSuccess.Sync.cs @@ -24,7 +24,7 @@ public void RecoverValueAsyncWithMapSuccessSync_OtherFactoryAsyncIsNull_ExpectAr var actualException = Assert.ThrowsAsync( async () => _ = await source.RecoverValueAsync(null!, _ => mappedSuccess)); - Assert.AreEqual("otherFactoryAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("otherFactoryAsync")); } [Test] @@ -41,7 +41,7 @@ public void RecoverValueAsyncWithMapSuccessSync_MapSuccessIsNull_ExpectArgumentN var actualException = Assert.ThrowsAsync( async () => _ = await source.RecoverValueAsync(_ => ValueTask.FromResult(other), mapSuccess)); - Assert.AreEqual("mapSuccess", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("mapSuccess")); } [Test] @@ -63,7 +63,7 @@ public async Task RecoverValueAsyncWithMapSuccessSync_SourceIsSuccess_ExpectSucc var actual = await source.RecoverValueAsync(_ => ValueTask.FromResult(other), _ => mappedSuccess); var expected = Result.Success(mappedSuccess).With(); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -76,7 +76,7 @@ public async Task RecoverValueAsyncWithMapSuccessSync_SourceIsDefaultOrFailureAn var mappedSuccess = "Some mapped value"; var actual = await source.RecoverValueAsync(_ => ValueTask.FromResult(other), _ => mappedSuccess); - Assert.AreEqual(other, actual); + Assert.That(actual, Is.EqualTo(other)); } [Test] @@ -89,7 +89,7 @@ public async Task RecoverValueAsyncWithMapSuccessSync_SourceIsDefaultOrFailureAn var mappedSuccess = MinusFifteen; var actual = await source.RecoverValueAsync(_ => ValueTask.FromResult(other), _ => mappedSuccess); - Assert.AreEqual(other, actual); + Assert.That(actual, Is.EqualTo(other)); } [Test] @@ -105,6 +105,6 @@ public async Task RecoverValueAsyncWithMapSuccessSync_SourceIsDefaultOrFailureAn }; var actual = await source.RecoverValueAsync(_ => ValueTask.FromResult(other), _ => mappedValue); - Assert.AreEqual(other, actual); + Assert.That(actual, Is.EqualTo(other)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverValueAsync.MapSuccess.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverValueAsync.MapSuccess.cs index 70714afe..459e1d57 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverValueAsync.MapSuccess.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverValueAsync.MapSuccess.cs @@ -24,7 +24,7 @@ public void RecoverValueAsyncWithMapSuccess_OtherFactoryAsyncIsNull_ExpectArgume var actualException = Assert.ThrowsAsync( async () => _ = await source.RecoverValueAsync(null!, _ => ValueTask.FromResult(mappedSuccess))); - Assert.AreEqual("otherFactoryAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("otherFactoryAsync")); } [Test] @@ -41,7 +41,7 @@ public void RecoverValueAsyncWithMapSuccess_MapSuccessIsNull_ExpectArgumentNullE var actualException = Assert.ThrowsAsync( async () => _ = await source.RecoverValueAsync(_ => ValueTask.FromResult(other), mapSuccessAsync)); - Assert.AreEqual("mapSuccessAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("mapSuccessAsync")); } [Test] @@ -63,7 +63,7 @@ public async Task RecoverValueAsyncWithMapSuccess_SourceIsSuccess_ExpectSuccessR var actual = await source.RecoverValueAsync(_ => ValueTask.FromResult(other), _ => ValueTask.FromResult(mappedSuccess)); var expected = Result.Success(mappedSuccess).With(); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -76,7 +76,7 @@ public async Task RecoverValueAsyncWithMapSuccess_SourceIsDefaultOrFailureAndOth var mappedSuccess = "Some mapped value"; var actual = await source.RecoverValueAsync(_ => ValueTask.FromResult(other), _ => ValueTask.FromResult(mappedSuccess)); - Assert.AreEqual(other, actual); + Assert.That(actual, Is.EqualTo(other)); } [Test] @@ -89,7 +89,7 @@ public async Task RecoverValueAsyncWithMapSuccess_SourceIsDefaultOrFailureAndOth var mappedSuccess = MinusFifteen; var actual = await source.RecoverValueAsync(_ => ValueTask.FromResult(other), _ => ValueTask.FromResult(mappedSuccess)); - Assert.AreEqual(other, actual); + Assert.That(actual, Is.EqualTo(other)); } [Test] @@ -105,6 +105,6 @@ public async Task RecoverValueAsyncWithMapSuccess_SourceIsDefaultOrFailureAndOth }; var actual = await source.RecoverValueAsync(_ => ValueTask.FromResult(other), _ => ValueTask.FromResult(mappedValue)); - Assert.AreEqual(other, actual); + Assert.That(actual, Is.EqualTo(other)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverValueAsync.Self.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverValueAsync.Self.cs index 2869ba90..8be707a6 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverValueAsync.Self.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverValueAsync.Self.cs @@ -19,7 +19,7 @@ public void RecoverValueAsyncSelf_OtherFactoryAsyncIsNull_ExpectArgumentNullExce var actualException = Assert.ThrowsAsync( async () => _ = await source.RecoverValueAsync(null!)); - Assert.AreEqual("otherFactoryAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("otherFactoryAsync")); } [Test] @@ -31,7 +31,7 @@ public async Task RecoverValueAsyncSelf_SourceIsSuccess_ExpectSourceResult( var other = new Result(SomeTextStructType); var actual = await source.RecoverValueAsync(_ => ValueTask.FromResult(other)); - Assert.AreEqual(source, actual); + Assert.That(actual, Is.EqualTo(source)); } [Test] @@ -43,7 +43,7 @@ public async Task RecoverValueAsyncSelf_SourceIsDefaultOrFailureAndOtherIsDefaul var other = new Result(); var actual = await source.RecoverValueAsync(_ => ValueTask.FromResult(other)); - Assert.AreEqual(other, actual); + Assert.That(actual, Is.EqualTo(other)); } [Test] @@ -55,7 +55,7 @@ public async Task RecoverValueAsyncSelf_SourceIsDefaultOrFailureAndOtherIsSucces Result other = ZeroIdRefType; var actual = await source.RecoverValueAsync(_ => ValueTask.FromResult(other)); - Assert.AreEqual(other, actual); + Assert.That(actual, Is.EqualTo(other)); } [Test] @@ -67,6 +67,6 @@ public async Task RecoverValueAsyncSelf_SourceIsDefaultOrFailureAndOtherIsFailur var other = Result.Failure(SomeTextStructType).With(); var actual = await source.RecoverValueAsync(_ => ValueTask.FromResult(other)); - Assert.AreEqual(other, actual); + Assert.That(actual, Is.EqualTo(other)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Fold/Fold.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Fold/Fold.cs index a6ffab9e..27b53c86 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Fold/Fold.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Fold/Fold.cs @@ -18,7 +18,7 @@ public void Fold_MapSuccessIsNull_ExpectArgumentNullException( var actualException = Assert.Throws( () => _ = source.Fold(null!, _ => new object())); - Assert.AreEqual("mapSuccess", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("mapSuccess")); } [Test] @@ -32,7 +32,7 @@ public void Fold_MapFailureIsNull_ExpectArgumentNullException( var actualException = Assert.Throws( () => _ = source.Fold(_ => MinusFifteen, null!)); - Assert.AreEqual("mapFailure", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("mapFailure")); } [Test] @@ -48,7 +48,7 @@ public void Fold_SourceIsSuccess_ExpectResultOfMapSuccess( _ => successResult, _ => failureResult); - Assert.AreEqual(successResult, actual); + Assert.That(actual, Is.EqualTo(successResult)); } [Test] @@ -71,6 +71,6 @@ public void Fold_SourceIsDefaultOrFailure_ExpectResultOfMapFailure( _ => successResult, _ => failureResult); - Assert.AreEqual(failureResult, actual); + Assert.That(actual, Is.EqualTo(failureResult)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Fold/FoldAsync.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Fold/FoldAsync.cs index a35dc32a..b73b67e6 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Fold/FoldAsync.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Fold/FoldAsync.cs @@ -24,7 +24,7 @@ public void FoldAsync_MapSuccessAsyncIsNull_ExpectArgumentNullException( var actualException = Assert.ThrowsAsync( async () => _ = await source.FoldAsync(null!, _ => Task.FromResult(failureResult))); - Assert.AreEqual("mapSuccessAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("mapSuccessAsync")); } [Test] @@ -40,7 +40,7 @@ public void FoldAsync_MapFailureAsyncIsNull_ExpectArgumentNullException( var actualException = Assert.Throws( () => _ = source.FoldAsync(_ => Task.FromResult(successResult), null!)); - Assert.AreEqual("mapFailureAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("mapFailureAsync")); } [Test] @@ -56,7 +56,7 @@ public async Task FoldAsync_SourceIsSuccess_ExpectResultOfMapSuccess( _ => Task.FromResult(successResult), _ => Task.FromResult(failureResult)); - Assert.AreEqual(successResult, actual); + Assert.That(actual, Is.EqualTo(successResult)); } [Test] @@ -79,6 +79,6 @@ public async Task FoldAsync_SourceIsDefaultOrFailure_ExpectResultOfMapFailure( _ => Task.FromResult(successResult), _ => Task.FromResult(failureResult)); - Assert.AreEqual(failureResult, actual); + Assert.That(actual, Is.EqualTo(failureResult)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Fold/FoldValueAsync.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Fold/FoldValueAsync.cs index b475cc7c..143dfff1 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Fold/FoldValueAsync.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Fold/FoldValueAsync.cs @@ -21,7 +21,7 @@ public void FoldValueAsync_MapSuccessAsyncIsNull_ExpectArgumentNullException( var actualException = Assert.ThrowsAsync( async () => _ = await source.FoldValueAsync(null!, _ => ValueTask.FromResult(failureResult))); - Assert.AreEqual("mapSuccessAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("mapSuccessAsync")); } [Test] @@ -37,7 +37,7 @@ public void FoldValueAsync_MapFailureAsyncIsNull_ExpectArgumentNullException( var actualException = Assert.Throws( () => _ = source.FoldValueAsync(_ => ValueTask.FromResult(successResult), null!)); - Assert.AreEqual("mapFailureAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("mapFailureAsync")); } [Test] @@ -53,7 +53,7 @@ public async Task FoldValueAsync_SourceIsSuccess_ExpectResultOfMapSuccess( _ => ValueTask.FromResult(successResult), _ => ValueTask.FromResult(failureResult)); - Assert.AreEqual(successResult, actual); + Assert.That(actual, Is.EqualTo(successResult)); } [Test] @@ -69,6 +69,6 @@ public async Task FoldValueAsync_SourceIsDefaultOrFailure_ExpectResultOfMapFailu _ => ValueTask.FromResult(successResult), _ => ValueTask.FromResult(failureResult)); - Assert.AreEqual(failureResult, actual); + Assert.That(actual, Is.EqualTo(failureResult)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Map/Map.Failure.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Map/Map.Failure.cs index d9a34763..4e085754 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Map/Map.Failure.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Map/Map.Failure.cs @@ -18,7 +18,7 @@ public void MapFailure_MapFailureIsNull_ExpectArgumentNullException( var actualException = Assert.Throws( () => _ = source.MapFailure(null!)); - Assert.AreEqual("mapFailure", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("mapFailure")); } [Test] @@ -30,8 +30,8 @@ public void MapFailure_SourceIsDefaultOrFailure_FailureExpectResultOfMapFailure( var failureResult = new SomeError(MinusFifteen); var actual = source.MapFailure(_ => failureResult); - var exected = new Result(failureResult); - Assert.AreEqual(exected, actual); + var expected = new Result(failureResult); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -42,8 +42,8 @@ public void MapFailure_SourceIsSuccessAndValueIsNull_ExpectResultOfNullSuccess( var failureResult = MinusFifteen; var actual = source.MapFailure(_ => failureResult); - var exected = new Result(null!); - Assert.AreEqual(exected, actual); + var expected = new Result(null!); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -54,7 +54,7 @@ public void MapFailure_SourceIsSuccess_ExpectResultOfSourceSuccess( var failureResult = new SomeError(int.MaxValue); var actual = source.MapFailure(_ => failureResult); - var exected = new Result(MinusFifteenIdRefType); - Assert.AreEqual(exected, actual); + var expected = new Result(MinusFifteenIdRefType); + Assert.That(actual, Is.EqualTo(expected)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Map/Map.Success.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Map/Map.Success.cs index fbe3a308..90ced41b 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Map/Map.Success.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Map/Map.Success.cs @@ -18,7 +18,7 @@ public void MapSuccess_MapSuccessFuncIsNull_ExpectArgumentNullException( var actualException = Assert.Throws( () => _ = source.MapSuccess(null!)); - Assert.AreEqual("mapSuccess", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("mapSuccess")); } [Test] @@ -35,8 +35,8 @@ public void MapSuccess_SourceIsSuccess_ExpectSuccessResultOfMapSuccess( var actual = source.MapSuccess( _ => successResult); - var exected = new Result(successResult); - Assert.AreEqual(exected, actual); + var expected = new Result(successResult); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -47,8 +47,8 @@ public void MapSuccess_SourceIsDefault_ExpectResultOfDefaultFailure( var successResult = TabString; var actual = source.MapSuccess(_ => successResult); - var exected = default(Result); - Assert.AreEqual(exected, actual); + var expected = default(Result); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -59,7 +59,7 @@ public void MapSuccess_SourceIsFailure_FailureResultOfSourceFailure( var successResult = PlusFifteen; var actual = source.MapSuccess(_ => successResult); - var exected = new Result(SomeTextStructType); - Assert.AreEqual(exected, actual); + var expected = new Result(SomeTextStructType); + Assert.That(actual, Is.EqualTo(expected)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Map/Map.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Map/Map.cs index 608d1342..1adb7b65 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Map/Map.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Map/Map.cs @@ -18,7 +18,7 @@ public void Map_MapSuccessIsNull_ExpectArgumentNullException( var actualException = Assert.Throws( () => _ = source.Map(null!, _ => decimal.MaxValue)); - Assert.AreEqual("mapSuccess", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("mapSuccess")); } [Test] @@ -32,7 +32,7 @@ public void Map_MapFailureIsNull_ExpectArgumentNullException( var actualException = Assert.Throws( () => _ = source.Map(_ => new object(), null!)); - Assert.AreEqual("mapFailure", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("mapFailure")); } [Test] @@ -48,8 +48,8 @@ public void Map_SourceIsSuccess_ExpectSuccessResultOfMapSuccess( _ => successResult, _ => failureResult); - var exected = new Result(successResult); - Assert.AreEqual(exected, actual); + var expected = new Result(successResult); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -69,7 +69,7 @@ public void Map_SourceIsDefaultOrFailure_FailureExpectResultOfMapFailure( _ => successResult, _ => failureResult); - var exected = new Result(failureResult); - Assert.AreEqual(exected, actual); + var expected = new Result(failureResult); + Assert.That(actual, Is.EqualTo(expected)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Map/MapAsync.Failure.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Map/MapAsync.Failure.cs index c5a9fcad..1e1b0473 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Map/MapAsync.Failure.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Map/MapAsync.Failure.cs @@ -19,7 +19,7 @@ public void MapFailureAsync_MapFailureAsyncIsNull_ExpectArgumentNullException( var actualException = Assert.ThrowsAsync( async () => _ = await source.MapFailureAsync(null!)); - Assert.AreEqual("mapFailureAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("mapFailureAsync")); } [Test] @@ -31,8 +31,8 @@ public async Task MapFailureAsync_SourceIsDefaultOrFailure_FailureExpectResultOf var failureResult = new SomeError(PlusFifteen); var actual = await source.MapFailureAsync(_ => Task.FromResult(failureResult)); - var exected = new Result(failureResult); - Assert.AreEqual(exected, actual); + var expected = new Result(failureResult); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -43,8 +43,8 @@ public async Task MapFailureAsync_SourceIsSuccessAndValueIsNull_ExpectResultOfNu var failureResult = decimal.MinusOne; var actual = await source.MapFailureAsync(_ => Task.FromResult(failureResult)); - var exected = new Result(null); - Assert.AreEqual(exected, actual); + var expected = new Result(null); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -55,7 +55,7 @@ public async Task MapFailureAsync_SourceIsSuccess_ExpectResultOfSourceSuccess( var failureResult = new SomeError(int.MaxValue); var actual = await source.MapFailureAsync(_ => Task.FromResult(failureResult)); - var exected = new Result(PlusFifteenIdRefType); - Assert.AreEqual(exected, actual); + var expected = new Result(PlusFifteenIdRefType); + Assert.That(actual, Is.EqualTo(expected)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Map/MapAsync.Success.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Map/MapAsync.Success.cs index a378ff9c..614e82c8 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Map/MapAsync.Success.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Map/MapAsync.Success.cs @@ -19,7 +19,7 @@ public void MapSuccessAsync_MapSuccessAsyncFuncIsNull_ExpectArgumentNullExceptio var actualException = Assert.ThrowsAsync( async () => _ = await source.MapSuccessAsync(null!)); - Assert.AreEqual("mapSuccessAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("mapSuccessAsync")); } [Test] @@ -36,8 +36,8 @@ public async Task MapSuccessAsync_SourceIsSuccess_ExpectSuccessResultOfMapSucces var actual = await source.MapSuccessAsync( _ => Task.FromResult(successResult)); - var exected = new Result(successResult); - Assert.AreEqual(exected, actual); + var expected = new Result(successResult); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -48,8 +48,8 @@ public async Task MapSuccessAsync_SourceIsDefault_ExpectResultOfDefaultFailure( var successResult = decimal.MaxValue; var actual = await source.MapSuccessAsync(_ => Task.FromResult(successResult)); - var exected = default(Result); - Assert.AreEqual(exected, actual); + var expected = default(Result); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -60,7 +60,7 @@ public async Task MapSuccessAsync_SourceIsFailure_FailureResultOfSourceFailure( var successResult = (string?)null; var actual = await source.MapSuccessAsync(_ => Task.FromResult(successResult)); - var exected = new Result(SomeTextStructType); - Assert.AreEqual(exected, actual); + var expected = new Result(SomeTextStructType); + Assert.That(actual, Is.EqualTo(expected)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Map/MapAsync.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Map/MapAsync.cs index 6bac490d..dea37f42 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Map/MapAsync.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Map/MapAsync.cs @@ -21,7 +21,7 @@ public void MapAsync_MapSuccessAsyncIsNull_ExpectArgumentNullException( var actualException = Assert.ThrowsAsync( async () => _ = await source.MapAsync(null!, _ => Task.FromResult(failureResult))); - Assert.AreEqual("mapSuccessAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("mapSuccessAsync")); } [Test] @@ -37,7 +37,7 @@ public void MapAsync_MapFailureAsyncIsNull_ExpectArgumentNullException( var actualException = Assert.ThrowsAsync( async () => _ = await source.MapAsync(_ => Task.FromResult(successResult), null!)); - Assert.AreEqual("mapFailureAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("mapFailureAsync")); } [Test] @@ -56,8 +56,8 @@ public async Task MapAsync_SourceIsSuccess_ExpectSuccessResultOfMapSuccess( _ => Task.FromResult(successResult), _ => Task.FromResult(failureResult)); - var exected = new Result(successResult); - Assert.AreEqual(exected, actual); + var expected = new Result(successResult); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -77,7 +77,7 @@ public async Task MapAsync_SourceIsDefaultOrFailure_ExpectFailureResultOfMapFail _ => Task.FromResult(successResult), _ => Task.FromResult(failureResult)); - var exected = new Result(failureResult); - Assert.AreEqual(exected, actual); + var expected = new Result(failureResult); + Assert.That(actual, Is.EqualTo(expected)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Map/MapValueAsync.Failure.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Map/MapValueAsync.Failure.cs index 8ca9a85b..a74e491a 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Map/MapValueAsync.Failure.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Map/MapValueAsync.Failure.cs @@ -19,7 +19,7 @@ public void MapFailureValueAsync_MapFailureValueAsyncIsNull_ExpectArgumentNullEx var actualException = Assert.ThrowsAsync( async () => _ = await source.MapFailureValueAsync(null!)); - Assert.AreEqual("mapFailureAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("mapFailureAsync")); } [Test] @@ -31,8 +31,8 @@ public async Task MapFailureValueAsync_SourceIsDefaultOrFailure_FailureExpectRes var failureResult = PlusFifteen; var actual = await source.MapFailureValueAsync(_ => ValueTask.FromResult(failureResult)); - var exected = new Result(failureResult); - Assert.AreEqual(exected, actual); + var expected = new Result(failureResult); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -43,8 +43,8 @@ public async Task MapFailureValueAsync_SourceIsSuccessAndValueIsNull_ExpectResul var failureResult = decimal.MinusOne; var actual = await source.MapFailureValueAsync(_ => ValueTask.FromResult(failureResult)); - var exected = new Result(null); - Assert.AreEqual(exected, actual); + var expected = new Result(null); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -55,7 +55,7 @@ public async Task MapFailureValueAsync_SourceIsSuccess_ExpectResultOfSourceSucce var failureResult = default(SomeError); var actual = await source.MapFailureValueAsync(_ => ValueTask.FromResult(failureResult)); - var exected = new Result(PlusFifteenIdRefType); - Assert.AreEqual(exected, actual); + var expected = new Result(PlusFifteenIdRefType); + Assert.That(actual, Is.EqualTo(expected)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Map/MapValueAsync.Success.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Map/MapValueAsync.Success.cs index fa727dd0..d2cdf544 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Map/MapValueAsync.Success.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Map/MapValueAsync.Success.cs @@ -19,7 +19,7 @@ public void MapSuccessValueAsync_MapSuccessValueAsyncFuncIsNull_ExpectArgumentNu var actualException = Assert.ThrowsAsync( async () => _ = await source.MapSuccessValueAsync(null!)); - Assert.AreEqual("mapSuccessAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("mapSuccessAsync")); } [Test] @@ -33,8 +33,8 @@ public async Task MapSuccessValueAsync_SourceIsSuccess_ExpectSuccessResultOfMapS var actual = await source.MapSuccessValueAsync( _ => ValueTask.FromResult(successResult)); - var exected = new Result(successResult); - Assert.AreEqual(exected, actual); + var expected = new Result(successResult); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -45,8 +45,8 @@ public async Task MapSuccessValueAsync_SourceIsDefault_ExpectResultOfDefaultFail var successResult = SomeString; var actual = await source.MapSuccessValueAsync(_ => ValueTask.FromResult(successResult)); - var exected = default(Result); - Assert.AreEqual(exected, actual); + var expected = default(Result); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -57,7 +57,7 @@ public async Task MapSuccessValueAsync_SourceIsFailure_FailureResultOfSourceFail var successResult = new object(); var actual = await source.MapSuccessValueAsync(_ => ValueTask.FromResult(successResult)); - var exected = new Result(SomeTextStructType); - Assert.AreEqual(exected, actual); + var expected = new Result(SomeTextStructType); + Assert.That(actual, Is.EqualTo(expected)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Map/MapValueAsync.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Map/MapValueAsync.cs index bf24c091..84a0d69f 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Map/MapValueAsync.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Map/MapValueAsync.cs @@ -21,7 +21,7 @@ public void MapValueAsync_MapSuccessAsyncIsNull_ExpectArgumentNullException( var actualException = Assert.ThrowsAsync( async () => _ = await source.MapValueAsync(null!, _ => ValueTask.FromResult(failureResult))); - Assert.AreEqual("mapSuccessAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("mapSuccessAsync")); } [Test] @@ -40,7 +40,7 @@ public void MapValueAsync_MapFailureAsyncIsNull_ExpectArgumentNullException( var actualException = Assert.ThrowsAsync( async () => _ = await source.MapValueAsync(_ => ValueTask.FromResult(successResult), null!)); - Assert.AreEqual("mapFailureAsync", actualException!.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("mapFailureAsync")); } [Test] @@ -56,8 +56,8 @@ public async Task MapValueAsync_SourceIsSuccess_ExpectSuccessResultOfMapSuccess( _ => ValueTask.FromResult(successResult), _ => ValueTask.FromResult(failureResult)); - var exected = new Result(successResult); - Assert.AreEqual(exected, actual); + var expected = new Result(successResult); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -76,7 +76,7 @@ public async Task MapValueAsync_SourceIsDefaultOrFailure_ExpectFailureResultOfMa _ => ValueTask.FromResult(successResult), _ => ValueTask.FromResult(failureResult)); - var exected = new Result(failureResult); - Assert.AreEqual(exected, actual); + var expected = new Result(failureResult); + Assert.That(actual, Is.EqualTo(expected)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/OrDefault.Success/OrDefault.Success.cs b/src/core-taggeds-result/Result.Tests/Test.Result/OrDefault.Success/OrDefault.Success.cs index 2292ee58..f3fa324b 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/OrDefault.Success/OrDefault.Success.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/OrDefault.Success/OrDefault.Success.cs @@ -17,7 +17,7 @@ public void SuccessOrDefault_IsSuccess_ExpectSource_Struct(int success) var result = new Result(success); var actual = result.SuccessOrDefault(); - Assert.AreEqual(actual, success); + Assert.That(actual, Is.EqualTo(success)); } [Test] @@ -26,7 +26,7 @@ public void SuccessOrDefault_Default_ExpectDefault_Struct() var result = new Result(); var actual = result.SuccessOrDefault(); - Assert.Zero(actual); + Assert.That(actual, Is.Zero); } [Test] @@ -35,7 +35,7 @@ public void SuccessOrDefault_IsFailure_ExpectDefault_Struct() var result = new Result(new SomeError(1)); var actual = result.SuccessOrDefault(); - Assert.Zero(actual); + Assert.That(actual, Is.Zero); } [Test] @@ -45,7 +45,7 @@ public void SuccessOrDefault_IsSuccess_ExpectSource_Ref() var result = new Result(refObj); var actual = result.SuccessOrDefault(); - Assert.AreSame(actual, refObj); + Assert.That(actual, Is.SameAs(refObj)); } [Test] @@ -54,7 +54,7 @@ public void SuccessOrDefault_Default_ExpectNull_Ref() var result = new Result(); var actual = result.SuccessOrDefault(); - Assert.IsNull(actual); + Assert.That(actual, Is.Null); } [Test] @@ -63,6 +63,6 @@ public void SuccessOrDefault_IsFailure_ExpectNull_Ref() var result = new Result(new SomeError(1)); var actual = result.SuccessOrDefault(); - Assert.IsNull(actual); + Assert.That(actual, Is.Null); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Failure/OrThrow.Failure.Factory.cs b/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Failure/OrThrow.Failure.Factory.cs index a544d517..8cf61388 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Failure/OrThrow.Failure.Factory.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Failure/OrThrow.Failure.Factory.cs @@ -15,7 +15,7 @@ public void FailureOrThrowWithExceptionFactory_ExceptionFactoryIsNull_ExpectArgu var exceptionFactory = (Func)null!; var actualException = Assert.Throws(Test); - Assert.AreEqual("exceptionFactory", actualException?.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("exceptionFactory")); void Test() => @@ -30,7 +30,7 @@ public void FailureOrThrowWithExceptionFactory_SourceIsDefault_ExpectDefaultFail var actual = source.FailureOrThrow(CreateException); var expected = default(StructType); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); static Exception CreateException() => @@ -45,7 +45,7 @@ public void FailureOrThrowWithExceptionFactory_SourceIsFailure_ExpectFailureValu var actual = source.FailureOrThrow(CreateException); var expected = SomeTextStructType; - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); static Exception CreateException() => @@ -61,7 +61,7 @@ public void FailureOrThrowWithExceptionFactory_SourceIsSuccess_ExpectExceptionFr var exceptionFromFactory = new SomeException(); var actualException = Assert.Throws(Test); - Assert.AreEqual(exceptionFromFactory, actualException); + Assert.That(actualException, Is.EqualTo(exceptionFromFactory)); void Test() => diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Failure/OrThrow.Failure.FactoryFrom.cs b/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Failure/OrThrow.Failure.FactoryFrom.cs index 0c4f6ca7..53a4eca4 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Failure/OrThrow.Failure.FactoryFrom.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Failure/OrThrow.Failure.FactoryFrom.cs @@ -15,7 +15,7 @@ public void FailureOrThrowWithExceptionFactoryFromSuccess_ExceptionFactoryIsNull var exceptionFactory = (Func)null!; var actualException = Assert.Throws(Test); - Assert.AreEqual("exceptionFactory", actualException?.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("exceptionFactory")); void Test() => @@ -30,7 +30,7 @@ public void FailureOrThrowWithExceptionFactoryFromSuccess_SourceIsDefault_Expect var actual = source.FailureOrThrow(CreateException); var expected = default(StructType); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); static Exception CreateException(RefType success) => @@ -45,7 +45,7 @@ public void FailureOrThrowWithExceptionFactoryFromSuccess_SourceIsFailure_Expect var actual = source.FailureOrThrow(CreateException); var expected = SomeTextStructType; - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); static Exception CreateException(RefType success) => @@ -59,7 +59,7 @@ public void FailureOrThrowWithExceptionFactoryFromSuccess_SourceIsSuccess_Expect { var actualException = Assert.Throws>(Test); - Assert.AreEqual(PlusFifteenIdRefType, actualException?.Value); + Assert.That(actualException!.Value, Is.EqualTo(PlusFifteenIdRefType)); void Test() => diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Failure/OrThrow.Failure.cs b/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Failure/OrThrow.Failure.cs index 8e85fa3c..a7c6999f 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Failure/OrThrow.Failure.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Failure/OrThrow.Failure.cs @@ -15,7 +15,7 @@ public void FailureOrThrow_SourceIsDefault_ExpectDefaultFailureValue( var actual = source.FailureOrThrow(); var expected = default(StructType); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -26,7 +26,7 @@ public void FailureOrThrow_SourceIsFailure_ExpectFailureValue( var actual = source.FailureOrThrow(); var expected = SomeTextStructType; - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -37,7 +37,7 @@ public void FailureOrThrow_SourceIsSuccess_ExpectInvalidOperationException( { var actualEx = Assert.Throws(Test); - Assert.True(actualEx!.Message.Contains("Failure", StringComparison.InvariantCultureIgnoreCase)); + Assert.That(actualEx!.Message.Contains("Failure", StringComparison.Ordinal)); void Test() => diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Success/OrThrow.Success.Factory.cs b/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Success/OrThrow.Success.Factory.cs index 4c3576ec..957f0fe4 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Success/OrThrow.Success.Factory.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Success/OrThrow.Success.Factory.cs @@ -15,7 +15,7 @@ public void SuccessOrThrowWithExceptionFactory_ExceptionFactoryIsNull_ExpectArgu var exceptionFactory = (Func)null!; var actualException = Assert.Throws(Test); - Assert.AreEqual("exceptionFactory", actualException?.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("exceptionFactory")); void Test() => @@ -28,7 +28,7 @@ public void SuccessOrThrowWithExceptionFactory_SourceIsSuccessAndValueIsNull_Exp Result source) { var actual = source.SuccessOrThrow(CreateException); - Assert.IsNull(actual); + Assert.That(actual, Is.Null); static Exception CreateException() => @@ -43,7 +43,7 @@ public void SuccessOrThrowWithExceptionFactory_SourceIsSuccessAndValueIsNotNull_ var actual = source.SuccessOrThrow(CreateException); var expected = MinusFifteenIdRefType; - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); static Exception CreateException() => @@ -59,7 +59,7 @@ public void SuccessOrThrowWithExceptionFactory_SourceIsDefaultOrFailure_ExpectEx var exceptionFromFactory = new SomeException(); var actualException = Assert.Throws(Test); - Assert.AreEqual(exceptionFromFactory, actualException); + Assert.That(actualException, Is.EqualTo(exceptionFromFactory)); void Test() => diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Success/OrThrow.Success.FactoryFrom.cs b/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Success/OrThrow.Success.FactoryFrom.cs index 8caaf2fc..3af145dc 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Success/OrThrow.Success.FactoryFrom.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Success/OrThrow.Success.FactoryFrom.cs @@ -15,7 +15,7 @@ public void SuccessOrThrowWithExceptionFactoryFromFailure_ExceptionFactoryIsNull var exceptionFactory = (Func)null!; var actualException = Assert.Throws(Test); - Assert.AreEqual("exceptionFactory", actualException?.ParamName); + Assert.That(actualException!.ParamName, Is.EqualTo("exceptionFactory")); void Test() => @@ -28,7 +28,7 @@ public void SuccessOrThrowWithExceptionFactoryFromFailure_SourceIsSuccessAndValu Result source) { var actual = source.SuccessOrThrow(CreateException); - Assert.IsNull(actual); + Assert.That(actual, Is.Null); static Exception CreateException(StructType failure) => @@ -43,7 +43,7 @@ public void SuccessOrThrowWithExceptionFactoryFromFailure_SourceIsSuccessAndValu var actual = source.SuccessOrThrow(CreateException); var expected = PlusFifteenIdRefType; - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); static Exception CreateException(StructType failure) => @@ -55,9 +55,9 @@ static Exception CreateException(StructType failure) public void SuccessOrThrowWithExceptionFactoryFromFailure_SourceIsDefaultOrFailure_ExpectExceptionFromFactory( Result source) { - var actualException = Assert.Throws< SomeException>(Test); + var actualException = Assert.Throws>(Test); - Assert.AreEqual(SomeTextStructType, actualException?.Value); + Assert.That(actualException!.Value, Is.EqualTo(SomeTextStructType)); void Test() => diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Success/OrThrow.Success.cs b/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Success/OrThrow.Success.cs index 4df59b9d..5a0c55a4 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Success/OrThrow.Success.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Success/OrThrow.Success.cs @@ -13,7 +13,7 @@ public void SuccessOrThrow_SourceIsSuccessAndValueIsNull_ExpectNull( Result source) { var actual = source.SuccessOrThrow(); - Assert.IsNull(actual); + Assert.That(actual, Is.Null); } [Test] @@ -24,7 +24,7 @@ public void SuccessOrThrow_SourceIsSuccessAndValueIsNotNull_ExpectSuccessValue( var actual = source.SuccessOrThrow(); var expected = PlusFifteenIdRefType; - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -35,7 +35,7 @@ public void SuccessOrThrow_SourceIsDefaultOrFailure_ExpectInvalidOperationExcept { var actualEx = Assert.Throws(Test); - Assert.True(actualEx!.Message.Contains("Success", StringComparison.InvariantCultureIgnoreCase)); + Assert.That(actualEx!.Message.Contains("Success", StringComparison.Ordinal)); void Test() => diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/ToString/ToString.Failure.cs b/src/core-taggeds-result/Result.Tests/Test.Result/ToString/ToString.Failure.cs index 5ba8b575..50f16675 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/ToString/ToString.Failure.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/ToString/ToString.Failure.cs @@ -23,7 +23,7 @@ public void ToString_SourceIsFailureAndValueToStringReturnsNull() typeof(StubToStringStructType).Name, string.Empty); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -50,7 +50,7 @@ public void ToString_SourceIsFailure_ValueToString_Common( typeof(StubToStringStructType).Name, resultOfValueToString); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -70,7 +70,7 @@ public void ToString_SourceIsFailure_Common( typeof(int).Name, sourceFailure); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -88,7 +88,7 @@ public void ToString_SourceIsFailure_DecimalPoint( typeof(decimal).Name, expectedDecimalSubstr); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } private static IEnumerable ToString_SourceIsFailure_DecimalPoint_TestCaseSource() diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/ToString/ToString.FailureDefault.cs b/src/core-taggeds-result/Result.Tests/Test.Result/ToString/ToString.FailureDefault.cs index af67836d..c41b5e22 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/ToString/ToString.FailureDefault.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/ToString/ToString.FailureDefault.cs @@ -21,6 +21,6 @@ public void ToString_SourceIsFailureDefault( typeof(StructType).Name, default(StructType)); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/ToString/ToString.Success.cs b/src/core-taggeds-result/Result.Tests/Test.Result/ToString/ToString.Success.cs index 3a0554ff..640a5794 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/ToString/ToString.Success.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/ToString/ToString.Success.cs @@ -23,7 +23,7 @@ public void ToString_SourceIsSuccessAndValueIsNull( typeof(StructType).Name, string.Empty); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -40,7 +40,7 @@ public void ToString_SourceIsSuccessAndValueToStringReturnsNull() typeof(StructType).Name, string.Empty); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -67,7 +67,7 @@ public void ToString_SourceIsSuccess_ValueToString_Common( typeof(SomeError).Name, resultOfValueToString); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -96,7 +96,7 @@ public void ToString_SourceIsSuccess_Common( typeof(StructType).Name, sourceSuccess); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -114,7 +114,7 @@ public void ToString_SourceIsSuccess_DecimalPoint( typeof(StructType).Name, expectedDecimalSubstr); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } private static IEnumerable ToString_SourceIsSuccess_DecimalPoint_TestCaseSource() diff --git a/src/core-taggeds-result/Result.Tests/Test.ResultStatic/Equality/Equality.Equals.cs b/src/core-taggeds-result/Result.Tests/Test.ResultStatic/Equality/Equality.Equals.cs index 62aeaf98..f0cd7df6 100644 --- a/src/core-taggeds-result/Result.Tests/Test.ResultStatic/Equality/Equality.Equals.cs +++ b/src/core-taggeds-result/Result.Tests/Test.ResultStatic/Equality/Equality.Equals.cs @@ -14,7 +14,7 @@ public void Equals_ResultAIsDefaultAndResultBIsDefault_ExpectTrue() var resultB = default(Result); var actual = Result.Equals(resultA, resultB); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -24,7 +24,7 @@ public void Equals_ResultAIsSuccessAndResultBIsSuccessAndValuesAreNull_ExpectTru Result resultB = null; var actual = Result.Equals(resultA, resultB); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -44,7 +44,7 @@ public void Equals_ResultAIsSuccessAndResultBIsSuccessAndValuesAreEqual_ExpectTr Result resultB = bValue; var actual = Result.Equals(resultA, resultB); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -58,7 +58,7 @@ public void Equals_ResultAIsFailureAndResultBIsFailureAndValuesAreEqual_ExpectTr var resultB = Result.Failure(bValue).With(); var actual = Result.Equals(resultA, resultB); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -68,7 +68,7 @@ public void Equals_ResultAIsFailureWithDefaultValueAndResultBIsDefault_ExpectTru Result resultB = default(FailureBuilder); var actual = Result.Equals(resultA, resultB); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -78,7 +78,7 @@ public void Equals_ResultAIsDefaultAndResultBIsFailureWithDefaultValue_ExpectTru var resultB = default(Result); var actual = Result.Equals(resultA, resultB); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -91,7 +91,7 @@ public void Equals_ResultAIsSuccessAndResultBIsSuccessAndValuesAreNotEqual_Expec var resultB = Result.Success(bValue); var actual = Result.Equals(resultA, resultB); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -111,7 +111,7 @@ public void Equals_ResultAIsFailureAndResultBIsFailureAndValuesAreNotEqual_Expec var resultB = Result.Failure(bValue); var actual = Result.Equals(resultA, resultB); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -123,7 +123,7 @@ public void Equals_ResultAIsSuccessAndResultBIsFailure_ExpectFalse() var resultB = Result.Failure(someValue).With(); var actual = Result.Equals(resultA, resultB); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -133,7 +133,7 @@ public void Equals_ResultAIsSuccessAndResultBIsDefault_ExpectFalse() var resultB = default(Result); var actual = Result.Equals(resultA, resultB); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -145,7 +145,7 @@ public void Equals_ResultAIsFailureAndResultBIsSuccess_ExpectFalse() Result resultB = Result.Success(someValue); var actual = Result.Equals(resultA, resultB); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -155,7 +155,7 @@ public void Equals_ResultAIsFailureWithNotDefaultValueAndResultBIsDefault_Expect var resultB = default(Result); var actual = Result.Equals(resultA, resultB); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -165,7 +165,7 @@ public void Equals_ResultAIsDefaultAndResultBIsSuccess_ExpectFalse() Result resultB = Result.Success(default); var actual = Result.Equals(resultA, resultB); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -175,6 +175,6 @@ public void Equals_ResultAIsDefaultAndResultBIsFailureWithNotDefaultValue_Expect Result resultB = new SomeError(MinusFifteen); var actual = Result.Equals(resultA, resultB); - Assert.False(actual); + Assert.That(actual, Is.False); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.ResultStatic/Factory/Factory.Bool.False.cs b/src/core-taggeds-result/Result.Tests/Test.ResultStatic/Factory/Factory.Bool.False.cs index 8844f951..82b451da 100644 --- a/src/core-taggeds-result/Result.Tests/Test.ResultStatic/Factory/Factory.Bool.False.cs +++ b/src/core-taggeds-result/Result.Tests/Test.ResultStatic/Factory/Factory.Bool.False.cs @@ -9,13 +9,13 @@ partial class ResultStaticTest public void False_ExpectIsSuccessReturnsFalse() { var actual = Result.False(); - Assert.False(actual.IsSuccess); + Assert.That(actual.IsSuccess, Is.False); } [Test] public void False_ExpectIsFailureReturnsTrue() { var actual = Result.False(); - Assert.True(actual.IsFailure); + Assert.That(actual.IsFailure, Is.True); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.ResultStatic/Factory/Factory.Bool.True.cs b/src/core-taggeds-result/Result.Tests/Test.ResultStatic/Factory/Factory.Bool.True.cs index f8c305ed..76b1ec9b 100644 --- a/src/core-taggeds-result/Result.Tests/Test.ResultStatic/Factory/Factory.Bool.True.cs +++ b/src/core-taggeds-result/Result.Tests/Test.ResultStatic/Factory/Factory.Bool.True.cs @@ -9,13 +9,14 @@ partial class ResultStaticTest public void True_ExpectIsSuccessReturnsTrue() { var actual = Result.True(); - Assert.True(actual.IsSuccess); + Assert.That(actual.IsSuccess, Is.True); + Assert.That(actual.IsSuccess, Is.True); } [Test] public void True_ExpectIsFailureReturnsFalse() { var actual = Result.True(); - Assert.False(actual.IsFailure); + Assert.That(actual.IsFailure, Is.False); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.ResultStatic/Factory/Factory.Failure.cs b/src/core-taggeds-result/Result.Tests/Test.ResultStatic/Factory/Factory.Failure.cs index f303f858..1e40baa2 100644 --- a/src/core-taggeds-result/Result.Tests/Test.ResultStatic/Factory/Factory.Failure.cs +++ b/src/core-taggeds-result/Result.Tests/Test.ResultStatic/Factory/Factory.Failure.cs @@ -11,13 +11,13 @@ partial class ResultStaticTest public void FailureThenWith_ExpectIsSuccessReturnsFalse() { var actual = Result.Failure(SomeTextStructType).With(); - Assert.False(actual.IsSuccess); + Assert.That(actual.IsSuccess, Is.False); } [Test] public void FailureThenWith_ExpectIsFailureReturnsTrue() { var actual = Result.Failure(default).With(); - Assert.True(actual.IsFailure); + Assert.That(actual.IsFailure, Is.True); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.ResultStatic/Factory/Factory.Optional.Absent.cs b/src/core-taggeds-result/Result.Tests/Test.ResultStatic/Factory/Factory.Optional.Absent.cs index 9f5a4215..513c0a0f 100644 --- a/src/core-taggeds-result/Result.Tests/Test.ResultStatic/Factory/Factory.Optional.Absent.cs +++ b/src/core-taggeds-result/Result.Tests/Test.ResultStatic/Factory/Factory.Optional.Absent.cs @@ -10,13 +10,13 @@ partial class ResultStaticTest public void Absent_ExpectIsSuccessReturnsFalse() { var actual = Result.Absent(); - Assert.False(actual.IsSuccess); + Assert.That(actual.IsSuccess, Is.False); } [Test] public void Absent_ExpectIsFailureReturnsTrue() { var actual = Result.Absent(); - Assert.True(actual.IsFailure); + Assert.That(actual.IsFailure, Is.True); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.ResultStatic/Factory/Factory.Optional.Present.cs b/src/core-taggeds-result/Result.Tests/Test.ResultStatic/Factory/Factory.Optional.Present.cs index c7de13cf..391f898f 100644 --- a/src/core-taggeds-result/Result.Tests/Test.ResultStatic/Factory/Factory.Optional.Present.cs +++ b/src/core-taggeds-result/Result.Tests/Test.ResultStatic/Factory/Factory.Optional.Present.cs @@ -11,55 +11,55 @@ partial class ResultStaticTest public void Present_SourceValueIsNullForgivenRef_ExpectIsSuccessReturnsTrue() { var actual = Result.Present(null!); - Assert.True(actual.IsSuccess); + Assert.That(actual.IsSuccess, Is.True); } [Test] public void Present_SourceValueIsNullForgivenRef_ExpectIsFailureReturnsFalse() { var actual = Result.Present(null!); - Assert.False(actual.IsFailure); + Assert.That(actual.IsFailure, Is.False); } [Test] public void Present_SourceValueIsNullableRef_ExpectIsSuccessReturnsTrue() { var actual = Result.Present(null); - Assert.True(actual.IsSuccess); + Assert.That(actual.IsSuccess, Is.True); } [Test] public void Present_SourceValueIsNullableRef_ExpectIsFailureReturnsFalse() { var actual = Result.Present(null); - Assert.False(actual.IsFailure); + Assert.That(actual.IsFailure, Is.False); } [Test] public void Present_SourceValueIsNullableStruct_ExpectIsSuccessReturnsTrue() { var actual = Result.Present(null); - Assert.True(actual.IsSuccess); + Assert.That(actual.IsSuccess, Is.True); } [Test] public void Present_SourceValueIsNullableStruct_ExpectIsFailureReturnsFalse() { var actual = Result.Present(null); - Assert.False(actual.IsFailure); + Assert.That(actual.IsFailure, Is.False); } [Test] public void Present_SourceValueIsNotNull_ExpectIsSuccessReturnsTrue() { var actual = Result.Present(default); - Assert.True(actual.IsSuccess); + Assert.That(actual.IsSuccess, Is.True); } [Test] public void Present_SourceValueIsNotNull_ExpectIsFailureReturnsFalse() { var actual = Result.Present(ZeroIdRefType); - Assert.False(actual.IsFailure); + Assert.That(actual.IsFailure, Is.False); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.ResultStatic/Factory/Factory.Success.cs b/src/core-taggeds-result/Result.Tests/Test.ResultStatic/Factory/Factory.Success.cs index 2c5e8764..95b36328 100644 --- a/src/core-taggeds-result/Result.Tests/Test.ResultStatic/Factory/Factory.Success.cs +++ b/src/core-taggeds-result/Result.Tests/Test.ResultStatic/Factory/Factory.Success.cs @@ -11,55 +11,55 @@ partial class ResultStaticTest public void SuccessThenWith_SourceValueIsNullForgivenRef_ExpectIsSuccessReturnsTrue() { var actual = Result.Success(null!).With(); - Assert.True(actual.IsSuccess); + Assert.That(actual.IsSuccess, Is.True); } [Test] public void SuccessThenWith_SourceValueIsNullForgivenRef_ExpectIsFailureReturnsFalse() { var actual = Result.Success(null!).With(); - Assert.False(actual.IsFailure); + Assert.That(actual.IsFailure, Is.False); } [Test] public void SuccessThenWith_SourceValueIsNullableRef_ExpectIsSuccessReturnsTrue() { var actual = Result.Success(null).With(); - Assert.True(actual.IsSuccess); + Assert.That(actual.IsSuccess, Is.True); } [Test] public void SuccessThenWith_SourceValueIsNullableRef_ExpectIsFailureReturnsFalse() { var actual = Result.Success(null).With(); - Assert.False(actual.IsFailure); + Assert.That(actual.IsFailure, Is.False); } [Test] public void SuccessThenWith_SourceValueIsNullableStruct_ExpectIsSuccessReturnsTrue() { var actual = Result.Success(null).With(); - Assert.True(actual.IsSuccess); + Assert.That(actual.IsSuccess, Is.True); } [Test] public void SuccessThenWith_SourceValueIsNullableStruct_ExpectIsFailureReturnsFalse() { var actual = Result.Success(null).With(); - Assert.False(actual.IsFailure); + Assert.That(actual.IsFailure, Is.False); } [Test] public void SuccessThenWith_SourceValueIsNotNull_ExpectIsSuccessReturnsTrue() { var actual = Result.Success(default).With(); - Assert.True(actual.IsSuccess); + Assert.That(actual.IsSuccess, Is.True); } [Test] public void SuccessThenWith_SourceValueIsNotNull_ExpectIsFailureReturnsFalse() { var actual = Result.Success(PlusFifteenIdRefType).With(); - Assert.False(actual.IsFailure); + Assert.That(actual.IsFailure, Is.False); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/Equality/Equality.Equals.Object.cs b/src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/Equality/Equality.Equals.Object.cs index a9bee1d2..77a204fb 100644 --- a/src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/Equality/Equality.Equals.Object.cs +++ b/src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/Equality/Equality.Equals.Object.cs @@ -14,7 +14,7 @@ public void EqualsObject_SourceIsDefaultAndOtherIsDefaultAndTypesAreSame_ExpectT object? other = new SuccessBuilder(); var actual = source.Equals(other); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -24,7 +24,7 @@ public void EqualsObject_SourceIsDefaultAndOtherSuccessIsNullAndTypesAreSame_Exp object? other = Result.Success(null!); var actual = source.Equals(other); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -34,7 +34,7 @@ public void EqualsObject_SourceSuccessIsDefaultAndOtherIsDefaultAndTypesAreSame_ object? other = new SuccessBuilder(); var actual = source.Equals(other); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -44,7 +44,7 @@ public void EqualsObject_SourceSuccessIsDefaultAndOtherSuccessIsDefaultAndTypesA object? other = Result.Success(null); var actual = source.Equals(other); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -59,7 +59,7 @@ public void EqualsObject_SourceSuccessIsEqualToOtherSuccessAndTypesAreSame_Expec object? other = Result.Success(otherSuccess); var actual = source.Equals(other); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -69,7 +69,7 @@ public void EqualsObject_SourceIsDefaultAndOtherIsDefaultAndTypesAreNotSame_Expe object? other = default(SuccessBuilder); var actual = source.Equals(other); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -79,7 +79,7 @@ public void EqualsObject_SourceIsDefaultAndOtherSuccessIsNullAndTypesAreNotSame_ object? other = Result.Success(null); var actual = source.Equals(other); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -89,7 +89,7 @@ public void EqualsObject_SourceSuccessIsDefaultAndOtherIsDefaultAndTypesAreNotSa object? other = new SuccessBuilder(); var actual = source.Equals(other); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -99,7 +99,7 @@ public void EqualsObject_SourceSuccessIsNullAndOtherSuccessIsNullAndTypesAreNotS object? other = Result.Success(null!); var actual = source.Equals(other); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -110,7 +110,7 @@ public void EqualsObject_SourceSuccessIsEqualToOtherSuccessAndTypesAreNotSame_Ex object? other = Result.Success(someValue); var actual = source.Equals(other); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -119,7 +119,7 @@ public void EqualsObject_SourceIsDefaultAndOtherIsNull_ExpectFalse() var source = new SuccessBuilder(); var actual = source.Equals(null); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -128,7 +128,7 @@ public void EqualsObject_SourceIsNotDefaultAndOtherIsNull_ExpectFalse() var source = Result.Success(PlusFifteenIdRefType); var actual = source.Equals(null); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -138,7 +138,7 @@ public void EqualsObject_SourceIsDefaultAndOtherIsNotDefaultAndTypesAreSame_Expe object? other = Result.Success(new()); var actual = source.Equals(other); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -151,7 +151,7 @@ public void EqualsObject_SourceSuccessIsNotEqualToOtherSuccessAndTypesAreSame_Ex object? other = Result.Success(otherSuccess); var actual = source.Equals(other); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -161,7 +161,7 @@ public void EqualsObject_SourceSuccessIsNullAndOtherSuccessIsNotNull_ExpectFalse object? other = Result.Success(new()); var actual = source.Equals(other); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -171,6 +171,6 @@ public void EqualsObject_SourceSuccessIsNotNullAndOtherSuccessIsNull_ExpectFalse object? other = Result.Success(null!); var actual = source.Equals(other); - Assert.False(actual); + Assert.That(actual, Is.False); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/Equality/Equality.Equals.Other.cs b/src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/Equality/Equality.Equals.Other.cs index 52c54828..581adc69 100644 --- a/src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/Equality/Equality.Equals.Other.cs +++ b/src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/Equality/Equality.Equals.Other.cs @@ -13,7 +13,7 @@ public void EqualsOther_SourceIsDefaultAndOtherIsDefault_ExpectTrue() var other = default(SuccessBuilder); var actual = source.Equals(other); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -23,7 +23,7 @@ public void EqualsOther_SourceIsDefaultAndOtherSuccessIsNull_ExpectTrue() var other = Result.Success(null); var actual = source.Equals(other); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -33,7 +33,7 @@ public void EqualsOther_SourceSuccessIsDefaultAndOtherIsDefault_ExpectTrue() var other = default(SuccessBuilder); var actual = source.Equals(other); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -43,7 +43,7 @@ public void EqualsOther_SourceSuccessIsDefaultAndOtherSuccessIsDefault_ExpectTru var other = Result.Success(null!); var actual = source.Equals(other); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -64,7 +64,7 @@ public void EqualsOther_SourceSuccessIsEqualOtherSuccess_ExpectTrue() var other = Result.Success(otherSuccess); var actual = source.Equals(other); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -74,7 +74,7 @@ public void EqualsOther_SourceIsDefaultAndOtherIsNotDefault_ExpectFalse() var other = Result.Success(new()); var actual = source.Equals(other); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -87,6 +87,6 @@ public void EqualsOther_SourceSuccessIsNotEqualToOtherSuccess_ExpectFalse() var other = Result.Success(otherSuccess); var actual = source.Equals(other); - Assert.False(actual); + Assert.That(actual, Is.False); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/Equality/Equality.Equals.Static.cs b/src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/Equality/Equality.Equals.Static.cs index 9b1c8482..4bf585b7 100644 --- a/src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/Equality/Equality.Equals.Static.cs +++ b/src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/Equality/Equality.Equals.Static.cs @@ -13,7 +13,7 @@ public void EqualsStatic_LeftIsDefaultAndRightIsDefault_ExpectTrue() var right = new SuccessBuilder(); var actual = SuccessBuilder.Equals(left, right); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -23,7 +23,7 @@ public void EqualsStatic_LeftIsDefaultAndRightSuccessIsNull_ExpectTrue() var right = Result.Success(null); var actual = SuccessBuilder.Equals(left, right); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -33,7 +33,7 @@ public void EqualsStatic_LeftSuccessIsDefaultAndRightIsDefault_ExpectTrue() var right = new SuccessBuilder(); var actual = SuccessBuilder.Equals(left, right); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -43,7 +43,7 @@ public void EqualsStatic_LeftSuccessIsDefaultAndRightSuccessIsDefault_ExpectTrue var right = Result.Success(null); var actual = SuccessBuilder.Equals(left, right); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -64,7 +64,7 @@ public void EqualsStatic_LeftSuccessIsEqualRightSuccess_ExpectTrue() var right = Result.Success(rightSuccess); var actual = SuccessBuilder.Equals(left, right); - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -74,7 +74,7 @@ public void EqualsStatic_LeftIsDefaultAndRightIsNotDefault_ExpectFalse() var right = Result.Success(new()); var actual = SuccessBuilder.Equals(left, right); - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -87,6 +87,6 @@ public void EqualsStatic_LeftSuccessIsNotEqualToRightSuccess_ExpectFalse() var right = Result.Success(rightSuccess); var actual = SuccessBuilder.Equals(left, right); - Assert.False(actual); + Assert.That(actual, Is.False); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/Equality/Equality.GetHashCode.cs b/src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/Equality/Equality.GetHashCode.cs index 9f1ca754..e02608e7 100644 --- a/src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/Equality/Equality.GetHashCode.cs +++ b/src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/Equality/Equality.GetHashCode.cs @@ -16,7 +16,7 @@ public void GetHashCode_SourceIsDefaultAndOtherIsDefaultAndTypesAreSame_ExpectHa var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.EqualTo(sourceHashCode)); } [Test] @@ -28,7 +28,7 @@ public void GetHashCode_SourceIsDefaultAndOtherSuccessIsNullAndTypesAreSame_Expe var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.EqualTo(sourceHashCode)); } [Test] @@ -40,7 +40,7 @@ public void GetHashCode_SourceSuccessIsDefaultAndOtherIsDefaultAndTypesAreSame_E var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.EqualTo(sourceHashCode)); } [Test] @@ -52,7 +52,7 @@ public void GetHashCode_SourceSuccessIsNullAndOtherSuccessIsNullAndTypesAreSame_ var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.EqualTo(sourceHashCode)); } [Test] @@ -69,7 +69,7 @@ public void GetHashCode_SourceSuccessIsEqualToOtherSuccessAndTypesAreSame_Expect var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.EqualTo(sourceHashCode)); } [Test] @@ -81,7 +81,7 @@ public void GetHashCode_SourceIsDefaultAndOtherIsDefaultAndTypesAreNotSame_Expec var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreNotEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.Not.EqualTo(sourceHashCode)); } [Test] @@ -93,7 +93,7 @@ public void GetHashCode_SourceIsDefaultAndOtherSuccessIsNullAndTypesAreNotSame_E var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreNotEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.Not.EqualTo(sourceHashCode)); } [Test] @@ -105,7 +105,7 @@ public void GetHashCode_SourceSuccessIsDefaultAndOtherIsDefaultAndTypesAreNotSam var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreNotEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.Not.EqualTo(sourceHashCode)); } [Test] @@ -117,7 +117,7 @@ public void GetHashCode_SourceSuccessIsNullAndOtherSuccessIsNullAndTypesAreNotSa var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreNotEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.Not.EqualTo(sourceHashCode)); } [Test] @@ -130,7 +130,7 @@ public void GetHashCode_SourceSuccessIsEqualToOtherSuccessAndTypesAreNotSame_Exp var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreNotEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.Not.EqualTo(sourceHashCode)); } [Test] @@ -142,7 +142,7 @@ public void GetHashCode_SourceIsDefaultAndOtherIsNotDefaultAndTypesAreSame_Expec var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreNotEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.Not.EqualTo(sourceHashCode)); } [Test] @@ -157,7 +157,7 @@ public void GetHashCode_SourceSuccessIsNotEqualToOtherSuccessAndTypesAreSame_Exp var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreNotEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.Not.EqualTo(sourceHashCode)); } [Test] @@ -169,7 +169,7 @@ public void GetHashCode_SourceSuccessIsNullAndOtherSuccessIsNotNull_ExpectHashCo var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreNotEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.Not.EqualTo(sourceHashCode)); } [Test] @@ -181,6 +181,6 @@ public void GetHashCode_SourceSuccessIsNotNullAndOtherSuccessIsNull_ExpectHashCo var sourceHashCode = source.GetHashCode(); var otherHashCode = other.GetHashCode(); - Assert.AreNotEqual(sourceHashCode, otherHashCode); + Assert.That(otherHashCode, Is.Not.EqualTo(sourceHashCode)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/Equality/Equality.Operator.Equality.cs b/src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/Equality/Equality.Operator.Equality.cs index 8efe7c18..28ed897a 100644 --- a/src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/Equality/Equality.Operator.Equality.cs +++ b/src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/Equality/Equality.Operator.Equality.cs @@ -13,7 +13,7 @@ public void Equality_LeftIsDefaultAndRightIsDefault_ExpectTrue() var right = new SuccessBuilder(); var actual = left == right; - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -23,7 +23,7 @@ public void Equality_LeftIsDefaultAndRightSuccessIsNull_ExpectTrue() var right = Result.Success(null); var actual = left == right; - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -33,7 +33,7 @@ public void Equality_LeftSuccessIsDefaultAndRightIsDefault_ExpectTrue() var right = new SuccessBuilder(); var actual = left == right; - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -43,7 +43,7 @@ public void Equality_LeftSuccessIsDefaultAndRightSuccessIsDefault_ExpectTrue() var right = Result.Success(null); var actual = left == right; - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -64,7 +64,7 @@ public void Equality_LeftSuccessIsEqualRightSuccess_ExpectTrue() var right = Result.Success(rightSuccess); var actual = left == right; - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -74,7 +74,7 @@ public void Equality_LeftIsDefaultAndRightIsNotDefault_ExpectFalse() var right = Result.Success(new()); var actual = left == right; - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -87,6 +87,6 @@ public void Equality_LeftSuccessIsNotEqualToRightSuccess_ExpectFalse() var right = Result.Success(rightSuccess); var actual = left == right; - Assert.False(actual); + Assert.That(actual, Is.False); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/Equality/Equality.Operator.Inequality.cs b/src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/Equality/Equality.Operator.Inequality.cs index 343426c4..cea7aca2 100644 --- a/src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/Equality/Equality.Operator.Inequality.cs +++ b/src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/Equality/Equality.Operator.Inequality.cs @@ -13,7 +13,7 @@ public void Inequality_LeftIsDefaultAndRightIsDefault_ExpectFalse() var right = new SuccessBuilder(); var actual = left != right; - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -23,7 +23,7 @@ public void Inequality_LeftIsDefaultAndRightSuccessIsNull_ExpectFalse() var right = Result.Success(null!); var actual = left != right; - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -33,7 +33,7 @@ public void Inequality_LeftSuccessIsDefaultAndRightIsDefault_ExpectFalse() var right = new SuccessBuilder(); var actual = left != right; - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -43,7 +43,7 @@ public void Inequality_LeftSuccessIsDefaultAndRightSuccessIsDefault_ExpectFalse( var right = Result.Success(null); var actual = left != right; - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -64,7 +64,7 @@ public void Inequality_LeftSuccessIsEqualRightSuccess_ExpectFalse() var right = Result.Success(rightSuccess); var actual = left != right; - Assert.False(actual); + Assert.That(actual, Is.False); } [Test] @@ -74,7 +74,7 @@ public void Inequality_LeftIsDefaultAndRightIsNotDefault_ExpectTrue() var right = Result.Success(new()); var actual = left != right; - Assert.True(actual); + Assert.That(actual, Is.True); } [Test] @@ -84,6 +84,6 @@ public void Inequality_LeftSuccessIsNotEqualToRightSuccess_ExpectTrue() var right = Result.Success(new()); var actual = left != right; - Assert.True(actual); + Assert.That(actual, Is.True); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/ToString/ToString.cs b/src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/ToString/ToString.cs index 5b720d97..d27fffe6 100644 --- a/src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/ToString/ToString.cs +++ b/src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/ToString/ToString.cs @@ -21,7 +21,7 @@ public void ToString_SourceSuccessIsNull() typeof(RefType).Name, string.Empty); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -37,7 +37,7 @@ public void ToString_SourceSuccessToStringReturnsNull() typeof(StubToStringRefType).Name, string.Empty); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -63,7 +63,7 @@ public void ToString_SourceSuccess_ValueToString_Common( typeof(StubToStringRefType).Name, resultOfSuccessToString); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -91,7 +91,7 @@ public void ToString_Common( typeof(object).Name, sourceSuccess); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } [Test] @@ -108,7 +108,7 @@ public void ToString_DecimalPoint( typeof(decimal).Name, expectedDecimalSubstr); - Assert.AreEqual(expected, actual); + Assert.That(actual, Is.EqualTo(expected)); } private static IEnumerable ToString_DecimalPoint_TestCaseSource() From 33462652d7eef18ad87628d0d379ac9f5ae96673 Mon Sep 17 00:00:00 2001 From: Andrei Sergeev Date: Tue, 6 Feb 2024 22:33:54 +0400 Subject: [PATCH 3/7] Fix Result tests: Assert with SameAs instead of EqualTo when the same instances are expected --- src/core-taggeds-result/Result.Tests/Test.Result/Fold/Fold.cs | 4 ++-- .../Result.Tests/Test.Result/Fold/FoldAsync.cs | 4 ++-- .../Test.Result/OrThrow.Failure/OrThrow.Failure.Factory.cs | 2 +- .../OrThrow.Failure/OrThrow.Failure.FactoryFrom.cs | 2 +- .../Test.Result/OrThrow.Success/OrThrow.Success.Factory.cs | 4 ++-- .../OrThrow.Success/OrThrow.Success.FactoryFrom.cs | 2 +- .../Test.Result/OrThrow.Success/OrThrow.Success.cs | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Fold/Fold.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Fold/Fold.cs index 27b53c86..5bcb24ae 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Fold/Fold.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Fold/Fold.cs @@ -48,7 +48,7 @@ public void Fold_SourceIsSuccess_ExpectResultOfMapSuccess( _ => successResult, _ => failureResult); - Assert.That(actual, Is.EqualTo(successResult)); + Assert.That(actual, Is.SameAs(successResult)); } [Test] @@ -71,6 +71,6 @@ public void Fold_SourceIsDefaultOrFailure_ExpectResultOfMapFailure( _ => successResult, _ => failureResult); - Assert.That(actual, Is.EqualTo(failureResult)); + Assert.That(actual, Is.SameAs(failureResult)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Fold/FoldAsync.cs b/src/core-taggeds-result/Result.Tests/Test.Result/Fold/FoldAsync.cs index b73b67e6..0e5f5f20 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/Fold/FoldAsync.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/Fold/FoldAsync.cs @@ -56,7 +56,7 @@ public async Task FoldAsync_SourceIsSuccess_ExpectResultOfMapSuccess( _ => Task.FromResult(successResult), _ => Task.FromResult(failureResult)); - Assert.That(actual, Is.EqualTo(successResult)); + Assert.That(actual, Is.SameAs(successResult)); } [Test] @@ -79,6 +79,6 @@ public async Task FoldAsync_SourceIsDefaultOrFailure_ExpectResultOfMapFailure( _ => Task.FromResult(successResult), _ => Task.FromResult(failureResult)); - Assert.That(actual, Is.EqualTo(failureResult)); + Assert.That(actual, Is.SameAs(failureResult)); } } diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Failure/OrThrow.Failure.Factory.cs b/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Failure/OrThrow.Failure.Factory.cs index 8cf61388..6492878b 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Failure/OrThrow.Failure.Factory.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Failure/OrThrow.Failure.Factory.cs @@ -61,7 +61,7 @@ public void FailureOrThrowWithExceptionFactory_SourceIsSuccess_ExpectExceptionFr var exceptionFromFactory = new SomeException(); var actualException = Assert.Throws(Test); - Assert.That(actualException, Is.EqualTo(exceptionFromFactory)); + Assert.That(actualException, Is.SameAs(exceptionFromFactory)); void Test() => diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Failure/OrThrow.Failure.FactoryFrom.cs b/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Failure/OrThrow.Failure.FactoryFrom.cs index 53a4eca4..529ccd15 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Failure/OrThrow.Failure.FactoryFrom.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Failure/OrThrow.Failure.FactoryFrom.cs @@ -59,7 +59,7 @@ public void FailureOrThrowWithExceptionFactoryFromSuccess_SourceIsSuccess_Expect { var actualException = Assert.Throws>(Test); - Assert.That(actualException!.Value, Is.EqualTo(PlusFifteenIdRefType)); + Assert.That(actualException!.Value, Is.SameAs(PlusFifteenIdRefType)); void Test() => diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Success/OrThrow.Success.Factory.cs b/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Success/OrThrow.Success.Factory.cs index 957f0fe4..23265138 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Success/OrThrow.Success.Factory.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Success/OrThrow.Success.Factory.cs @@ -43,7 +43,7 @@ public void SuccessOrThrowWithExceptionFactory_SourceIsSuccessAndValueIsNotNull_ var actual = source.SuccessOrThrow(CreateException); var expected = MinusFifteenIdRefType; - Assert.That(actual, Is.EqualTo(expected)); + Assert.That(actual, Is.SameAs(expected)); static Exception CreateException() => @@ -59,7 +59,7 @@ public void SuccessOrThrowWithExceptionFactory_SourceIsDefaultOrFailure_ExpectEx var exceptionFromFactory = new SomeException(); var actualException = Assert.Throws(Test); - Assert.That(actualException, Is.EqualTo(exceptionFromFactory)); + Assert.That(actualException, Is.SameAs(exceptionFromFactory)); void Test() => diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Success/OrThrow.Success.FactoryFrom.cs b/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Success/OrThrow.Success.FactoryFrom.cs index 3af145dc..e95ea771 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Success/OrThrow.Success.FactoryFrom.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Success/OrThrow.Success.FactoryFrom.cs @@ -43,7 +43,7 @@ public void SuccessOrThrowWithExceptionFactoryFromFailure_SourceIsSuccessAndValu var actual = source.SuccessOrThrow(CreateException); var expected = PlusFifteenIdRefType; - Assert.That(actual, Is.EqualTo(expected)); + Assert.That(actual, Is.SameAs(expected)); static Exception CreateException(StructType failure) => diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Success/OrThrow.Success.cs b/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Success/OrThrow.Success.cs index 5a0c55a4..c77a0a4b 100644 --- a/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Success/OrThrow.Success.cs +++ b/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Success/OrThrow.Success.cs @@ -24,7 +24,7 @@ public void SuccessOrThrow_SourceIsSuccessAndValueIsNotNull_ExpectSuccessValue( var actual = source.SuccessOrThrow(); var expected = PlusFifteenIdRefType; - Assert.That(actual, Is.EqualTo(expected)); + Assert.That(actual, Is.SameAs(expected)); } [Test] From a74b719b03c6b1fdfb1fcd3b9b6bd098f7ac511a Mon Sep 17 00:00:00 2001 From: Andrei Sergeev Date: Tue, 6 Feb 2024 23:03:47 +0400 Subject: [PATCH 4/7] Result: Add the new tests stub --- .github/workflows/dotnet.yml | 6 ++++ .../Result.Tests.Old/Result.Tests.Old.csproj | 33 +++++++++++++++++++ .../Equality/Equality.Equals.Object.cs | 0 .../Equality/Equality.Equals.Other.cs | 0 .../Equality/Equality.Equals.Static.cs | 0 .../Equality/Equality.GetHashCode.cs | 0 .../Equality/Equality.Operator.Equality.cs | 0 .../Equality/Equality.Operator.Inequality.cs | 0 .../Test.FailureBuilder/FailureBuilderTest.cs | 0 .../Test.FailureBuilder/ToString/ToString.cs | 0 .../Equality/Equality.Equals.Object.cs | 0 .../Equality/Equality.Equals.Other.cs | 0 .../Equality/Equality.Equals.Static.cs | 0 .../Equality/Equality.GetHashCode.cs | 0 .../Equality/Equality.Operator.Equality.cs | 0 .../Equality/Equality.Operator.Inequality.cs | 0 .../Factory/Factory.Constructor.Failure.cs | 0 .../Factory/Factory.Constructor.Success.cs | 0 .../Test.Result/Factory/Factory.Default.cs | 0 .../Factory/Factory.Explicit.Failure.cs | 0 .../Factory/Factory.Explicit.Success.cs | 0 .../Factory/Factory.Implicit.Failure.cs | 0 .../Factory.Implicit.FailureBuilder.cs | 0 .../Factory/Factory.Implicit.Success.cs | 0 .../Factory.Implicit.SuccessBuilder.cs | 0 .../Flow.Filter/Filter.MapFailure.cs | 0 .../Test.Result/Flow.Filter/Filter.cs | 0 .../FilterAsync.MapFailure.Sync.cs | 0 .../Flow.Filter/FilterAsync.MapFailure.cs | 0 .../Test.Result/Flow.Filter/FilterAsync.cs | 0 .../FilterValueAsync.MapFailure.Sync.cs | 0 .../FilterValueAsync.MapFailure.cs | 0 .../Flow.Filter/FilterValueAsync.cs | 0 .../Flow.Forward/Forward.MapFailure.cs | 0 .../Test.Result/Flow.Forward/Forward.Self.cs | 0 .../Flow.Forward/Forward.Success.cs | 0 .../ForwardAsync.MapFailure.Sync.cs | 0 .../Flow.Forward/ForwardAsync.MapFailure.cs | 0 .../Flow.Forward/ForwardAsync.Self.cs | 0 .../Flow.Forward/ForwardAsync.Success.cs | 0 .../ForwardValueAsync.MapFailure.Sync.cs | 0 .../ForwardValueAsync.MapFailure.cs | 0 .../Flow.Forward/ForwardValueAsync.Self.cs | 0 .../Flow.Forward/ForwardValueAsync.Success.cs | 0 .../Flow.Recover/Recover.Failure.cs | 0 .../Flow.Recover/Recover.MapSuccess.cs | 0 .../Test.Result/Flow.Recover/Recover.Self.cs | 0 .../Flow.Recover/RecoverAsync.Failure.cs | 0 .../RecoverAsync.MapSuccess.Sync.cs | 0 .../Flow.Recover/RecoverAsync.MapSuccess.cs | 0 .../Flow.Recover/RecoverAsync.Self.cs | 0 .../Flow.Recover/RecoverValueAsync.Failure.cs | 0 .../RecoverValueAsync.MapSuccess.Sync.cs | 0 .../RecoverValueAsync.MapSuccess.cs | 0 .../Flow.Recover/RecoverValueAsync.Self.cs | 0 .../Test.Result/Fold/Fold.cs | 0 .../Test.Result/Fold/FoldAsync.cs | 0 .../Test.Result/Fold/FoldValueAsync.cs | 0 .../Test.Result/Map/Map.Failure.cs | 0 .../Test.Result/Map/Map.Success.cs | 0 .../Test.Result/Map/Map.cs | 0 .../Test.Result/Map/MapAsync.Failure.cs | 0 .../Test.Result/Map/MapAsync.Success.cs | 0 .../Test.Result/Map/MapAsync.cs | 0 .../Test.Result/Map/MapValueAsync.Failure.cs | 0 .../Test.Result/Map/MapValueAsync.Success.cs | 0 .../Test.Result/Map/MapValueAsync.cs | 0 .../OrDefault.Success/OrDefault.Success.cs | 0 .../OrThrow.Failure.Factory.cs | 0 .../OrThrow.Failure.FactoryFrom.cs | 0 .../OrThrow.Failure/OrThrow.Failure.cs | 0 .../OrThrow.Success.Factory.cs | 0 .../OrThrow.Success.FactoryFrom.cs | 0 .../OrThrow.Success/OrThrow.Success.cs | 0 .../Test.Result/ResultTest.cs | 0 .../Test.Result/ToString/ToString.Failure.cs | 0 .../ToString/ToString.FailureDefault.cs | 0 .../Test.Result/ToString/ToString.Success.cs | 0 .../Equality/Equality.Equals.cs | 0 .../Factory/Factory.Bool.False.cs | 0 .../Factory/Factory.Bool.True.cs | 0 .../Factory/Factory.Failure.cs | 0 .../Factory/Factory.Optional.Absent.cs | 0 .../Factory/Factory.Optional.Present.cs | 0 .../Factory/Factory.Success.cs | 0 .../Test.ResultStatic/ResultStaticTest.cs | 0 .../Equality/Equality.Equals.Object.cs | 0 .../Equality/Equality.Equals.Other.cs | 0 .../Equality/Equality.Equals.Static.cs | 0 .../Equality/Equality.GetHashCode.cs | 0 .../Equality/Equality.Operator.Equality.cs | 0 .../Equality/Equality.Operator.Inequality.cs | 0 .../Test.SuccessBuilder/SuccessBuilderTest.cs | 0 .../Test.SuccessBuilder/ToString/ToString.cs | 0 .../TestData/SomeError.cs | 0 .../TestData/SomeException.T.cs | 0 .../TestData/SomeException.cs | 0 .../TestData/SomeRecord.cs | 0 .../TestData/StubToStringRefType.cs | 0 .../TestData/StubToStringStructType.cs | 0 .../TestData/TestDataSource.cs | 0 .../Result.Tests/GlobalUsings.cs | 1 + .../Result.Tests/Result.Tests.csproj | 15 ++++----- .../Result.Tests/TestStub.cs | 10 ++++++ 104 files changed, 57 insertions(+), 8 deletions(-) create mode 100644 src/core-taggeds-result/Result.Tests.Old/Result.Tests.Old.csproj rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.FailureBuilder/Equality/Equality.Equals.Object.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.FailureBuilder/Equality/Equality.Equals.Other.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.FailureBuilder/Equality/Equality.Equals.Static.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.FailureBuilder/Equality/Equality.GetHashCode.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.FailureBuilder/Equality/Equality.Operator.Equality.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.FailureBuilder/Equality/Equality.Operator.Inequality.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.FailureBuilder/FailureBuilderTest.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.FailureBuilder/ToString/ToString.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Equality/Equality.Equals.Object.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Equality/Equality.Equals.Other.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Equality/Equality.Equals.Static.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Equality/Equality.GetHashCode.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Equality/Equality.Operator.Equality.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Equality/Equality.Operator.Inequality.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Factory/Factory.Constructor.Failure.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Factory/Factory.Constructor.Success.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Factory/Factory.Default.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Factory/Factory.Explicit.Failure.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Factory/Factory.Explicit.Success.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Factory/Factory.Implicit.Failure.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Factory/Factory.Implicit.FailureBuilder.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Factory/Factory.Implicit.Success.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Factory/Factory.Implicit.SuccessBuilder.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Flow.Filter/Filter.MapFailure.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Flow.Filter/Filter.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Flow.Filter/FilterAsync.MapFailure.Sync.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Flow.Filter/FilterAsync.MapFailure.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Flow.Filter/FilterAsync.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Flow.Filter/FilterValueAsync.MapFailure.Sync.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Flow.Filter/FilterValueAsync.MapFailure.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Flow.Filter/FilterValueAsync.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Flow.Forward/Forward.MapFailure.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Flow.Forward/Forward.Self.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Flow.Forward/Forward.Success.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Flow.Forward/ForwardAsync.MapFailure.Sync.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Flow.Forward/ForwardAsync.MapFailure.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Flow.Forward/ForwardAsync.Self.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Flow.Forward/ForwardAsync.Success.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Flow.Forward/ForwardValueAsync.MapFailure.Sync.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Flow.Forward/ForwardValueAsync.MapFailure.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Flow.Forward/ForwardValueAsync.Self.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Flow.Forward/ForwardValueAsync.Success.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Flow.Recover/Recover.Failure.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Flow.Recover/Recover.MapSuccess.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Flow.Recover/Recover.Self.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Flow.Recover/RecoverAsync.Failure.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Flow.Recover/RecoverAsync.MapSuccess.Sync.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Flow.Recover/RecoverAsync.MapSuccess.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Flow.Recover/RecoverAsync.Self.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Flow.Recover/RecoverValueAsync.Failure.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Flow.Recover/RecoverValueAsync.MapSuccess.Sync.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Flow.Recover/RecoverValueAsync.MapSuccess.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Flow.Recover/RecoverValueAsync.Self.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Fold/Fold.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Fold/FoldAsync.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Fold/FoldValueAsync.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Map/Map.Failure.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Map/Map.Success.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Map/Map.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Map/MapAsync.Failure.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Map/MapAsync.Success.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Map/MapAsync.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Map/MapValueAsync.Failure.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Map/MapValueAsync.Success.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/Map/MapValueAsync.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/OrDefault.Success/OrDefault.Success.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/OrThrow.Failure/OrThrow.Failure.Factory.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/OrThrow.Failure/OrThrow.Failure.FactoryFrom.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/OrThrow.Failure/OrThrow.Failure.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/OrThrow.Success/OrThrow.Success.Factory.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/OrThrow.Success/OrThrow.Success.FactoryFrom.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/OrThrow.Success/OrThrow.Success.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/ResultTest.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/ToString/ToString.Failure.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/ToString/ToString.FailureDefault.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.Result/ToString/ToString.Success.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.ResultStatic/Equality/Equality.Equals.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.ResultStatic/Factory/Factory.Bool.False.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.ResultStatic/Factory/Factory.Bool.True.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.ResultStatic/Factory/Factory.Failure.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.ResultStatic/Factory/Factory.Optional.Absent.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.ResultStatic/Factory/Factory.Optional.Present.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.ResultStatic/Factory/Factory.Success.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.ResultStatic/ResultStaticTest.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.SuccessBuilder/Equality/Equality.Equals.Object.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.SuccessBuilder/Equality/Equality.Equals.Other.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.SuccessBuilder/Equality/Equality.Equals.Static.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.SuccessBuilder/Equality/Equality.GetHashCode.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.SuccessBuilder/Equality/Equality.Operator.Equality.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.SuccessBuilder/Equality/Equality.Operator.Inequality.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.SuccessBuilder/SuccessBuilderTest.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/Test.SuccessBuilder/ToString/ToString.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/TestData/SomeError.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/TestData/SomeException.T.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/TestData/SomeException.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/TestData/SomeRecord.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/TestData/StubToStringRefType.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/TestData/StubToStringStructType.cs (100%) rename src/core-taggeds-result/{Result.Tests => Result.Tests.Old}/TestData/TestDataSource.cs (100%) create mode 100644 src/core-taggeds-result/Result.Tests/GlobalUsings.cs create mode 100644 src/core-taggeds-result/Result.Tests/TestStub.cs diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 6cc7e8ee..87f22dd3 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -96,6 +96,12 @@ jobs: - name: Pack Result run: dotnet pack ./src/*/*/Result.csproj --no-restore -o ~/nuget -c Release + - name: Restore Result.Tests.Old + run: dotnet restore ./src/*/*/Result.Tests.Old.csproj + + - name: Test Result.Tests.Old + run: dotnet test ./src/*/*/Result.Tests.Old.csproj --no-restore -c Release + - name: Restore Result.Tests run: dotnet restore ./src/*/*/Result.Tests.csproj diff --git a/src/core-taggeds-result/Result.Tests.Old/Result.Tests.Old.csproj b/src/core-taggeds-result/Result.Tests.Old/Result.Tests.Old.csproj new file mode 100644 index 00000000..762b4efe --- /dev/null +++ b/src/core-taggeds-result/Result.Tests.Old/Result.Tests.Old.csproj @@ -0,0 +1,33 @@ + + + + net6.0;net7.0;net8.0 + disable + enable + true + true + false + true + Andrei Sergeev, Pavel Moskovoy + Copyright © 2020-2024 Andrei Sergeev, Pavel Moskovoy + PrimeFuncPack.Core.Tests + PrimeFuncPack.Core.Result.Tests.Old + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + diff --git a/src/core-taggeds-result/Result.Tests/Test.FailureBuilder/Equality/Equality.Equals.Object.cs b/src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/Equality/Equality.Equals.Object.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.FailureBuilder/Equality/Equality.Equals.Object.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/Equality/Equality.Equals.Object.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.FailureBuilder/Equality/Equality.Equals.Other.cs b/src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/Equality/Equality.Equals.Other.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.FailureBuilder/Equality/Equality.Equals.Other.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/Equality/Equality.Equals.Other.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.FailureBuilder/Equality/Equality.Equals.Static.cs b/src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/Equality/Equality.Equals.Static.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.FailureBuilder/Equality/Equality.Equals.Static.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/Equality/Equality.Equals.Static.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.FailureBuilder/Equality/Equality.GetHashCode.cs b/src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/Equality/Equality.GetHashCode.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.FailureBuilder/Equality/Equality.GetHashCode.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/Equality/Equality.GetHashCode.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.FailureBuilder/Equality/Equality.Operator.Equality.cs b/src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/Equality/Equality.Operator.Equality.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.FailureBuilder/Equality/Equality.Operator.Equality.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/Equality/Equality.Operator.Equality.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.FailureBuilder/Equality/Equality.Operator.Inequality.cs b/src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/Equality/Equality.Operator.Inequality.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.FailureBuilder/Equality/Equality.Operator.Inequality.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/Equality/Equality.Operator.Inequality.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.FailureBuilder/FailureBuilderTest.cs b/src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/FailureBuilderTest.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.FailureBuilder/FailureBuilderTest.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/FailureBuilderTest.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.FailureBuilder/ToString/ToString.cs b/src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/ToString/ToString.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.FailureBuilder/ToString/ToString.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/ToString/ToString.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Equality/Equality.Equals.Object.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Equality/Equality.Equals.Object.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Equality/Equality.Equals.Object.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Equality/Equality.Equals.Object.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Equality/Equality.Equals.Other.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Equality/Equality.Equals.Other.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Equality/Equality.Equals.Other.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Equality/Equality.Equals.Other.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Equality/Equality.Equals.Static.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Equality/Equality.Equals.Static.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Equality/Equality.Equals.Static.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Equality/Equality.Equals.Static.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Equality/Equality.GetHashCode.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Equality/Equality.GetHashCode.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Equality/Equality.GetHashCode.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Equality/Equality.GetHashCode.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Equality/Equality.Operator.Equality.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Equality/Equality.Operator.Equality.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Equality/Equality.Operator.Equality.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Equality/Equality.Operator.Equality.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Equality/Equality.Operator.Inequality.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Equality/Equality.Operator.Inequality.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Equality/Equality.Operator.Inequality.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Equality/Equality.Operator.Inequality.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Constructor.Failure.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Constructor.Failure.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Constructor.Failure.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Constructor.Failure.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Constructor.Success.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Constructor.Success.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Constructor.Success.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Constructor.Success.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Default.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Default.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Default.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Default.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Explicit.Failure.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Explicit.Failure.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Explicit.Failure.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Explicit.Failure.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Explicit.Success.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Explicit.Success.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Explicit.Success.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Explicit.Success.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Implicit.Failure.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Implicit.Failure.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Implicit.Failure.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Implicit.Failure.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Implicit.FailureBuilder.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Implicit.FailureBuilder.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Implicit.FailureBuilder.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Implicit.FailureBuilder.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Implicit.Success.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Implicit.Success.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Implicit.Success.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Implicit.Success.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Implicit.SuccessBuilder.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Implicit.SuccessBuilder.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Factory/Factory.Implicit.SuccessBuilder.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Implicit.SuccessBuilder.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/Filter.MapFailure.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/Filter.MapFailure.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/Filter.MapFailure.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/Filter.MapFailure.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/Filter.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/Filter.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/Filter.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/Filter.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/FilterAsync.MapFailure.Sync.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/FilterAsync.MapFailure.Sync.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/FilterAsync.MapFailure.Sync.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/FilterAsync.MapFailure.Sync.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/FilterAsync.MapFailure.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/FilterAsync.MapFailure.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/FilterAsync.MapFailure.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/FilterAsync.MapFailure.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/FilterAsync.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/FilterAsync.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/FilterAsync.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/FilterAsync.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/FilterValueAsync.MapFailure.Sync.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/FilterValueAsync.MapFailure.Sync.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/FilterValueAsync.MapFailure.Sync.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/FilterValueAsync.MapFailure.Sync.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/FilterValueAsync.MapFailure.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/FilterValueAsync.MapFailure.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/FilterValueAsync.MapFailure.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/FilterValueAsync.MapFailure.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/FilterValueAsync.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/FilterValueAsync.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Flow.Filter/FilterValueAsync.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/FilterValueAsync.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/Forward.MapFailure.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/Forward.MapFailure.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/Forward.MapFailure.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/Forward.MapFailure.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/Forward.Self.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/Forward.Self.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/Forward.Self.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/Forward.Self.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/Forward.Success.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/Forward.Success.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/Forward.Success.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/Forward.Success.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardAsync.MapFailure.Sync.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardAsync.MapFailure.Sync.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardAsync.MapFailure.Sync.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardAsync.MapFailure.Sync.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardAsync.MapFailure.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardAsync.MapFailure.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardAsync.MapFailure.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardAsync.MapFailure.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardAsync.Self.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardAsync.Self.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardAsync.Self.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardAsync.Self.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardAsync.Success.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardAsync.Success.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardAsync.Success.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardAsync.Success.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardValueAsync.MapFailure.Sync.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardValueAsync.MapFailure.Sync.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardValueAsync.MapFailure.Sync.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardValueAsync.MapFailure.Sync.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardValueAsync.MapFailure.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardValueAsync.MapFailure.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardValueAsync.MapFailure.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardValueAsync.MapFailure.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardValueAsync.Self.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardValueAsync.Self.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardValueAsync.Self.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardValueAsync.Self.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardValueAsync.Success.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardValueAsync.Success.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Flow.Forward/ForwardValueAsync.Success.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardValueAsync.Success.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/Recover.Failure.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/Recover.Failure.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/Recover.Failure.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/Recover.Failure.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/Recover.MapSuccess.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/Recover.MapSuccess.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/Recover.MapSuccess.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/Recover.MapSuccess.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/Recover.Self.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/Recover.Self.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/Recover.Self.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/Recover.Self.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverAsync.Failure.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverAsync.Failure.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverAsync.Failure.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverAsync.Failure.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverAsync.MapSuccess.Sync.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverAsync.MapSuccess.Sync.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverAsync.MapSuccess.Sync.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverAsync.MapSuccess.Sync.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverAsync.MapSuccess.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverAsync.MapSuccess.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverAsync.MapSuccess.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverAsync.MapSuccess.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverAsync.Self.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverAsync.Self.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverAsync.Self.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverAsync.Self.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverValueAsync.Failure.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverValueAsync.Failure.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverValueAsync.Failure.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverValueAsync.Failure.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverValueAsync.MapSuccess.Sync.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverValueAsync.MapSuccess.Sync.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverValueAsync.MapSuccess.Sync.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverValueAsync.MapSuccess.Sync.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverValueAsync.MapSuccess.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverValueAsync.MapSuccess.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverValueAsync.MapSuccess.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverValueAsync.MapSuccess.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverValueAsync.Self.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverValueAsync.Self.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Flow.Recover/RecoverValueAsync.Self.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverValueAsync.Self.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Fold/Fold.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Fold/Fold.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Fold/Fold.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Fold/Fold.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Fold/FoldAsync.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Fold/FoldAsync.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Fold/FoldAsync.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Fold/FoldAsync.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Fold/FoldValueAsync.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Fold/FoldValueAsync.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Fold/FoldValueAsync.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Fold/FoldValueAsync.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Map/Map.Failure.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/Map.Failure.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Map/Map.Failure.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/Map.Failure.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Map/Map.Success.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/Map.Success.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Map/Map.Success.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/Map.Success.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Map/Map.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/Map.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Map/Map.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/Map.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Map/MapAsync.Failure.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/MapAsync.Failure.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Map/MapAsync.Failure.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/MapAsync.Failure.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Map/MapAsync.Success.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/MapAsync.Success.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Map/MapAsync.Success.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/MapAsync.Success.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Map/MapAsync.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/MapAsync.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Map/MapAsync.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/MapAsync.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Map/MapValueAsync.Failure.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/MapValueAsync.Failure.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Map/MapValueAsync.Failure.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/MapValueAsync.Failure.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Map/MapValueAsync.Success.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/MapValueAsync.Success.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Map/MapValueAsync.Success.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/MapValueAsync.Success.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/Map/MapValueAsync.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/MapValueAsync.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/Map/MapValueAsync.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/MapValueAsync.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/OrDefault.Success/OrDefault.Success.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/OrDefault.Success/OrDefault.Success.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/OrDefault.Success/OrDefault.Success.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/OrDefault.Success/OrDefault.Success.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Failure/OrThrow.Failure.Factory.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/OrThrow.Failure/OrThrow.Failure.Factory.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Failure/OrThrow.Failure.Factory.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/OrThrow.Failure/OrThrow.Failure.Factory.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Failure/OrThrow.Failure.FactoryFrom.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/OrThrow.Failure/OrThrow.Failure.FactoryFrom.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Failure/OrThrow.Failure.FactoryFrom.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/OrThrow.Failure/OrThrow.Failure.FactoryFrom.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Failure/OrThrow.Failure.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/OrThrow.Failure/OrThrow.Failure.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Failure/OrThrow.Failure.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/OrThrow.Failure/OrThrow.Failure.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Success/OrThrow.Success.Factory.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/OrThrow.Success/OrThrow.Success.Factory.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Success/OrThrow.Success.Factory.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/OrThrow.Success/OrThrow.Success.Factory.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Success/OrThrow.Success.FactoryFrom.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/OrThrow.Success/OrThrow.Success.FactoryFrom.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Success/OrThrow.Success.FactoryFrom.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/OrThrow.Success/OrThrow.Success.FactoryFrom.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Success/OrThrow.Success.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/OrThrow.Success/OrThrow.Success.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/OrThrow.Success/OrThrow.Success.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/OrThrow.Success/OrThrow.Success.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/ResultTest.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/ResultTest.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/ResultTest.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/ResultTest.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/ToString/ToString.Failure.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/ToString/ToString.Failure.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/ToString/ToString.Failure.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/ToString/ToString.Failure.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/ToString/ToString.FailureDefault.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/ToString/ToString.FailureDefault.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/ToString/ToString.FailureDefault.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/ToString/ToString.FailureDefault.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.Result/ToString/ToString.Success.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/ToString/ToString.Success.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.Result/ToString/ToString.Success.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.Result/ToString/ToString.Success.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.ResultStatic/Equality/Equality.Equals.cs b/src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Equality/Equality.Equals.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.ResultStatic/Equality/Equality.Equals.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Equality/Equality.Equals.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.ResultStatic/Factory/Factory.Bool.False.cs b/src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Factory/Factory.Bool.False.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.ResultStatic/Factory/Factory.Bool.False.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Factory/Factory.Bool.False.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.ResultStatic/Factory/Factory.Bool.True.cs b/src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Factory/Factory.Bool.True.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.ResultStatic/Factory/Factory.Bool.True.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Factory/Factory.Bool.True.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.ResultStatic/Factory/Factory.Failure.cs b/src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Factory/Factory.Failure.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.ResultStatic/Factory/Factory.Failure.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Factory/Factory.Failure.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.ResultStatic/Factory/Factory.Optional.Absent.cs b/src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Factory/Factory.Optional.Absent.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.ResultStatic/Factory/Factory.Optional.Absent.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Factory/Factory.Optional.Absent.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.ResultStatic/Factory/Factory.Optional.Present.cs b/src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Factory/Factory.Optional.Present.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.ResultStatic/Factory/Factory.Optional.Present.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Factory/Factory.Optional.Present.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.ResultStatic/Factory/Factory.Success.cs b/src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Factory/Factory.Success.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.ResultStatic/Factory/Factory.Success.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Factory/Factory.Success.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.ResultStatic/ResultStaticTest.cs b/src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/ResultStaticTest.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.ResultStatic/ResultStaticTest.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/ResultStaticTest.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/Equality/Equality.Equals.Object.cs b/src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/Equality/Equality.Equals.Object.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/Equality/Equality.Equals.Object.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/Equality/Equality.Equals.Object.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/Equality/Equality.Equals.Other.cs b/src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/Equality/Equality.Equals.Other.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/Equality/Equality.Equals.Other.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/Equality/Equality.Equals.Other.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/Equality/Equality.Equals.Static.cs b/src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/Equality/Equality.Equals.Static.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/Equality/Equality.Equals.Static.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/Equality/Equality.Equals.Static.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/Equality/Equality.GetHashCode.cs b/src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/Equality/Equality.GetHashCode.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/Equality/Equality.GetHashCode.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/Equality/Equality.GetHashCode.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/Equality/Equality.Operator.Equality.cs b/src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/Equality/Equality.Operator.Equality.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/Equality/Equality.Operator.Equality.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/Equality/Equality.Operator.Equality.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/Equality/Equality.Operator.Inequality.cs b/src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/Equality/Equality.Operator.Inequality.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/Equality/Equality.Operator.Inequality.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/Equality/Equality.Operator.Inequality.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/SuccessBuilderTest.cs b/src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/SuccessBuilderTest.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/SuccessBuilderTest.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/SuccessBuilderTest.cs diff --git a/src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/ToString/ToString.cs b/src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/ToString/ToString.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/Test.SuccessBuilder/ToString/ToString.cs rename to src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/ToString/ToString.cs diff --git a/src/core-taggeds-result/Result.Tests/TestData/SomeError.cs b/src/core-taggeds-result/Result.Tests.Old/TestData/SomeError.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/TestData/SomeError.cs rename to src/core-taggeds-result/Result.Tests.Old/TestData/SomeError.cs diff --git a/src/core-taggeds-result/Result.Tests/TestData/SomeException.T.cs b/src/core-taggeds-result/Result.Tests.Old/TestData/SomeException.T.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/TestData/SomeException.T.cs rename to src/core-taggeds-result/Result.Tests.Old/TestData/SomeException.T.cs diff --git a/src/core-taggeds-result/Result.Tests/TestData/SomeException.cs b/src/core-taggeds-result/Result.Tests.Old/TestData/SomeException.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/TestData/SomeException.cs rename to src/core-taggeds-result/Result.Tests.Old/TestData/SomeException.cs diff --git a/src/core-taggeds-result/Result.Tests/TestData/SomeRecord.cs b/src/core-taggeds-result/Result.Tests.Old/TestData/SomeRecord.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/TestData/SomeRecord.cs rename to src/core-taggeds-result/Result.Tests.Old/TestData/SomeRecord.cs diff --git a/src/core-taggeds-result/Result.Tests/TestData/StubToStringRefType.cs b/src/core-taggeds-result/Result.Tests.Old/TestData/StubToStringRefType.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/TestData/StubToStringRefType.cs rename to src/core-taggeds-result/Result.Tests.Old/TestData/StubToStringRefType.cs diff --git a/src/core-taggeds-result/Result.Tests/TestData/StubToStringStructType.cs b/src/core-taggeds-result/Result.Tests.Old/TestData/StubToStringStructType.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/TestData/StubToStringStructType.cs rename to src/core-taggeds-result/Result.Tests.Old/TestData/StubToStringStructType.cs diff --git a/src/core-taggeds-result/Result.Tests/TestData/TestDataSource.cs b/src/core-taggeds-result/Result.Tests.Old/TestData/TestDataSource.cs similarity index 100% rename from src/core-taggeds-result/Result.Tests/TestData/TestDataSource.cs rename to src/core-taggeds-result/Result.Tests.Old/TestData/TestDataSource.cs diff --git a/src/core-taggeds-result/Result.Tests/GlobalUsings.cs b/src/core-taggeds-result/Result.Tests/GlobalUsings.cs new file mode 100644 index 00000000..8c927eb7 --- /dev/null +++ b/src/core-taggeds-result/Result.Tests/GlobalUsings.cs @@ -0,0 +1 @@ +global using Xunit; \ No newline at end of file diff --git a/src/core-taggeds-result/Result.Tests/Result.Tests.csproj b/src/core-taggeds-result/Result.Tests/Result.Tests.csproj index dcedc9fa..5e50c6f5 100644 --- a/src/core-taggeds-result/Result.Tests/Result.Tests.csproj +++ b/src/core-taggeds-result/Result.Tests/Result.Tests.csproj @@ -7,6 +7,7 @@ true true false + true Andrei Sergeev, Pavel Moskovoy Copyright © 2020-2024 Andrei Sergeev, Pavel Moskovoy PrimeFuncPack.Core.Tests @@ -14,18 +15,16 @@ - - all + + + runtime; build; native; contentfiles; analyzers; buildtransitive - - - all + + runtime; build; native; contentfiles; analyzers; buildtransitive + all - - - diff --git a/src/core-taggeds-result/Result.Tests/TestStub.cs b/src/core-taggeds-result/Result.Tests/TestStub.cs new file mode 100644 index 00000000..05f82c8d --- /dev/null +++ b/src/core-taggeds-result/Result.Tests/TestStub.cs @@ -0,0 +1,10 @@ +namespace PrimeFuncPack.Core.Tests; + +public static class TestStub +{ + [Fact] + public static void TestTrue() + { + Assert.True(true); + } +} From 3d4c3a859c63381a12cc31801156833bcca5bc33 Mon Sep 17 00:00:00 2001 From: Andrei Sergeev Date: Tue, 6 Feb 2024 23:06:20 +0400 Subject: [PATCH 5/7] Use global usings in the old tests --- src/core-taggeds-result/Result.Tests.Old/GlobalUsings.cs | 1 + .../Test.FailureBuilder/Equality/Equality.Equals.Object.cs | 1 - .../Test.FailureBuilder/Equality/Equality.Equals.Other.cs | 1 - .../Test.FailureBuilder/Equality/Equality.Equals.Static.cs | 1 - .../Test.FailureBuilder/Equality/Equality.GetHashCode.cs | 1 - .../Test.FailureBuilder/Equality/Equality.Operator.Equality.cs | 1 - .../Equality/Equality.Operator.Inequality.cs | 1 - .../Result.Tests.Old/Test.FailureBuilder/ToString/ToString.cs | 1 - .../Test.Result/Equality/Equality.Equals.Object.cs | 3 +-- .../Test.Result/Equality/Equality.Equals.Other.cs | 3 +-- .../Test.Result/Equality/Equality.Equals.Static.cs | 1 - .../Test.Result/Equality/Equality.GetHashCode.cs | 3 +-- .../Test.Result/Equality/Equality.Operator.Equality.cs | 1 - .../Test.Result/Equality/Equality.Operator.Inequality.cs | 1 - .../Test.Result/Factory/Factory.Constructor.Failure.cs | 1 - .../Test.Result/Factory/Factory.Constructor.Success.cs | 1 - .../Result.Tests.Old/Test.Result/Factory/Factory.Default.cs | 3 +-- .../Test.Result/Factory/Factory.Explicit.Failure.cs | 3 +-- .../Test.Result/Factory/Factory.Explicit.Success.cs | 3 +-- .../Test.Result/Factory/Factory.Implicit.Failure.cs | 3 +-- .../Test.Result/Factory/Factory.Implicit.FailureBuilder.cs | 3 +-- .../Test.Result/Factory/Factory.Implicit.Success.cs | 3 +-- .../Test.Result/Factory/Factory.Implicit.SuccessBuilder.cs | 3 +-- .../Test.Result/Flow.Filter/Filter.MapFailure.cs | 1 - .../Result.Tests.Old/Test.Result/Flow.Filter/Filter.cs | 1 - .../Test.Result/Flow.Filter/FilterAsync.MapFailure.Sync.cs | 1 - .../Test.Result/Flow.Filter/FilterAsync.MapFailure.cs | 1 - .../Result.Tests.Old/Test.Result/Flow.Filter/FilterAsync.cs | 1 - .../Flow.Filter/FilterValueAsync.MapFailure.Sync.cs | 1 - .../Test.Result/Flow.Filter/FilterValueAsync.MapFailure.cs | 1 - .../Test.Result/Flow.Filter/FilterValueAsync.cs | 1 - .../Test.Result/Flow.Forward/Forward.MapFailure.cs | 1 - .../Result.Tests.Old/Test.Result/Flow.Forward/Forward.Self.cs | 1 - .../Test.Result/Flow.Forward/Forward.Success.cs | 1 - .../Test.Result/Flow.Forward/ForwardAsync.MapFailure.Sync.cs | 1 - .../Test.Result/Flow.Forward/ForwardAsync.MapFailure.cs | 1 - .../Test.Result/Flow.Forward/ForwardAsync.Self.cs | 1 - .../Test.Result/Flow.Forward/ForwardAsync.Success.cs | 1 - .../Flow.Forward/ForwardValueAsync.MapFailure.Sync.cs | 1 - .../Test.Result/Flow.Forward/ForwardValueAsync.MapFailure.cs | 1 - .../Test.Result/Flow.Forward/ForwardValueAsync.Self.cs | 1 - .../Test.Result/Flow.Forward/ForwardValueAsync.Success.cs | 1 - .../Test.Result/Flow.Recover/Recover.Failure.cs | 1 - .../Test.Result/Flow.Recover/Recover.MapSuccess.cs | 1 - .../Result.Tests.Old/Test.Result/Flow.Recover/Recover.Self.cs | 1 - .../Test.Result/Flow.Recover/RecoverAsync.Failure.cs | 1 - .../Test.Result/Flow.Recover/RecoverAsync.MapSuccess.Sync.cs | 1 - .../Test.Result/Flow.Recover/RecoverAsync.MapSuccess.cs | 1 - .../Test.Result/Flow.Recover/RecoverAsync.Self.cs | 1 - .../Test.Result/Flow.Recover/RecoverValueAsync.Failure.cs | 1 - .../Flow.Recover/RecoverValueAsync.MapSuccess.Sync.cs | 1 - .../Test.Result/Flow.Recover/RecoverValueAsync.MapSuccess.cs | 1 - .../Test.Result/Flow.Recover/RecoverValueAsync.Self.cs | 1 - .../Result.Tests.Old/Test.Result/Fold/Fold.cs | 1 - .../Result.Tests.Old/Test.Result/Fold/FoldAsync.cs | 1 - .../Result.Tests.Old/Test.Result/Fold/FoldValueAsync.cs | 1 - .../Result.Tests.Old/Test.Result/Map/Map.Failure.cs | 1 - .../Result.Tests.Old/Test.Result/Map/Map.Success.cs | 1 - .../Result.Tests.Old/Test.Result/Map/Map.cs | 1 - .../Result.Tests.Old/Test.Result/Map/MapAsync.Failure.cs | 1 - .../Result.Tests.Old/Test.Result/Map/MapAsync.Success.cs | 1 - .../Result.Tests.Old/Test.Result/Map/MapAsync.cs | 1 - .../Result.Tests.Old/Test.Result/Map/MapValueAsync.Failure.cs | 1 - .../Result.Tests.Old/Test.Result/Map/MapValueAsync.Success.cs | 1 - .../Result.Tests.Old/Test.Result/Map/MapValueAsync.cs | 1 - .../Test.Result/OrDefault.Success/OrDefault.Success.cs | 1 - .../Test.Result/OrThrow.Failure/OrThrow.Failure.Factory.cs | 1 - .../Test.Result/OrThrow.Failure/OrThrow.Failure.FactoryFrom.cs | 1 - .../Test.Result/OrThrow.Failure/OrThrow.Failure.cs | 1 - .../Test.Result/OrThrow.Success/OrThrow.Success.Factory.cs | 1 - .../Test.Result/OrThrow.Success/OrThrow.Success.FactoryFrom.cs | 1 - .../Test.Result/OrThrow.Success/OrThrow.Success.cs | 1 - .../Result.Tests.Old/Test.Result/ToString/ToString.Failure.cs | 1 - .../Test.Result/ToString/ToString.FailureDefault.cs | 1 - .../Result.Tests.Old/Test.Result/ToString/ToString.Success.cs | 1 - .../Test.ResultStatic/Equality/Equality.Equals.cs | 1 - .../Test.ResultStatic/Factory/Factory.Bool.False.cs | 1 - .../Test.ResultStatic/Factory/Factory.Bool.True.cs | 1 - .../Test.ResultStatic/Factory/Factory.Failure.cs | 1 - .../Test.ResultStatic/Factory/Factory.Optional.Absent.cs | 1 - .../Test.ResultStatic/Factory/Factory.Optional.Present.cs | 1 - .../Test.ResultStatic/Factory/Factory.Success.cs | 1 - .../Test.SuccessBuilder/Equality/Equality.Equals.Object.cs | 1 - .../Test.SuccessBuilder/Equality/Equality.Equals.Other.cs | 1 - .../Test.SuccessBuilder/Equality/Equality.Equals.Static.cs | 1 - .../Test.SuccessBuilder/Equality/Equality.GetHashCode.cs | 1 - .../Test.SuccessBuilder/Equality/Equality.Operator.Equality.cs | 1 - .../Equality/Equality.Operator.Inequality.cs | 1 - .../Result.Tests.Old/Test.SuccessBuilder/ToString/ToString.cs | 1 - 89 files changed, 11 insertions(+), 98 deletions(-) create mode 100644 src/core-taggeds-result/Result.Tests.Old/GlobalUsings.cs diff --git a/src/core-taggeds-result/Result.Tests.Old/GlobalUsings.cs b/src/core-taggeds-result/Result.Tests.Old/GlobalUsings.cs new file mode 100644 index 00000000..cefced49 --- /dev/null +++ b/src/core-taggeds-result/Result.Tests.Old/GlobalUsings.cs @@ -0,0 +1 @@ +global using NUnit.Framework; \ No newline at end of file diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/Equality/Equality.Equals.Object.cs b/src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/Equality/Equality.Equals.Object.cs index f45af6ff..f3e7bb32 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/Equality/Equality.Equals.Object.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/Equality/Equality.Equals.Object.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/Equality/Equality.Equals.Other.cs b/src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/Equality/Equality.Equals.Other.cs index 054527dc..97e16e64 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/Equality/Equality.Equals.Other.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/Equality/Equality.Equals.Other.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/Equality/Equality.Equals.Static.cs b/src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/Equality/Equality.Equals.Static.cs index 387ef450..3cfc3dd5 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/Equality/Equality.Equals.Static.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/Equality/Equality.Equals.Static.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/Equality/Equality.GetHashCode.cs b/src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/Equality/Equality.GetHashCode.cs index cdf3ec19..2d8d2550 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/Equality/Equality.GetHashCode.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/Equality/Equality.GetHashCode.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/Equality/Equality.Operator.Equality.cs b/src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/Equality/Equality.Operator.Equality.cs index 25652181..6bebb5f1 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/Equality/Equality.Operator.Equality.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/Equality/Equality.Operator.Equality.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/Equality/Equality.Operator.Inequality.cs b/src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/Equality/Equality.Operator.Inequality.cs index d7beb1f2..1961def8 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/Equality/Equality.Operator.Inequality.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/Equality/Equality.Operator.Inequality.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/ToString/ToString.cs b/src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/ToString/ToString.cs index b2d4ce3a..897fc9ea 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/ToString/ToString.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.FailureBuilder/ToString/ToString.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using System; using System.Collections.Generic; using System.Globalization; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Equality/Equality.Equals.Object.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Equality/Equality.Equals.Object.cs index fbdf0d87..36a73806 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Equality/Equality.Equals.Object.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Equality/Equality.Equals.Object.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Equality/Equality.Equals.Other.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Equality/Equality.Equals.Other.cs index 0d950d7c..8e23c365 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Equality/Equality.Equals.Other.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Equality/Equality.Equals.Other.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Equality/Equality.Equals.Static.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Equality/Equality.Equals.Static.cs index a2c2e1eb..343e61ad 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Equality/Equality.Equals.Static.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Equality/Equality.Equals.Static.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Equality/Equality.GetHashCode.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Equality/Equality.GetHashCode.cs index 86857f5c..0befe2f5 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Equality/Equality.GetHashCode.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Equality/Equality.GetHashCode.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Equality/Equality.Operator.Equality.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Equality/Equality.Operator.Equality.cs index d9ec3743..5019267a 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Equality/Equality.Operator.Equality.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Equality/Equality.Operator.Equality.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Equality/Equality.Operator.Inequality.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Equality/Equality.Operator.Inequality.cs index df11a7a8..7f225bcd 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Equality/Equality.Operator.Inequality.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Equality/Equality.Operator.Inequality.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Constructor.Failure.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Constructor.Failure.cs index 72d530ba..f1506df1 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Constructor.Failure.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Constructor.Failure.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Constructor.Success.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Constructor.Success.cs index 89e94c16..374b7dca 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Constructor.Success.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Constructor.Success.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Default.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Default.cs index 0f433857..d6562652 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Default.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Default.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; namespace PrimeFuncPack.Core.Tests; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Explicit.Failure.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Explicit.Failure.cs index 9d51042b..8e795754 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Explicit.Failure.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Explicit.Failure.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Explicit.Success.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Explicit.Success.cs index 8d5c4563..6cb92b2c 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Explicit.Success.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Explicit.Success.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Implicit.Failure.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Implicit.Failure.cs index 81fb3b1a..24cbaa85 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Implicit.Failure.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Implicit.Failure.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Implicit.FailureBuilder.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Implicit.FailureBuilder.cs index c09d5b1e..123500cf 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Implicit.FailureBuilder.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Implicit.FailureBuilder.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Implicit.Success.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Implicit.Success.cs index 81878d97..bffbb659 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Implicit.Success.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Implicit.Success.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Implicit.SuccessBuilder.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Implicit.SuccessBuilder.cs index 7223a18c..3a787284 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Implicit.SuccessBuilder.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Factory/Factory.Implicit.SuccessBuilder.cs @@ -1,5 +1,4 @@ -using NUnit.Framework; -using PrimeFuncPack.UnitTest; +using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/Filter.MapFailure.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/Filter.MapFailure.cs index 24996d7b..6c08df11 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/Filter.MapFailure.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/Filter.MapFailure.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/Filter.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/Filter.cs index 73330b40..8a2b095f 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/Filter.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/Filter.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/FilterAsync.MapFailure.Sync.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/FilterAsync.MapFailure.Sync.cs index b9a39d6f..cedb1426 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/FilterAsync.MapFailure.Sync.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/FilterAsync.MapFailure.Sync.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/FilterAsync.MapFailure.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/FilterAsync.MapFailure.cs index d1442edf..05318ad2 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/FilterAsync.MapFailure.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/FilterAsync.MapFailure.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/FilterAsync.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/FilterAsync.cs index 3e9d7b4e..9695bade 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/FilterAsync.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/FilterAsync.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/FilterValueAsync.MapFailure.Sync.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/FilterValueAsync.MapFailure.Sync.cs index 61d720af..295d6033 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/FilterValueAsync.MapFailure.Sync.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/FilterValueAsync.MapFailure.Sync.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/FilterValueAsync.MapFailure.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/FilterValueAsync.MapFailure.cs index 2fdbf936..8ae468bd 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/FilterValueAsync.MapFailure.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/FilterValueAsync.MapFailure.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/FilterValueAsync.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/FilterValueAsync.cs index c48f4e7f..7dda7103 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/FilterValueAsync.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Filter/FilterValueAsync.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/Forward.MapFailure.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/Forward.MapFailure.cs index 82fe1273..ccd6a163 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/Forward.MapFailure.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/Forward.MapFailure.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/Forward.Self.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/Forward.Self.cs index c0012aa3..9f682c61 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/Forward.Self.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/Forward.Self.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/Forward.Success.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/Forward.Success.cs index e5016d72..2fc24968 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/Forward.Success.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/Forward.Success.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardAsync.MapFailure.Sync.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardAsync.MapFailure.Sync.cs index 13c0ca6a..a0eb6a06 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardAsync.MapFailure.Sync.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardAsync.MapFailure.Sync.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardAsync.MapFailure.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardAsync.MapFailure.cs index ed92b583..b90fbc9f 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardAsync.MapFailure.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardAsync.MapFailure.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardAsync.Self.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardAsync.Self.cs index c01cda82..e4113563 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardAsync.Self.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardAsync.Self.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardAsync.Success.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardAsync.Success.cs index 03697732..b09b1814 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardAsync.Success.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardAsync.Success.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardValueAsync.MapFailure.Sync.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardValueAsync.MapFailure.Sync.cs index 4ee6ab12..53519f14 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardValueAsync.MapFailure.Sync.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardValueAsync.MapFailure.Sync.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardValueAsync.MapFailure.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardValueAsync.MapFailure.cs index c03b783a..feb3b759 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardValueAsync.MapFailure.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardValueAsync.MapFailure.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardValueAsync.Self.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardValueAsync.Self.cs index b2b539a2..d9749e17 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardValueAsync.Self.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardValueAsync.Self.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardValueAsync.Success.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardValueAsync.Success.cs index 8140a096..de6fe636 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardValueAsync.Success.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Forward/ForwardValueAsync.Success.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/Recover.Failure.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/Recover.Failure.cs index 58b347fe..0e94c0b2 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/Recover.Failure.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/Recover.Failure.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/Recover.MapSuccess.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/Recover.MapSuccess.cs index 2f539f12..960e2d81 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/Recover.MapSuccess.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/Recover.MapSuccess.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/Recover.Self.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/Recover.Self.cs index 2db30cd3..84ea1b5c 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/Recover.Self.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/Recover.Self.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverAsync.Failure.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverAsync.Failure.cs index 71127b25..96a76ad7 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverAsync.Failure.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverAsync.Failure.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverAsync.MapSuccess.Sync.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverAsync.MapSuccess.Sync.cs index 9312ea1c..1570ea66 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverAsync.MapSuccess.Sync.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverAsync.MapSuccess.Sync.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverAsync.MapSuccess.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverAsync.MapSuccess.cs index 591af393..e4837074 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverAsync.MapSuccess.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverAsync.MapSuccess.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverAsync.Self.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverAsync.Self.cs index da86044c..3ebfdded 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverAsync.Self.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverAsync.Self.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverValueAsync.Failure.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverValueAsync.Failure.cs index c624e248..ddf92d85 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverValueAsync.Failure.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverValueAsync.Failure.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverValueAsync.MapSuccess.Sync.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverValueAsync.MapSuccess.Sync.cs index c6d502ad..f1467d7f 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverValueAsync.MapSuccess.Sync.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverValueAsync.MapSuccess.Sync.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverValueAsync.MapSuccess.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverValueAsync.MapSuccess.cs index 459e1d57..6507b989 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverValueAsync.MapSuccess.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverValueAsync.MapSuccess.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverValueAsync.Self.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverValueAsync.Self.cs index 8be707a6..a82da277 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverValueAsync.Self.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Flow.Recover/RecoverValueAsync.Self.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Fold/Fold.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Fold/Fold.cs index 5bcb24ae..9f726bec 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Fold/Fold.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Fold/Fold.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Fold/FoldAsync.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Fold/FoldAsync.cs index 0e5f5f20..aedf4729 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Fold/FoldAsync.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Fold/FoldAsync.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Fold/FoldValueAsync.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Fold/FoldValueAsync.cs index 143dfff1..3bcadcdb 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Fold/FoldValueAsync.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Fold/FoldValueAsync.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/Map.Failure.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/Map.Failure.cs index 4e085754..17988f37 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/Map.Failure.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/Map.Failure.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/Map.Success.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/Map.Success.cs index 90ced41b..d72a53d1 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/Map.Success.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/Map.Success.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/Map.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/Map.cs index 1adb7b65..1513784f 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/Map.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/Map.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/MapAsync.Failure.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/MapAsync.Failure.cs index 1e1b0473..8aa1f313 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/MapAsync.Failure.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/MapAsync.Failure.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/MapAsync.Success.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/MapAsync.Success.cs index 614e82c8..90949bae 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/MapAsync.Success.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/MapAsync.Success.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/MapAsync.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/MapAsync.cs index dea37f42..9c00f1b4 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/MapAsync.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/MapAsync.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/MapValueAsync.Failure.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/MapValueAsync.Failure.cs index a74e491a..d7e730c4 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/MapValueAsync.Failure.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/MapValueAsync.Failure.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/MapValueAsync.Success.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/MapValueAsync.Success.cs index d2cdf544..ab03e263 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/MapValueAsync.Success.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/MapValueAsync.Success.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/MapValueAsync.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/MapValueAsync.cs index 84a0d69f..8623d381 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/MapValueAsync.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/Map/MapValueAsync.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using System.Threading.Tasks; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/OrDefault.Success/OrDefault.Success.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/OrDefault.Success/OrDefault.Success.cs index f3fa324b..c5229142 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/OrDefault.Success/OrDefault.Success.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/OrDefault.Success/OrDefault.Success.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/OrThrow.Failure/OrThrow.Failure.Factory.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/OrThrow.Failure/OrThrow.Failure.Factory.cs index 6492878b..96498387 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/OrThrow.Failure/OrThrow.Failure.Factory.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/OrThrow.Failure/OrThrow.Failure.Factory.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/OrThrow.Failure/OrThrow.Failure.FactoryFrom.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/OrThrow.Failure/OrThrow.Failure.FactoryFrom.cs index 529ccd15..ae8cefda 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/OrThrow.Failure/OrThrow.Failure.FactoryFrom.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/OrThrow.Failure/OrThrow.Failure.FactoryFrom.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/OrThrow.Failure/OrThrow.Failure.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/OrThrow.Failure/OrThrow.Failure.cs index a7c6999f..6757a5ad 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/OrThrow.Failure/OrThrow.Failure.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/OrThrow.Failure/OrThrow.Failure.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/OrThrow.Success/OrThrow.Success.Factory.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/OrThrow.Success/OrThrow.Success.Factory.cs index 23265138..6e523f52 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/OrThrow.Success/OrThrow.Success.Factory.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/OrThrow.Success/OrThrow.Success.Factory.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/OrThrow.Success/OrThrow.Success.FactoryFrom.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/OrThrow.Success/OrThrow.Success.FactoryFrom.cs index e95ea771..54acf130 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/OrThrow.Success/OrThrow.Success.FactoryFrom.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/OrThrow.Success/OrThrow.Success.FactoryFrom.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/OrThrow.Success/OrThrow.Success.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/OrThrow.Success/OrThrow.Success.cs index c77a0a4b..ad8ddd31 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/OrThrow.Success/OrThrow.Success.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/OrThrow.Success/OrThrow.Success.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/ToString/ToString.Failure.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/ToString/ToString.Failure.cs index 50f16675..1fd98e51 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/ToString/ToString.Failure.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/ToString/ToString.Failure.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using System.Collections.Generic; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/ToString/ToString.FailureDefault.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/ToString/ToString.FailureDefault.cs index c41b5e22..506c9905 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/ToString/ToString.FailureDefault.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/ToString/ToString.FailureDefault.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using System.Globalization; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.Result/ToString/ToString.Success.cs b/src/core-taggeds-result/Result.Tests.Old/Test.Result/ToString/ToString.Success.cs index 640a5794..34ae7c44 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.Result/ToString/ToString.Success.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.Result/ToString/ToString.Success.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using System.Collections.Generic; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Equality/Equality.Equals.cs b/src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Equality/Equality.Equals.cs index f0cd7df6..64fba9a2 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Equality/Equality.Equals.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Equality/Equality.Equals.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Factory/Factory.Bool.False.cs b/src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Factory/Factory.Bool.False.cs index 82b451da..e2aa4081 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Factory/Factory.Bool.False.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Factory/Factory.Bool.False.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using System; namespace PrimeFuncPack.Core.Tests; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Factory/Factory.Bool.True.cs b/src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Factory/Factory.Bool.True.cs index 76b1ec9b..be3f37e9 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Factory/Factory.Bool.True.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Factory/Factory.Bool.True.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using System; namespace PrimeFuncPack.Core.Tests; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Factory/Factory.Failure.cs b/src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Factory/Factory.Failure.cs index 1e40baa2..34d4f479 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Factory/Factory.Failure.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Factory/Factory.Failure.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Factory/Factory.Optional.Absent.cs b/src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Factory/Factory.Optional.Absent.cs index 513c0a0f..92929a90 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Factory/Factory.Optional.Absent.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Factory/Factory.Optional.Absent.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Factory/Factory.Optional.Present.cs b/src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Factory/Factory.Optional.Present.cs index 391f898f..3abd20e8 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Factory/Factory.Optional.Present.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Factory/Factory.Optional.Present.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Factory/Factory.Success.cs b/src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Factory/Factory.Success.cs index 95b36328..ac0f8a64 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Factory/Factory.Success.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.ResultStatic/Factory/Factory.Success.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/Equality/Equality.Equals.Object.cs b/src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/Equality/Equality.Equals.Object.cs index 77a204fb..70e01b3c 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/Equality/Equality.Equals.Object.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/Equality/Equality.Equals.Object.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/Equality/Equality.Equals.Other.cs b/src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/Equality/Equality.Equals.Other.cs index 581adc69..708bb5cf 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/Equality/Equality.Equals.Other.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/Equality/Equality.Equals.Other.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/Equality/Equality.Equals.Static.cs b/src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/Equality/Equality.Equals.Static.cs index 4bf585b7..ca7cae41 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/Equality/Equality.Equals.Static.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/Equality/Equality.Equals.Static.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/Equality/Equality.GetHashCode.cs b/src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/Equality/Equality.GetHashCode.cs index e02608e7..6a44538c 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/Equality/Equality.GetHashCode.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/Equality/Equality.GetHashCode.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/Equality/Equality.Operator.Equality.cs b/src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/Equality/Equality.Operator.Equality.cs index 28ed897a..60f652fc 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/Equality/Equality.Operator.Equality.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/Equality/Equality.Operator.Equality.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/Equality/Equality.Operator.Inequality.cs b/src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/Equality/Equality.Operator.Inequality.cs index cea7aca2..fce0a41e 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/Equality/Equality.Operator.Inequality.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/Equality/Equality.Operator.Inequality.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; diff --git a/src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/ToString/ToString.cs b/src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/ToString/ToString.cs index d27fffe6..0f1fc843 100644 --- a/src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/ToString/ToString.cs +++ b/src/core-taggeds-result/Result.Tests.Old/Test.SuccessBuilder/ToString/ToString.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using System.Collections.Generic; From 87f2e93e88874e5301510ec93f949176b385ca44 Mon Sep 17 00:00:00 2001 From: Andrei Sergeev Date: Tue, 6 Feb 2024 23:08:42 +0400 Subject: [PATCH 6/7] Setup versions --- src/core-taggeds/Taggeds/Taggeds.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core-taggeds/Taggeds/Taggeds.csproj b/src/core-taggeds/Taggeds/Taggeds.csproj index 2afe1d18..a5e0e9bc 100644 --- a/src/core-taggeds/Taggeds/Taggeds.csproj +++ b/src/core-taggeds/Taggeds/Taggeds.csproj @@ -17,7 +17,7 @@ PrimeFuncPack Core.Taggeds is a core pack for .NET consisting of fundamental tagged types targeted for use in functional programming: Optional and Result monads, Tagged Union, as well as the convert extensions. System PrimeFuncPack.Core.Taggeds - 2.2.0-preview.8 + 2.2.0-preview.9 @@ -34,7 +34,7 @@ - + From 3bad6e3edc2decd50aed4579ffb481b16a8889c8 Mon Sep 17 00:00:00 2001 From: Andrei Sergeev Date: Tue, 6 Feb 2024 23:28:12 +0400 Subject: [PATCH 7/7] actions/setup-dotnet@v4 --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 87f22dd3..9ff1bfce 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -19,7 +19,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Setup .NET - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v4 with: dotnet-version: | 6.0.x