diff --git a/src/primitives-linq/Primitives.Linq.Tests/TestData/ObjectTestData.cs b/src/primitives-linq/Primitives.Linq.Tests/TestData/ObjectTestData.cs index 2b8e460..262e6bd 100644 --- a/src/primitives-linq/Primitives.Linq.Tests/TestData/ObjectTestData.cs +++ b/src/primitives-linq/Primitives.Linq.Tests/TestData/ObjectTestData.cs @@ -1,6 +1,4 @@ -#nullable enable - -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/primitives-linq/Primitives.Linq.Tests/YieldExtensionsTest/YieldExtensionsTest.Single.cs b/src/primitives-linq/Primitives.Linq.Tests/YieldExtensionsTest/YieldExtensionsTest.Single.cs index 342bee7..a438cb4 100644 --- a/src/primitives-linq/Primitives.Linq.Tests/YieldExtensionsTest/YieldExtensionsTest.Single.cs +++ b/src/primitives-linq/Primitives.Linq.Tests/YieldExtensionsTest/YieldExtensionsTest.Single.cs @@ -1,6 +1,4 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using System.Linq; namespace PrimeFuncPack.Primitives.Tests; diff --git a/src/primitives-linq/Primitives.Linq.Tests/YieldExtensionsTest/YieldExtensionsTest.cs b/src/primitives-linq/Primitives.Linq.Tests/YieldExtensionsTest/YieldExtensionsTest.cs index ced3667..6719617 100644 --- a/src/primitives-linq/Primitives.Linq.Tests/YieldExtensionsTest/YieldExtensionsTest.cs +++ b/src/primitives-linq/Primitives.Linq.Tests/YieldExtensionsTest/YieldExtensionsTest.cs @@ -1,6 +1,4 @@ -#nullable enable - -namespace PrimeFuncPack.Primitives.Tests; +namespace PrimeFuncPack.Primitives.Tests; public sealed partial class YieldExtensionsTest { diff --git a/src/primitives-linq/Primitives.Linq.Tests/YielderTest/YielderTest.Empty.cs b/src/primitives-linq/Primitives.Linq.Tests/YielderTest/YielderTest.Empty.cs index 54d2542..f4e05a1 100644 --- a/src/primitives-linq/Primitives.Linq.Tests/YielderTest/YielderTest.Empty.cs +++ b/src/primitives-linq/Primitives.Linq.Tests/YielderTest/YielderTest.Empty.cs @@ -1,6 +1,4 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using PrimeFuncPack.UnitTest; using System.Linq; diff --git a/src/primitives-linq/Primitives.Linq.Tests/YielderTest/YielderTest.Single.cs b/src/primitives-linq/Primitives.Linq.Tests/YielderTest/YielderTest.Single.cs index c252038..04b47f2 100644 --- a/src/primitives-linq/Primitives.Linq.Tests/YielderTest/YielderTest.Single.cs +++ b/src/primitives-linq/Primitives.Linq.Tests/YielderTest/YielderTest.Single.cs @@ -1,6 +1,4 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using System.Linq; namespace PrimeFuncPack.Primitives.Tests; diff --git a/src/primitives-linq/Primitives.Linq.Tests/YielderTest/YielderTest.cs b/src/primitives-linq/Primitives.Linq.Tests/YielderTest/YielderTest.cs index a34a925..c33c00c 100644 --- a/src/primitives-linq/Primitives.Linq.Tests/YielderTest/YielderTest.cs +++ b/src/primitives-linq/Primitives.Linq.Tests/YielderTest/YielderTest.cs @@ -1,6 +1,4 @@ -#nullable enable - -namespace PrimeFuncPack.Primitives.Tests; +namespace PrimeFuncPack.Primitives.Tests; public sealed partial class YielderTest { diff --git a/src/primitives-linq/Primitives.Linq.Tests/YielderTypedTest/YielderTypedTest.Empty.cs b/src/primitives-linq/Primitives.Linq.Tests/YielderTypedTest/YielderTypedTest.Empty.cs index 8a8f837..3e8cbc6 100644 --- a/src/primitives-linq/Primitives.Linq.Tests/YielderTypedTest/YielderTypedTest.Empty.cs +++ b/src/primitives-linq/Primitives.Linq.Tests/YielderTypedTest/YielderTypedTest.Empty.cs @@ -1,6 +1,4 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using PrimeFuncPack.UnitTest; using System.Linq; diff --git a/src/primitives-linq/Primitives.Linq.Tests/YielderTypedTest/YielderTypedTest.Single.cs b/src/primitives-linq/Primitives.Linq.Tests/YielderTypedTest/YielderTypedTest.Single.cs index 749314d..228c748 100644 --- a/src/primitives-linq/Primitives.Linq.Tests/YielderTypedTest/YielderTypedTest.Single.cs +++ b/src/primitives-linq/Primitives.Linq.Tests/YielderTypedTest/YielderTypedTest.Single.cs @@ -1,6 +1,4 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using System.Linq; namespace PrimeFuncPack.Primitives.Tests; diff --git a/src/primitives-linq/Primitives.Linq.Tests/YielderTypedTest/YielderTypedTest.cs b/src/primitives-linq/Primitives.Linq.Tests/YielderTypedTest/YielderTypedTest.cs index 4dd28f1..9be984a 100644 --- a/src/primitives-linq/Primitives.Linq.Tests/YielderTypedTest/YielderTypedTest.cs +++ b/src/primitives-linq/Primitives.Linq.Tests/YielderTypedTest/YielderTypedTest.cs @@ -1,6 +1,4 @@ -#nullable enable - -namespace PrimeFuncPack.Primitives.Tests; +namespace PrimeFuncPack.Primitives.Tests; public sealed partial class YielderTypedTest { diff --git a/src/primitives-linq/Primitives.Linq/Primitives.Linq.csproj b/src/primitives-linq/Primitives.Linq/Primitives.Linq.csproj index 3f8fecf..6f233c1 100644 --- a/src/primitives-linq/Primitives.Linq/Primitives.Linq.csproj +++ b/src/primitives-linq/Primitives.Linq/Primitives.Linq.csproj @@ -17,7 +17,7 @@ PrimeFuncPack Primitives.Linq is a core library for .NET consisting of useful extensions making work with Linq easier. System PrimeFuncPack.Primitives.Linq - 2.0.0-rc.1.0.0 + 2.0.0-rc.1.0.1 diff --git a/src/primitives-linq/Primitives.Linq/YieldExtensions.cs b/src/primitives-linq/Primitives.Linq/YieldExtensions.cs index 36b9ad8..bad6d80 100644 --- a/src/primitives-linq/Primitives.Linq/YieldExtensions.cs +++ b/src/primitives-linq/Primitives.Linq/YieldExtensions.cs @@ -1,6 +1,4 @@ -#nullable enable - -using System.Collections.Generic; +using System.Collections.Generic; using System.Runtime.CompilerServices; namespace System.Linq; diff --git a/src/primitives-linq/Primitives.Linq/Yielder.T.cs b/src/primitives-linq/Primitives.Linq/Yielder.T.cs index 64da11e..70b8011 100644 --- a/src/primitives-linq/Primitives.Linq/Yielder.T.cs +++ b/src/primitives-linq/Primitives.Linq/Yielder.T.cs @@ -1,6 +1,4 @@ -#nullable enable - -using System.Collections.Generic; +using System.Collections.Generic; namespace System.Linq; diff --git a/src/primitives-linq/Primitives.Linq/Yielder.cs b/src/primitives-linq/Primitives.Linq/Yielder.cs index bc14c2b..6bdf9d0 100644 --- a/src/primitives-linq/Primitives.Linq/Yielder.cs +++ b/src/primitives-linq/Primitives.Linq/Yielder.cs @@ -1,6 +1,4 @@ -#nullable enable - -using System.Collections.Generic; +using System.Collections.Generic; namespace System.Linq; diff --git a/src/primitives-pipeline/Primitives.Pipeline.Tests/Pipeline.Tests/Pipe.cs b/src/primitives-pipeline/Primitives.Pipeline.Tests/Pipeline.Tests/Pipe.cs index f716283..c4040c7 100644 --- a/src/primitives-pipeline/Primitives.Pipeline.Tests/Pipeline.Tests/Pipe.cs +++ b/src/primitives-pipeline/Primitives.Pipeline.Tests/Pipeline.Tests/Pipe.cs @@ -1,6 +1,4 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using System; namespace PrimeFuncPack.Primitives.Tests; diff --git a/src/primitives-pipeline/Primitives.Pipeline.Tests/Pipeline.Tests/Tests.cs b/src/primitives-pipeline/Primitives.Pipeline.Tests/Pipeline.Tests/Tests.cs index e6ba452..236b2f5 100644 --- a/src/primitives-pipeline/Primitives.Pipeline.Tests/Pipeline.Tests/Tests.cs +++ b/src/primitives-pipeline/Primitives.Pipeline.Tests/Pipeline.Tests/Tests.cs @@ -1,6 +1,4 @@ -#nullable enable - -using System; +using System; using System.Collections.Generic; using System.Linq; diff --git a/src/primitives-pipeline/Primitives.Pipeline.Tests/PipelineExtensions.Tests/Pipe.cs b/src/primitives-pipeline/Primitives.Pipeline.Tests/PipelineExtensions.Tests/Pipe.cs index db0585f..a4b3de0 100644 --- a/src/primitives-pipeline/Primitives.Pipeline.Tests/PipelineExtensions.Tests/Pipe.cs +++ b/src/primitives-pipeline/Primitives.Pipeline.Tests/PipelineExtensions.Tests/Pipe.cs @@ -1,6 +1,4 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/primitives-pipeline/Primitives.Pipeline.Tests/PipelineExtensions.Tests/Tests.cs b/src/primitives-pipeline/Primitives.Pipeline.Tests/PipelineExtensions.Tests/Tests.cs index 9334a70..da14b3d 100644 --- a/src/primitives-pipeline/Primitives.Pipeline.Tests/PipelineExtensions.Tests/Tests.cs +++ b/src/primitives-pipeline/Primitives.Pipeline.Tests/PipelineExtensions.Tests/Tests.cs @@ -1,6 +1,4 @@ -#nullable enable - -using System; +using System; using System.Collections.Generic; using System.Linq; diff --git a/src/primitives-pipeline/Primitives.Pipeline/Pipeline.cs b/src/primitives-pipeline/Primitives.Pipeline/Pipeline.cs index 4df41ec..fff6c7c 100644 --- a/src/primitives-pipeline/Primitives.Pipeline/Pipeline.cs +++ b/src/primitives-pipeline/Primitives.Pipeline/Pipeline.cs @@ -1,6 +1,4 @@ -#nullable enable - -using System.Runtime.CompilerServices; +using System.Runtime.CompilerServices; namespace System; diff --git a/src/primitives-pipeline/Primitives.Pipeline/PipelineExtensions.cs b/src/primitives-pipeline/Primitives.Pipeline/PipelineExtensions.cs index 1a91d28..aa41dd9 100644 --- a/src/primitives-pipeline/Primitives.Pipeline/PipelineExtensions.cs +++ b/src/primitives-pipeline/Primitives.Pipeline/PipelineExtensions.cs @@ -1,6 +1,4 @@ -#nullable enable - -using System.Runtime.CompilerServices; +using System.Runtime.CompilerServices; namespace System; diff --git a/src/primitives-pipeline/Primitives.Pipeline/Primitives.Pipeline.csproj b/src/primitives-pipeline/Primitives.Pipeline/Primitives.Pipeline.csproj index 0c3e27d..13b1367 100644 --- a/src/primitives-pipeline/Primitives.Pipeline/Primitives.Pipeline.csproj +++ b/src/primitives-pipeline/Primitives.Pipeline/Primitives.Pipeline.csproj @@ -17,7 +17,7 @@ PrimeFuncPack Primitives.Pipeline is a core library for .NET consisting of useful extensions making work with functional pipelines easier. System PrimeFuncPack.Primitives.Pipeline - 2.0.0-rc.1.0.0 + 2.0.0-rc.1.0.1 diff --git a/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNotNullOrEmpty.cs b/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNotNullOrEmpty.cs index 0b44746..e294690 100644 --- a/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNotNullOrEmpty.cs +++ b/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNotNullOrEmpty.cs @@ -1,6 +1,4 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNotNullOrWhiteSpace.cs b/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNotNullOrWhiteSpace.cs index ac73769..9062adf 100644 --- a/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNotNullOrWhiteSpace.cs +++ b/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNotNullOrWhiteSpace.cs @@ -1,6 +1,4 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNotNull_Anonymous.cs b/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNotNull_Anonymous.cs index 5da9dea..8e8b39d 100644 --- a/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNotNull_Anonymous.cs +++ b/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNotNull_Anonymous.cs @@ -1,6 +1,4 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNotNull_NonnullableStruct.cs b/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNotNull_NonnullableStruct.cs index ee2d8ec..e8e2141 100644 --- a/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNotNull_NonnullableStruct.cs +++ b/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNotNull_NonnullableStruct.cs @@ -1,6 +1,4 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using System; namespace PrimeFuncPack.Primitives.Tests; diff --git a/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNotNull_NullableStruct.cs b/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNotNull_NullableStruct.cs index 207b103..74afe9a 100644 --- a/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNotNull_NullableStruct.cs +++ b/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNotNull_NullableStruct.cs @@ -1,6 +1,4 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using System; namespace PrimeFuncPack.Primitives.Tests; diff --git a/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNotNull_RefType.cs b/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNotNull_RefType.cs index 5a092ba..eeb9e8f 100644 --- a/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNotNull_RefType.cs +++ b/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNotNull_RefType.cs @@ -1,6 +1,4 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNotNull_String.cs b/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNotNull_String.cs index ac606cb..e1e4131 100644 --- a/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNotNull_String.cs +++ b/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNotNull_String.cs @@ -1,6 +1,4 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; diff --git a/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNullOrEmpty.cs b/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNullOrEmpty.cs index 74cf3c5..a753045 100644 --- a/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNullOrEmpty.cs +++ b/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNullOrEmpty.cs @@ -1,6 +1,4 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNullOrWhiteSpace.cs b/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNullOrWhiteSpace.cs index 4f3cae4..84cafe4 100644 --- a/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNullOrWhiteSpace.cs +++ b/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNullOrWhiteSpace.cs @@ -1,6 +1,4 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNull_Anonymous.cs b/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNull_Anonymous.cs index c15d238..c8277e0 100644 --- a/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNull_Anonymous.cs +++ b/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNull_Anonymous.cs @@ -1,6 +1,4 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNull_Nonnullable.cs b/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNull_Nonnullable.cs index bf0672d..c35ffa3 100644 --- a/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNull_Nonnullable.cs +++ b/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNull_Nonnullable.cs @@ -1,6 +1,4 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using System; namespace PrimeFuncPack.Primitives.Tests; diff --git a/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNull_NullableStruct.cs b/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNull_NullableStruct.cs index 8be4d54..7fa1c41 100644 --- a/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNull_NullableStruct.cs +++ b/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNull_NullableStruct.cs @@ -1,6 +1,4 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using System; namespace PrimeFuncPack.Primitives.Tests; diff --git a/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNull_RefType.cs b/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNull_RefType.cs index faa9dbf..33e1fed 100644 --- a/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNull_RefType.cs +++ b/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNull_RefType.cs @@ -1,6 +1,4 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNull_String.cs b/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNull_String.cs index 933fff3..ad27241 100644 --- a/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNull_String.cs +++ b/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/IsNull_String.cs @@ -1,6 +1,4 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; diff --git a/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/Tests.cs b/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/Tests.cs index b90daf6..8a854a9 100644 --- a/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/Tests.cs +++ b/src/primitives-predicates/Primitives.Predicates.Tests/PredicateExtensions.Tests/Tests.cs @@ -1,6 +1,4 @@ -#nullable enable - -namespace PrimeFuncPack.Primitives.Tests; +namespace PrimeFuncPack.Primitives.Tests; public sealed partial class PredicateExtensionsTests { diff --git a/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNotNullOrEmpty.cs b/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNotNullOrEmpty.cs index d6492a8..5f000a3 100644 --- a/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNotNullOrEmpty.cs +++ b/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNotNullOrEmpty.cs @@ -1,40 +1,37 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using System; using static PrimeFuncPack.UnitTest.TestData; -namespace PrimeFuncPack.Primitives.Tests +namespace PrimeFuncPack.Primitives.Tests; + +partial class PredicatesTests { - partial class PredicatesTests + [Test] + public void IsNotNullOrEmpty_SourceIsNull_ExpectFalse() { - [Test] - public void IsNotNullOrEmpty_SourceIsNull_ExpectFalse() - { - string? source = null; + string? source = null; - var actual = Predicates.IsNotNullOrEmpty(source); - Assert.False(actual); - } + var actual = Predicates.IsNotNullOrEmpty(source); + Assert.False(actual); + } - [Test] - public void IsNotNullOrEmpty_SourceIsEmpty_ExpectFalse() - { - string source = string.Empty; + [Test] + public void IsNotNullOrEmpty_SourceIsEmpty_ExpectFalse() + { + string source = string.Empty; - var actual = Predicates.IsNotNullOrEmpty(source); - Assert.False(actual); - } + var actual = Predicates.IsNotNullOrEmpty(source); + Assert.False(actual); + } - [Test] - [TestCase(WhiteSpaceString)] - [TestCase(TabString)] - [TestCase(SomeString)] - public void IsNotNullOrEmpty_SourceIsNotEmpty_ExpectTrue( - string source) - { - var actual = Predicates.IsNotNullOrEmpty(source); - Assert.True(actual); - } + [Test] + [TestCase(WhiteSpaceString)] + [TestCase(TabString)] + [TestCase(SomeString)] + public void IsNotNullOrEmpty_SourceIsNotEmpty_ExpectTrue( + string source) + { + var actual = Predicates.IsNotNullOrEmpty(source); + Assert.True(actual); } } diff --git a/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNotNullOrWhiteSpace.cs b/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNotNullOrWhiteSpace.cs index 65678d6..801b828 100644 --- a/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNotNullOrWhiteSpace.cs +++ b/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNotNullOrWhiteSpace.cs @@ -1,49 +1,46 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using System; using static PrimeFuncPack.UnitTest.TestData; -namespace PrimeFuncPack.Primitives.Tests +namespace PrimeFuncPack.Primitives.Tests; + +partial class PredicatesTests { - partial class PredicatesTests + [Test] + public void IsNotNullOrWhiteSpace_SourceIsNull_ExpectFalse() + { + string? source = null; + + var actual = Predicates.IsNotNullOrWhiteSpace(source); + Assert.False(actual); + } + + [Test] + public void IsNotNullOrWhiteSpace_SourceIsEmpty_ExpectFalse() + { + string source = string.Empty; + + var actual = Predicates.IsNotNullOrWhiteSpace(source); + Assert.False(actual); + } + + [Test] + [TestCase(WhiteSpaceString)] + [TestCase(ThreeWhiteSpacesString)] + [TestCase(TabString)] + public void IsNotNullOrWhiteSpace_SourceIsWhiteSpace_ExpectFalse( + string source) { - [Test] - public void IsNotNullOrWhiteSpace_SourceIsNull_ExpectFalse() - { - string? source = null; - - var actual = Predicates.IsNotNullOrWhiteSpace(source); - Assert.False(actual); - } - - [Test] - public void IsNotNullOrWhiteSpace_SourceIsEmpty_ExpectFalse() - { - string source = string.Empty; - - var actual = Predicates.IsNotNullOrWhiteSpace(source); - Assert.False(actual); - } - - [Test] - [TestCase(WhiteSpaceString)] - [TestCase(ThreeWhiteSpacesString)] - [TestCase(TabString)] - public void IsNotNullOrWhiteSpace_SourceIsWhiteSpace_ExpectFalse( - string source) - { - var actual = Predicates.IsNotNullOrWhiteSpace(source); - Assert.False(actual); - } - - [Test] - public void IsNotNullOrWhiteSpace_SourceIsNotWhiteSpace_ExpectTrue() - { - var source = SomeString; - - var actual = Predicates.IsNotNullOrWhiteSpace(source); - Assert.True(actual); - } + var actual = Predicates.IsNotNullOrWhiteSpace(source); + Assert.False(actual); + } + + [Test] + public void IsNotNullOrWhiteSpace_SourceIsNotWhiteSpace_ExpectTrue() + { + var source = SomeString; + + var actual = Predicates.IsNotNullOrWhiteSpace(source); + Assert.True(actual); } } diff --git a/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNotNull_Anonymous.cs b/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNotNull_Anonymous.cs index 4cf75e0..ee7b4a5 100644 --- a/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNotNull_Anonymous.cs +++ b/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNotNull_Anonymous.cs @@ -1,23 +1,20 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using System; using static PrimeFuncPack.UnitTest.TestData; -namespace PrimeFuncPack.Primitives.Tests +namespace PrimeFuncPack.Primitives.Tests; + +public sealed partial class PredicatesTests { - public sealed partial class PredicatesTests + [Test] + public void IsNotNull_AnonymousValueIsNotNull_ExpectTrue() { - [Test] - public void IsNotNull_AnonymousValueIsNotNull_ExpectTrue() + var source = new { - var source = new - { - Text = SomeTextStructType - }; + Text = SomeTextStructType + }; - var actual = Predicates.IsNotNull(source); - Assert.True(actual); - } + var actual = Predicates.IsNotNull(source); + Assert.True(actual); } } diff --git a/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNotNull_NonnullableStruct.cs b/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNotNull_NonnullableStruct.cs index 720cea3..036362b 100644 --- a/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNotNull_NonnullableStruct.cs +++ b/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNotNull_NonnullableStruct.cs @@ -1,22 +1,19 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; -namespace PrimeFuncPack.Primitives.Tests +namespace PrimeFuncPack.Primitives.Tests; + +public sealed partial class PredicatesTests { - public sealed partial class PredicatesTests + // Test both some specific cases + [Test] + [TestCase(TestData.MinusOne)] + [TestCase(TestData.Zero)] + [TestCase(TestData.One)] + public void IsNotNull_NonnullableStruct_ExpectTrue(int source) { - // Test both some specific cases - [Test] - [TestCase(TestData.MinusOne)] - [TestCase(TestData.Zero)] - [TestCase(TestData.One)] - public void IsNotNull_NonnullableStruct_ExpectTrue(int source) - { - var actual = Predicates.IsNotNull(source); - Assert.True(actual); - } + var actual = Predicates.IsNotNull(source); + Assert.True(actual); } } diff --git a/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNotNull_NullableStruct.cs b/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNotNull_NullableStruct.cs index 2b62074..86509d1 100644 --- a/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNotNull_NullableStruct.cs +++ b/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNotNull_NullableStruct.cs @@ -1,51 +1,48 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; -namespace PrimeFuncPack.Primitives.Tests +namespace PrimeFuncPack.Primitives.Tests; + +public sealed partial class PredicatesTests { - public sealed partial class PredicatesTests + [Test] + public void IsNotNull_NullableStructIsNull_CallStructOverload_ExpectFalse() { - [Test] - public void IsNotNull_NullableStructIsNull_CallStructOverload_ExpectFalse() - { - int? source = null; + int? source = null; - var actual = Predicates.IsNotNull(source); - Assert.False(actual); - } + var actual = Predicates.IsNotNull(source); + Assert.False(actual); + } - [Test] - public void IsNotNull_NullableStructIsNull_CallObjectOverload_ExpectFalse() - { - int? source = null; + [Test] + public void IsNotNull_NullableStructIsNull_CallObjectOverload_ExpectFalse() + { + int? source = null; - var actual = Predicates.IsNotNull(source); - Assert.False(actual); - } + var actual = Predicates.IsNotNull(source); + Assert.False(actual); + } - // Test both some specific cases - [Test] - [TestCase(TestData.MinusOne)] - [TestCase(TestData.Zero)] - [TestCase(TestData.One)] - public void IsNotNull_NullableStructIsNotNull_CallStructOverload_ExpectTrue(int? source) - { - var actual = Predicates.IsNotNull(source); - Assert.True(actual); - } + // Test both some specific cases + [Test] + [TestCase(TestData.MinusOne)] + [TestCase(TestData.Zero)] + [TestCase(TestData.One)] + public void IsNotNull_NullableStructIsNotNull_CallStructOverload_ExpectTrue(int? source) + { + var actual = Predicates.IsNotNull(source); + Assert.True(actual); + } - // Test both some specific cases - [Test] - [TestCase(TestData.MinusOne)] - [TestCase(TestData.Zero)] - [TestCase(TestData.One)] - public void IsNotNull_NullableStructIsNotNull_CallObjectOverload_ExpectTrue(int? source) - { - var actual = Predicates.IsNotNull(source); - Assert.True(actual); - } + // Test both some specific cases + [Test] + [TestCase(TestData.MinusOne)] + [TestCase(TestData.Zero)] + [TestCase(TestData.One)] + public void IsNotNull_NullableStructIsNotNull_CallObjectOverload_ExpectTrue(int? source) + { + var actual = Predicates.IsNotNull(source); + Assert.True(actual); } } diff --git a/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNotNull_RefType.cs b/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNotNull_RefType.cs index 8f3234c..6b2f378 100644 --- a/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNotNull_RefType.cs +++ b/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNotNull_RefType.cs @@ -1,29 +1,26 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using System; using static PrimeFuncPack.UnitTest.TestData; -namespace PrimeFuncPack.Primitives.Tests +namespace PrimeFuncPack.Primitives.Tests; + +public sealed partial class PredicatesTests { - public sealed partial class PredicatesTests + [Test] + public void IsNotNull_RefValueIsNull_ExpectFalse() { - [Test] - public void IsNotNull_RefValueIsNull_ExpectFalse() - { - object source = null!; + object source = null!; - var actual = Predicates.IsNotNull(source); - Assert.False(actual); - } + var actual = Predicates.IsNotNull(source); + Assert.False(actual); + } - [Test] - public void IsNotNull_RefValueIsNotNull_ExpectTrue() - { - var source = PlusFifteenIdRefType; + [Test] + public void IsNotNull_RefValueIsNotNull_ExpectTrue() + { + var source = PlusFifteenIdRefType; - var actual = Predicates.IsNotNull(source); - Assert.True(actual); - } + var actual = Predicates.IsNotNull(source); + Assert.True(actual); } } diff --git a/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNotNull_String.cs b/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNotNull_String.cs index 6754c00..d7b0e05 100644 --- a/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNotNull_String.cs +++ b/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNotNull_String.cs @@ -1,31 +1,28 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; -namespace PrimeFuncPack.Primitives.Tests +namespace PrimeFuncPack.Primitives.Tests; + +public sealed partial class PredicatesTests { - public sealed partial class PredicatesTests + [Test] + public void IsNotNull_StringIsNull_ExpectFalse() { - [Test] - public void IsNotNull_StringIsNull_ExpectFalse() - { - string source = null!; + string source = null!; - var actual = Predicates.IsNotNull(source); - Assert.False(actual); - } + var actual = Predicates.IsNotNull(source); + Assert.False(actual); + } - [Test] - [TestCase(TestData.EmptyString)] - [TestCase(TestData.WhiteSpaceString)] - [TestCase(TestData.TabString)] - [TestCase(TestData.SomeString)] - public void IsNotNull_StringIsNotNull_ExpectTrue(string? source) - { - var actual = Predicates.IsNotNull(source); - Assert.True(actual); - } + [Test] + [TestCase(TestData.EmptyString)] + [TestCase(TestData.WhiteSpaceString)] + [TestCase(TestData.TabString)] + [TestCase(TestData.SomeString)] + public void IsNotNull_StringIsNotNull_ExpectTrue(string? source) + { + var actual = Predicates.IsNotNull(source); + Assert.True(actual); } } diff --git a/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNullOrEmpty.cs b/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNullOrEmpty.cs index fdd345e..b68e0bc 100644 --- a/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNullOrEmpty.cs +++ b/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNullOrEmpty.cs @@ -1,40 +1,37 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using System; using static PrimeFuncPack.UnitTest.TestData; -namespace PrimeFuncPack.Primitives.Tests +namespace PrimeFuncPack.Primitives.Tests; + +partial class PredicatesTests { - partial class PredicatesTests + [Test] + public void IsNullOrEmpty_SourceIsNull_ExpectTrue() { - [Test] - public void IsNullOrEmpty_SourceIsNull_ExpectTrue() - { - string? source = null; + string? source = null; - var actual = Predicates.IsNullOrEmpty(source); - Assert.True(actual); - } + var actual = Predicates.IsNullOrEmpty(source); + Assert.True(actual); + } - [Test] - public void IsNullOrEmpty_SourceIsEmpty_ExpectTrue() - { - string source = string.Empty; + [Test] + public void IsNullOrEmpty_SourceIsEmpty_ExpectTrue() + { + string source = string.Empty; - var actual = Predicates.IsNullOrEmpty(source); - Assert.True(actual); - } + var actual = Predicates.IsNullOrEmpty(source); + Assert.True(actual); + } - [Test] - [TestCase(WhiteSpaceString)] - [TestCase(TabString)] - [TestCase(SomeString)] - public void IsNullOrEmpty_SourceIsNotEmpty_ExpectFalse( - string source) - { - var actual = Predicates.IsNullOrEmpty(source); - Assert.False(actual); - } + [Test] + [TestCase(WhiteSpaceString)] + [TestCase(TabString)] + [TestCase(SomeString)] + public void IsNullOrEmpty_SourceIsNotEmpty_ExpectFalse( + string source) + { + var actual = Predicates.IsNullOrEmpty(source); + Assert.False(actual); } } diff --git a/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNullOrWhiteSpace.cs b/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNullOrWhiteSpace.cs index 8282b7e..282c8ec 100644 --- a/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNullOrWhiteSpace.cs +++ b/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNullOrWhiteSpace.cs @@ -1,49 +1,46 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using System; using static PrimeFuncPack.UnitTest.TestData; -namespace PrimeFuncPack.Primitives.Tests +namespace PrimeFuncPack.Primitives.Tests; + +partial class PredicatesTests { - partial class PredicatesTests + [Test] + public void IsNullOrWhiteSpace_SourceIsNull_ExpectTrue() + { + string? source = null; + + var actual = Predicates.IsNullOrWhiteSpace(source); + Assert.True(actual); + } + + [Test] + public void IsNullOrWhiteSpace_SourceIsEmpty_ExpectTrue() + { + string source = string.Empty; + + var actual = Predicates.IsNullOrWhiteSpace(source); + Assert.True(actual); + } + + [Test] + [TestCase(WhiteSpaceString)] + [TestCase(ThreeWhiteSpacesString)] + [TestCase(TabString)] + public void IsNullOrWhiteSpace_SourceIsWhiteSpace_ExpectTrue( + string source) { - [Test] - public void IsNullOrWhiteSpace_SourceIsNull_ExpectTrue() - { - string? source = null; - - var actual = Predicates.IsNullOrWhiteSpace(source); - Assert.True(actual); - } - - [Test] - public void IsNullOrWhiteSpace_SourceIsEmpty_ExpectTrue() - { - string source = string.Empty; - - var actual = Predicates.IsNullOrWhiteSpace(source); - Assert.True(actual); - } - - [Test] - [TestCase(WhiteSpaceString)] - [TestCase(ThreeWhiteSpacesString)] - [TestCase(TabString)] - public void IsNullOrWhiteSpace_SourceIsWhiteSpace_ExpectTrue( - string source) - { - var actual = Predicates.IsNullOrWhiteSpace(source); - Assert.True(actual); - } - - [Test] - public void IsNullOrWhiteSpace_SourceIsNotWhiteSpace_ExpectFalse() - { - var source = SomeString; - - var actual = Predicates.IsNullOrWhiteSpace(source); - Assert.False(actual); - } + var actual = Predicates.IsNullOrWhiteSpace(source); + Assert.True(actual); + } + + [Test] + public void IsNullOrWhiteSpace_SourceIsNotWhiteSpace_ExpectFalse() + { + var source = SomeString; + + var actual = Predicates.IsNullOrWhiteSpace(source); + Assert.False(actual); } } diff --git a/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNull_Anonymous.cs b/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNull_Anonymous.cs index 34e404f..83b9d11 100644 --- a/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNull_Anonymous.cs +++ b/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNull_Anonymous.cs @@ -1,23 +1,20 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using System; using static PrimeFuncPack.UnitTest.TestData; -namespace PrimeFuncPack.Primitives.Tests +namespace PrimeFuncPack.Primitives.Tests; + +partial class PredicatesTests { - partial class PredicatesTests + [Test] + public void IsNull_AnonymousValueIsNotNull_ExpectFalse() { - [Test] - public void IsNull_AnonymousValueIsNotNull_ExpectFalse() + var source = new { - var source = new - { - Text = SomeTextStructType - }; + Text = SomeTextStructType + }; - var actual = Predicates.IsNull(source); - Assert.False(actual); - } + var actual = Predicates.IsNull(source); + Assert.False(actual); } } diff --git a/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNull_NonnullableStruct.cs b/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNull_NonnullableStruct.cs index 8afa70f..8fd945f 100644 --- a/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNull_NonnullableStruct.cs +++ b/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNull_NonnullableStruct.cs @@ -1,22 +1,19 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; -namespace PrimeFuncPack.Primitives.Tests +namespace PrimeFuncPack.Primitives.Tests; + +partial class PredicatesTests { - partial class PredicatesTests + // Test both some specific cases + [Test] + [TestCase(TestData.MinusOne)] + [TestCase(TestData.Zero)] + [TestCase(TestData.One)] + public void IsNull_NonnullableStruct_ExpectFalse(int source) { - // Test both some specific cases - [Test] - [TestCase(TestData.MinusOne)] - [TestCase(TestData.Zero)] - [TestCase(TestData.One)] - public void IsNull_NonnullableStruct_ExpectFalse(int source) - { - var actual = Predicates.IsNull(source); - Assert.False(actual); - } + var actual = Predicates.IsNull(source); + Assert.False(actual); } } diff --git a/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNull_NullableStruct.cs b/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNull_NullableStruct.cs index 020b772..25adb43 100644 --- a/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNull_NullableStruct.cs +++ b/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNull_NullableStruct.cs @@ -1,51 +1,48 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; -namespace PrimeFuncPack.Primitives.Tests +namespace PrimeFuncPack.Primitives.Tests; + +partial class PredicatesTests { - partial class PredicatesTests + [Test] + public void IsNull_NullableStructIsNull_CallStructOverload_ExpectTrue() { - [Test] - public void IsNull_NullableStructIsNull_CallStructOverload_ExpectTrue() - { - int? source = null; + int? source = null; - var actual = Predicates.IsNull(source); - Assert.True(actual); - } + var actual = Predicates.IsNull(source); + Assert.True(actual); + } - [Test] - public void IsNull_NullableStructIsNull_CallObjectOverload_ExpectTrue() - { - int? source = null; + [Test] + public void IsNull_NullableStructIsNull_CallObjectOverload_ExpectTrue() + { + int? source = null; - var actual = Predicates.IsNull(source); - Assert.True(actual); - } + var actual = Predicates.IsNull(source); + Assert.True(actual); + } - // Test both some specific cases - [Test] - [TestCase(TestData.MinusOne)] - [TestCase(TestData.Zero)] - [TestCase(TestData.One)] - public void IsNull_NullableStructIsNotNull_CallStructOverload_ExpectFalse(int? source) - { - var actual = Predicates.IsNull(source); - Assert.False(actual); - } + // Test both some specific cases + [Test] + [TestCase(TestData.MinusOne)] + [TestCase(TestData.Zero)] + [TestCase(TestData.One)] + public void IsNull_NullableStructIsNotNull_CallStructOverload_ExpectFalse(int? source) + { + var actual = Predicates.IsNull(source); + Assert.False(actual); + } - // Test both some specific cases - [Test] - [TestCase(TestData.MinusOne)] - [TestCase(TestData.Zero)] - [TestCase(TestData.One)] - public void IsNull_NullableStructIsNotNull_CallObjectOverload_ExpectFalse(int? source) - { - var actual = Predicates.IsNull(source); - Assert.False(actual); - } + // Test both some specific cases + [Test] + [TestCase(TestData.MinusOne)] + [TestCase(TestData.Zero)] + [TestCase(TestData.One)] + public void IsNull_NullableStructIsNotNull_CallObjectOverload_ExpectFalse(int? source) + { + var actual = Predicates.IsNull(source); + Assert.False(actual); } } diff --git a/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNull_RefType.cs b/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNull_RefType.cs index 6aa432a..f1b36b9 100644 --- a/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNull_RefType.cs +++ b/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNull_RefType.cs @@ -1,30 +1,27 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; using static PrimeFuncPack.UnitTest.TestData; -namespace PrimeFuncPack.Primitives.Tests +namespace PrimeFuncPack.Primitives.Tests; + +partial class PredicatesTests { - partial class PredicatesTests + [Test] + public void IsNull_RefValueIsNull_ExpectTrue() { - [Test] - public void IsNull_RefValueIsNull_ExpectTrue() - { - RefType source = null!; + RefType source = null!; - var actual = Predicates.IsNull(source); - Assert.True(actual); - } + var actual = Predicates.IsNull(source); + Assert.True(actual); + } - [Test] - public void IsNull_RefValueIsNull_ExpectFalse() - { - var source = MinusFifteenIdRefType; + [Test] + public void IsNull_RefValueIsNull_ExpectFalse() + { + var source = MinusFifteenIdRefType; - var actual = Predicates.IsNull(source); - Assert.False(actual); - } + var actual = Predicates.IsNull(source); + Assert.False(actual); } } diff --git a/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNull_String.cs b/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNull_String.cs index f25843b..ba023d3 100644 --- a/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNull_String.cs +++ b/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/IsNull_String.cs @@ -1,31 +1,28 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using PrimeFuncPack.UnitTest; using System; -namespace PrimeFuncPack.Primitives.Tests +namespace PrimeFuncPack.Primitives.Tests; + +public sealed partial class PredicatesTests { - public sealed partial class PredicatesTests + [Test] + public void IsNull_StringIsNull_ExpectTrue() { - [Test] - public void IsNull_StringIsNull_ExpectTrue() - { - string source = null!; + string source = null!; - var actual = Predicates.IsNull(source); - Assert.True(actual); - } + var actual = Predicates.IsNull(source); + Assert.True(actual); + } - [Test] - [TestCase(TestData.EmptyString)] - [TestCase(TestData.WhiteSpaceString)] - [TestCase(TestData.TabString)] - [TestCase(TestData.SomeString)] - public void IsNull_StringIsNotNull_ExpectFalse(string? source) - { - var actual = Predicates.IsNull(source); - Assert.False(actual); - } + [Test] + [TestCase(TestData.EmptyString)] + [TestCase(TestData.WhiteSpaceString)] + [TestCase(TestData.TabString)] + [TestCase(TestData.SomeString)] + public void IsNull_StringIsNotNull_ExpectFalse(string? source) + { + var actual = Predicates.IsNull(source); + Assert.False(actual); } } diff --git a/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/Tests.cs b/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/Tests.cs index 6c287a4..8c3bdbc 100644 --- a/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/Tests.cs +++ b/src/primitives-predicates/Primitives.Predicates.Tests/Predicates.Tests/Tests.cs @@ -1,8 +1,5 @@ -#nullable enable +namespace PrimeFuncPack.Primitives.Tests; -namespace PrimeFuncPack.Primitives.Tests +public sealed partial class PredicatesTests { - public sealed partial class PredicatesTests - { - } } diff --git a/src/primitives-predicates/Primitives.Predicates/PredicateExtensions/PredicateExtensions.Null.Struct.cs b/src/primitives-predicates/Primitives.Predicates/PredicateExtensions/PredicateExtensions.Null.Struct.cs index 22718e8..c057c11 100644 --- a/src/primitives-predicates/Primitives.Predicates/PredicateExtensions/PredicateExtensions.Null.Struct.cs +++ b/src/primitives-predicates/Primitives.Predicates/PredicateExtensions/PredicateExtensions.Null.Struct.cs @@ -1,6 +1,4 @@ -#nullable enable - -using System.Diagnostics.CodeAnalysis; +using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; namespace System; diff --git a/src/primitives-predicates/Primitives.Predicates/PredicateExtensions/PredicateExtensions.Null.cs b/src/primitives-predicates/Primitives.Predicates/PredicateExtensions/PredicateExtensions.Null.cs index bd2f767..53940b4 100644 --- a/src/primitives-predicates/Primitives.Predicates/PredicateExtensions/PredicateExtensions.Null.cs +++ b/src/primitives-predicates/Primitives.Predicates/PredicateExtensions/PredicateExtensions.Null.cs @@ -1,6 +1,4 @@ -#nullable enable - -using System.Diagnostics.CodeAnalysis; +using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; namespace System; diff --git a/src/primitives-predicates/Primitives.Predicates/PredicateExtensions/PredicateExtensions.NullOrEmpty.cs b/src/primitives-predicates/Primitives.Predicates/PredicateExtensions/PredicateExtensions.NullOrEmpty.cs index 7951ee6..103855e 100644 --- a/src/primitives-predicates/Primitives.Predicates/PredicateExtensions/PredicateExtensions.NullOrEmpty.cs +++ b/src/primitives-predicates/Primitives.Predicates/PredicateExtensions/PredicateExtensions.NullOrEmpty.cs @@ -1,6 +1,4 @@ -#nullable enable - -using System.Diagnostics.CodeAnalysis; +using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; namespace System; diff --git a/src/primitives-predicates/Primitives.Predicates/PredicateExtensions/PredicateExtensions.NullOrWhiteSpace.cs b/src/primitives-predicates/Primitives.Predicates/PredicateExtensions/PredicateExtensions.NullOrWhiteSpace.cs index 8da7a22..824da99 100644 --- a/src/primitives-predicates/Primitives.Predicates/PredicateExtensions/PredicateExtensions.NullOrWhiteSpace.cs +++ b/src/primitives-predicates/Primitives.Predicates/PredicateExtensions/PredicateExtensions.NullOrWhiteSpace.cs @@ -1,6 +1,4 @@ -#nullable enable - -using System.Diagnostics.CodeAnalysis; +using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; namespace System; diff --git a/src/primitives-predicates/Primitives.Predicates/PredicateExtensions/PredicateExtensions.cs b/src/primitives-predicates/Primitives.Predicates/PredicateExtensions/PredicateExtensions.cs index 15e6f92..bf7a579 100644 --- a/src/primitives-predicates/Primitives.Predicates/PredicateExtensions/PredicateExtensions.cs +++ b/src/primitives-predicates/Primitives.Predicates/PredicateExtensions/PredicateExtensions.cs @@ -1,6 +1,4 @@ -#nullable enable - -namespace System; +namespace System; public static partial class PredicateExtensions { diff --git a/src/primitives-predicates/Primitives.Predicates/Predicates/Predicates.Null.Struct.cs b/src/primitives-predicates/Primitives.Predicates/Predicates/Predicates.Null.Struct.cs index 72dbea8..6ae78ff 100644 --- a/src/primitives-predicates/Primitives.Predicates/Predicates/Predicates.Null.Struct.cs +++ b/src/primitives-predicates/Primitives.Predicates/Predicates/Predicates.Null.Struct.cs @@ -1,6 +1,4 @@ -#nullable enable - -using System.Diagnostics.CodeAnalysis; +using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; namespace System; diff --git a/src/primitives-predicates/Primitives.Predicates/Predicates/Predicates.Null.cs b/src/primitives-predicates/Primitives.Predicates/Predicates/Predicates.Null.cs index ef97378..c684380 100644 --- a/src/primitives-predicates/Primitives.Predicates/Predicates/Predicates.Null.cs +++ b/src/primitives-predicates/Primitives.Predicates/Predicates/Predicates.Null.cs @@ -1,6 +1,4 @@ -#nullable enable - -using System.Diagnostics.CodeAnalysis; +using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; namespace System; diff --git a/src/primitives-predicates/Primitives.Predicates/Predicates/Predicates.NullOrEmpty.cs b/src/primitives-predicates/Primitives.Predicates/Predicates/Predicates.NullOrEmpty.cs index 758e144..07e64b4 100644 --- a/src/primitives-predicates/Primitives.Predicates/Predicates/Predicates.NullOrEmpty.cs +++ b/src/primitives-predicates/Primitives.Predicates/Predicates/Predicates.NullOrEmpty.cs @@ -1,6 +1,4 @@ -#nullable enable - -using System.Diagnostics.CodeAnalysis; +using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; namespace System; diff --git a/src/primitives-predicates/Primitives.Predicates/Predicates/Predicates.NullOrWhiteSpace.cs b/src/primitives-predicates/Primitives.Predicates/Predicates/Predicates.NullOrWhiteSpace.cs index 035ef59..f4358c3 100644 --- a/src/primitives-predicates/Primitives.Predicates/Predicates/Predicates.NullOrWhiteSpace.cs +++ b/src/primitives-predicates/Primitives.Predicates/Predicates/Predicates.NullOrWhiteSpace.cs @@ -1,6 +1,4 @@ -#nullable enable - -using System.Diagnostics.CodeAnalysis; +using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; namespace System; diff --git a/src/primitives-predicates/Primitives.Predicates/Predicates/Predicates.cs b/src/primitives-predicates/Primitives.Predicates/Predicates/Predicates.cs index 1999549..da9663d 100644 --- a/src/primitives-predicates/Primitives.Predicates/Predicates/Predicates.cs +++ b/src/primitives-predicates/Primitives.Predicates/Predicates/Predicates.cs @@ -1,6 +1,4 @@ -#nullable enable - -namespace System; +namespace System; public static partial class Predicates { diff --git a/src/primitives-predicates/Primitives.Predicates/Primitives.Predicates.csproj b/src/primitives-predicates/Primitives.Predicates/Primitives.Predicates.csproj index 9be0abb..022f6a3 100644 --- a/src/primitives-predicates/Primitives.Predicates/Primitives.Predicates.csproj +++ b/src/primitives-predicates/Primitives.Predicates/Primitives.Predicates.csproj @@ -17,7 +17,7 @@ PrimeFuncPack Primitives.Predicates is a core library for .NET consisting of useful extensions and predicates making work with the nullable feature easier. System PrimeFuncPack.Primitives.Predicates - 2.0.0-rc.1.0.0 + 2.0.0-rc.1.0.1 diff --git a/src/primitives-strings/Primitives.Strings.Tests/StringExtensions.Tests/OrEmpty.cs b/src/primitives-strings/Primitives.Strings.Tests/StringExtensions.Tests/OrEmpty.cs index 6a114d4..bc050c9 100644 --- a/src/primitives-strings/Primitives.Strings.Tests/StringExtensions.Tests/OrEmpty.cs +++ b/src/primitives-strings/Primitives.Strings.Tests/StringExtensions.Tests/OrEmpty.cs @@ -1,6 +1,4 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/primitives-strings/Primitives.Strings.Tests/StringExtensions.Tests/OrNullIfEmpty.cs b/src/primitives-strings/Primitives.Strings.Tests/StringExtensions.Tests/OrNullIfEmpty.cs index 6ca00b8..0273fc4 100644 --- a/src/primitives-strings/Primitives.Strings.Tests/StringExtensions.Tests/OrNullIfEmpty.cs +++ b/src/primitives-strings/Primitives.Strings.Tests/StringExtensions.Tests/OrNullIfEmpty.cs @@ -1,6 +1,4 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/primitives-strings/Primitives.Strings.Tests/StringExtensions.Tests/OrNullIfWhiteSpace.cs b/src/primitives-strings/Primitives.Strings.Tests/StringExtensions.Tests/OrNullIfWhiteSpace.cs index 729bb50..3bfd20a 100644 --- a/src/primitives-strings/Primitives.Strings.Tests/StringExtensions.Tests/OrNullIfWhiteSpace.cs +++ b/src/primitives-strings/Primitives.Strings.Tests/StringExtensions.Tests/OrNullIfWhiteSpace.cs @@ -1,6 +1,4 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/primitives-strings/Primitives.Strings.Tests/StringExtensions.Tests/Tests.cs b/src/primitives-strings/Primitives.Strings.Tests/StringExtensions.Tests/Tests.cs index bc304a7..6cbe08d 100644 --- a/src/primitives-strings/Primitives.Strings.Tests/StringExtensions.Tests/Tests.cs +++ b/src/primitives-strings/Primitives.Strings.Tests/StringExtensions.Tests/Tests.cs @@ -1,6 +1,4 @@ -#nullable enable - -namespace PrimeFuncPack.Primitives.Tests; +namespace PrimeFuncPack.Primitives.Tests; public sealed partial class StringExtensionsTests { diff --git a/src/primitives-strings/Primitives.Strings.Tests/StringExtensions.Tests/ToStringOrEmpty_Ref.cs b/src/primitives-strings/Primitives.Strings.Tests/StringExtensions.Tests/ToStringOrEmpty_Ref.cs index 2165c87..a5bc877 100644 --- a/src/primitives-strings/Primitives.Strings.Tests/StringExtensions.Tests/ToStringOrEmpty_Ref.cs +++ b/src/primitives-strings/Primitives.Strings.Tests/StringExtensions.Tests/ToStringOrEmpty_Ref.cs @@ -1,6 +1,4 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/primitives-strings/Primitives.Strings.Tests/StringExtensions.Tests/ToStringOrEmpty_StructNullable.cs b/src/primitives-strings/Primitives.Strings.Tests/StringExtensions.Tests/ToStringOrEmpty_StructNullable.cs index 780e1fe..2cc26d7 100644 --- a/src/primitives-strings/Primitives.Strings.Tests/StringExtensions.Tests/ToStringOrEmpty_StructNullable.cs +++ b/src/primitives-strings/Primitives.Strings.Tests/StringExtensions.Tests/ToStringOrEmpty_StructNullable.cs @@ -1,6 +1,4 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/primitives-strings/Primitives.Strings.Tests/Strings.Tests/Empty.cs b/src/primitives-strings/Primitives.Strings.Tests/Strings.Tests/Empty.cs index 14c4382..9fc2a90 100644 --- a/src/primitives-strings/Primitives.Strings.Tests/Strings.Tests/Empty.cs +++ b/src/primitives-strings/Primitives.Strings.Tests/Strings.Tests/Empty.cs @@ -1,6 +1,4 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using System; namespace PrimeFuncPack.Primitives.Tests; diff --git a/src/primitives-strings/Primitives.Strings.Tests/Strings.Tests/OrEmpty.cs b/src/primitives-strings/Primitives.Strings.Tests/Strings.Tests/OrEmpty.cs index cb10f07..9dd8951 100644 --- a/src/primitives-strings/Primitives.Strings.Tests/Strings.Tests/OrEmpty.cs +++ b/src/primitives-strings/Primitives.Strings.Tests/Strings.Tests/OrEmpty.cs @@ -1,6 +1,4 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/primitives-strings/Primitives.Strings.Tests/Strings.Tests/OrNullIfEmpty.cs b/src/primitives-strings/Primitives.Strings.Tests/Strings.Tests/OrNullIfEmpty.cs index d90ade9..6bb4a4d 100644 --- a/src/primitives-strings/Primitives.Strings.Tests/Strings.Tests/OrNullIfEmpty.cs +++ b/src/primitives-strings/Primitives.Strings.Tests/Strings.Tests/OrNullIfEmpty.cs @@ -1,6 +1,4 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/primitives-strings/Primitives.Strings.Tests/Strings.Tests/OrNullIfWhiteSpace.cs b/src/primitives-strings/Primitives.Strings.Tests/Strings.Tests/OrNullIfWhiteSpace.cs index bed7abf..290e8ea 100644 --- a/src/primitives-strings/Primitives.Strings.Tests/Strings.Tests/OrNullIfWhiteSpace.cs +++ b/src/primitives-strings/Primitives.Strings.Tests/Strings.Tests/OrNullIfWhiteSpace.cs @@ -1,6 +1,4 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/primitives-strings/Primitives.Strings.Tests/Strings.Tests/Tests.cs b/src/primitives-strings/Primitives.Strings.Tests/Strings.Tests/Tests.cs index 8034442..d40120b 100644 --- a/src/primitives-strings/Primitives.Strings.Tests/Strings.Tests/Tests.cs +++ b/src/primitives-strings/Primitives.Strings.Tests/Strings.Tests/Tests.cs @@ -1,6 +1,4 @@ -#nullable enable - -namespace PrimeFuncPack.Primitives.Tests; +namespace PrimeFuncPack.Primitives.Tests; public sealed partial class StringsTests { diff --git a/src/primitives-strings/Primitives.Strings.Tests/Strings.Tests/ToStringOrEmpty_Ref.cs b/src/primitives-strings/Primitives.Strings.Tests/Strings.Tests/ToStringOrEmpty_Ref.cs index 92c7d2d..b1ce47f 100644 --- a/src/primitives-strings/Primitives.Strings.Tests/Strings.Tests/ToStringOrEmpty_Ref.cs +++ b/src/primitives-strings/Primitives.Strings.Tests/Strings.Tests/ToStringOrEmpty_Ref.cs @@ -1,6 +1,4 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/primitives-strings/Primitives.Strings.Tests/Strings.Tests/ToStringOrEmpty_StructNullable.cs b/src/primitives-strings/Primitives.Strings.Tests/Strings.Tests/ToStringOrEmpty_StructNullable.cs index 4225c70..0d10402 100644 --- a/src/primitives-strings/Primitives.Strings.Tests/Strings.Tests/ToStringOrEmpty_StructNullable.cs +++ b/src/primitives-strings/Primitives.Strings.Tests/Strings.Tests/ToStringOrEmpty_StructNullable.cs @@ -1,6 +1,4 @@ -#nullable enable - -using NUnit.Framework; +using NUnit.Framework; using System; using static PrimeFuncPack.UnitTest.TestData; diff --git a/src/primitives-strings/Primitives.Strings.Tests/Stubs/ToStringStubRefType.cs b/src/primitives-strings/Primitives.Strings.Tests/Stubs/ToStringStubRefType.cs index 653444d..db11778 100644 --- a/src/primitives-strings/Primitives.Strings.Tests/Stubs/ToStringStubRefType.cs +++ b/src/primitives-strings/Primitives.Strings.Tests/Stubs/ToStringStubRefType.cs @@ -1,15 +1,12 @@ -#nullable enable +namespace PrimeFuncPack.Primitives.Tests; -namespace PrimeFuncPack.Primitives.Tests +internal sealed class ToStringStubRefType { - internal sealed class ToStringStubRefType - { - private readonly string? toStringValue; + private readonly string? toStringValue; - public ToStringStubRefType(string? toStringValue) - => this.toStringValue = toStringValue; + public ToStringStubRefType(string? toStringValue) + => this.toStringValue = toStringValue; - public override string? ToString() - => toStringValue; - } + public override string? ToString() + => toStringValue; } diff --git a/src/primitives-strings/Primitives.Strings.Tests/Stubs/ToStringStubStructType.cs b/src/primitives-strings/Primitives.Strings.Tests/Stubs/ToStringStubStructType.cs index 9a5262b..a1cc690 100644 --- a/src/primitives-strings/Primitives.Strings.Tests/Stubs/ToStringStubStructType.cs +++ b/src/primitives-strings/Primitives.Strings.Tests/Stubs/ToStringStubStructType.cs @@ -1,15 +1,12 @@ -#nullable enable +namespace PrimeFuncPack.Primitives.Tests; -namespace PrimeFuncPack.Primitives.Tests +internal readonly struct ToStringStubStructType { - internal readonly struct ToStringStubStructType - { - private readonly string? toStringValue; + private readonly string? toStringValue; - public ToStringStubStructType(string? toStringValue) - => this.toStringValue = toStringValue; + public ToStringStubStructType(string? toStringValue) + => this.toStringValue = toStringValue; - public override string? ToString() - => toStringValue; - } + public override string? ToString() + => toStringValue; } diff --git a/src/primitives-strings/Primitives.Strings/Primitives.Strings.csproj b/src/primitives-strings/Primitives.Strings/Primitives.Strings.csproj index 663df14..a036b72 100644 --- a/src/primitives-strings/Primitives.Strings/Primitives.Strings.csproj +++ b/src/primitives-strings/Primitives.Strings/Primitives.Strings.csproj @@ -17,7 +17,7 @@ PrimeFuncPack Primitives.Strings is a core library for .NET consisting of useful extensions making work with strings easier. System PrimeFuncPack.Primitives.Strings - 2.0.0-rc.1.0.0 + 2.0.0-rc.1.0.1 diff --git a/src/primitives-strings/Primitives.Strings/StringExtensions.cs b/src/primitives-strings/Primitives.Strings/StringExtensions.cs index 0cf2ed3..46ad447 100644 --- a/src/primitives-strings/Primitives.Strings/StringExtensions.cs +++ b/src/primitives-strings/Primitives.Strings/StringExtensions.cs @@ -1,6 +1,4 @@ -#nullable enable - -using System.Runtime.CompilerServices; +using System.Runtime.CompilerServices; namespace System; diff --git a/src/primitives-strings/Primitives.Strings/Strings.cs b/src/primitives-strings/Primitives.Strings/Strings.cs index e694c81..b822964 100644 --- a/src/primitives-strings/Primitives.Strings/Strings.cs +++ b/src/primitives-strings/Primitives.Strings/Strings.cs @@ -1,6 +1,4 @@ -#nullable enable - -using System.Runtime.CompilerServices; +using System.Runtime.CompilerServices; namespace System; diff --git a/src/primitives/Primitives.Tests/Linq/YieldExtensionsTest/YieldExtensionsTest.Single.cs b/src/primitives/Primitives.Tests/Linq/YieldExtensionsTest/YieldExtensionsTest.Single.cs deleted file mode 100644 index 4280e14..0000000 --- a/src/primitives/Primitives.Tests/Linq/YieldExtensionsTest/YieldExtensionsTest.Single.cs +++ /dev/null @@ -1,32 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using System.Linq; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class YieldExtensionsTest - { - [Test] - [TestCaseSource(typeof(ObjectTestData), nameof(ObjectTestData.NullableObjectTestSource))] - public void YieldSingle_ExpectCollectionLengthEqualsOne( - object? sourceValue) - { - var actual = sourceValue.YieldSingle(); - - var actualLength = actual.Count(); - Assert.AreEqual(1, actualLength); - } - - [Test] - [TestCaseSource(typeof(ObjectTestData), nameof(ObjectTestData.NullableObjectTestSource))] - public void YieldSingle_ExpectFirstItemIsSameAsSourceValue( - object? sourceValue) - { - var actual = sourceValue.YieldSingle(); - - var actualFirst = actual.FirstOrDefault(); - Assert.AreSame(sourceValue, actualFirst); - } - } -} diff --git a/src/primitives/Primitives.Tests/Linq/YieldExtensionsTest/YieldExtensionsTest.cs b/src/primitives/Primitives.Tests/Linq/YieldExtensionsTest/YieldExtensionsTest.cs deleted file mode 100644 index 6601fb0..0000000 --- a/src/primitives/Primitives.Tests/Linq/YieldExtensionsTest/YieldExtensionsTest.cs +++ /dev/null @@ -1,8 +0,0 @@ -#nullable enable - -namespace PrimeFuncPack.Primitives.Tests -{ - public sealed partial class YieldExtensionsTest - { - } -} diff --git a/src/primitives/Primitives.Tests/Linq/YielderTest/YielderTest.Empty.cs b/src/primitives/Primitives.Tests/Linq/YielderTest/YielderTest.Empty.cs deleted file mode 100644 index cd00947..0000000 --- a/src/primitives/Primitives.Tests/Linq/YielderTest/YielderTest.Empty.cs +++ /dev/null @@ -1,18 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using PrimeFuncPack.UnitTest; -using System.Linq; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class YielderTest - { - [Test] - public void YieldEmpty_ExpectEmptyCollection() - { - var actual = Yielder.YieldEmpty(); - Assert.IsEmpty(actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/Linq/YielderTest/YielderTest.Single.cs b/src/primitives/Primitives.Tests/Linq/YielderTest/YielderTest.Single.cs deleted file mode 100644 index e23bf63..0000000 --- a/src/primitives/Primitives.Tests/Linq/YielderTest/YielderTest.Single.cs +++ /dev/null @@ -1,32 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using System.Linq; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class YielderTest - { - [Test] - [TestCaseSource(typeof(ObjectTestData), nameof(ObjectTestData.NullableObjectTestSource))] - public void YieldSingle_ExpectCollectionLengthEqualsOne( - object? sourceValue) - { - var actual = Yielder.YieldSingle(sourceValue); - - var actualLength = actual.Count(); - Assert.AreEqual(1, actualLength); - } - - [Test] - [TestCaseSource(typeof(ObjectTestData), nameof(ObjectTestData.NullableObjectTestSource))] - public void YieldSingle_ExpectFirstItemIsSameAsSourceValue( - object? sourceValue) - { - var actual = Yielder.YieldSingle(sourceValue); - - var actualFirst = actual.FirstOrDefault(); - Assert.AreSame(sourceValue, actualFirst); - } - } -} diff --git a/src/primitives/Primitives.Tests/Linq/YielderTest/YielderTest.cs b/src/primitives/Primitives.Tests/Linq/YielderTest/YielderTest.cs deleted file mode 100644 index b57d1e3..0000000 --- a/src/primitives/Primitives.Tests/Linq/YielderTest/YielderTest.cs +++ /dev/null @@ -1,8 +0,0 @@ -#nullable enable - -namespace PrimeFuncPack.Primitives.Tests -{ - public sealed partial class YielderTest - { - } -} diff --git a/src/primitives/Primitives.Tests/Linq/YielderTypedTest/YielderTypedTest.Empty.cs b/src/primitives/Primitives.Tests/Linq/YielderTypedTest/YielderTypedTest.Empty.cs deleted file mode 100644 index 67260ac..0000000 --- a/src/primitives/Primitives.Tests/Linq/YielderTypedTest/YielderTypedTest.Empty.cs +++ /dev/null @@ -1,18 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using PrimeFuncPack.UnitTest; -using System.Linq; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class YielderTypedTest - { - [Test] - public void YieldEmpty_ExpectEmptyCollection() - { - var actual = Yielder.YieldEmpty(); - Assert.IsEmpty(actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/Linq/YielderTypedTest/YielderTypedTest.Single.cs b/src/primitives/Primitives.Tests/Linq/YielderTypedTest/YielderTypedTest.Single.cs deleted file mode 100644 index 4266fc4..0000000 --- a/src/primitives/Primitives.Tests/Linq/YielderTypedTest/YielderTypedTest.Single.cs +++ /dev/null @@ -1,32 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using System.Linq; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class YielderTypedTest - { - [Test] - [TestCaseSource(typeof(ObjectTestData), nameof(ObjectTestData.NullableObjectTestSource))] - public void YieldSingle_ExpectCollectionLengthEqualsOne( - object? sourceValue) - { - var actual = Yielder.YieldSingle(sourceValue); - - var actualLength = actual.Count(); - Assert.AreEqual(1, actualLength); - } - - [Test] - [TestCaseSource(typeof(ObjectTestData), nameof(ObjectTestData.NullableObjectTestSource))] - public void YieldSingle_ExpectFirstItemIsSameAsSourceValue( - object? sourceValue) - { - var actual = Yielder.YieldSingle(sourceValue); - - var actualFirst = actual.FirstOrDefault(); - Assert.AreSame(sourceValue, actualFirst); - } - } -} diff --git a/src/primitives/Primitives.Tests/Linq/YielderTypedTest/YielderTypedTest.cs b/src/primitives/Primitives.Tests/Linq/YielderTypedTest/YielderTypedTest.cs deleted file mode 100644 index 570d405..0000000 --- a/src/primitives/Primitives.Tests/Linq/YielderTypedTest/YielderTypedTest.cs +++ /dev/null @@ -1,8 +0,0 @@ -#nullable enable - -namespace PrimeFuncPack.Primitives.Tests -{ - public sealed partial class YielderTypedTest - { - } -} diff --git a/src/primitives/Primitives.Tests/Pipeline.Tests/Pipe.cs b/src/primitives/Primitives.Tests/Pipeline.Tests/Pipe.cs deleted file mode 100644 index 4ecfbd6..0000000 --- a/src/primitives/Primitives.Tests/Pipeline.Tests/Pipe.cs +++ /dev/null @@ -1,19 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using System; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class PipelineTests - { - [Test] - [TestCaseSource(nameof(ValueTestSource))] - public void Pipe_ExpectSourceValue( - object? sourceValue) - { - var actual = Pipeline.Pipe(sourceValue); - Assert.AreSame(sourceValue, actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/Pipeline.Tests/Tests.cs b/src/primitives/Primitives.Tests/Pipeline.Tests/Tests.cs deleted file mode 100644 index 48ddae3..0000000 --- a/src/primitives/Primitives.Tests/Pipeline.Tests/Tests.cs +++ /dev/null @@ -1,28 +0,0 @@ -#nullable enable - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace PrimeFuncPack.Primitives.Tests -{ - public sealed partial class PipelineTests - { - private static IEnumerable ValueTestSource - => - SourceValues.Select(v => new object?[] { v }); - - private static IReadOnlyCollection SourceValues - => - new object?[] - { - null, - "Some String", - string.Empty, - new DateTime(2020, 09, 25), - (int?)15, - new object(), - new { Id = 1, Text = "Some Text" } - }; - } -} diff --git a/src/primitives/Primitives.Tests/PipelineExtensions.Tests/Pipe.cs b/src/primitives/Primitives.Tests/PipelineExtensions.Tests/Pipe.cs deleted file mode 100644 index 4568880..0000000 --- a/src/primitives/Primitives.Tests/PipelineExtensions.Tests/Pipe.cs +++ /dev/null @@ -1,22 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using System; -using static PrimeFuncPack.UnitTest.TestData; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class PipelineExtensionsTests - { - [Test] - [TestCaseSource(nameof(ValueTestSource))] - public void Pipe_ExpectMappedSourceValue( - object? sourceValue) - { - var actual = sourceValue.Pipe(value => (value, PlusFifteen)); - var expected = (sourceValue, PlusFifteen); - Assert.AreSame(expected.sourceValue, sourceValue); - Assert.AreEqual(expected, actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/PipelineExtensions.Tests/Tests.cs b/src/primitives/Primitives.Tests/PipelineExtensions.Tests/Tests.cs deleted file mode 100644 index 2e94aa3..0000000 --- a/src/primitives/Primitives.Tests/PipelineExtensions.Tests/Tests.cs +++ /dev/null @@ -1,28 +0,0 @@ -#nullable enable - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace PrimeFuncPack.Primitives.Tests -{ - public sealed partial class PipelineExtensionsTests - { - private static IEnumerable ValueTestSource - => - SourceValues.Select(v => new object?[] { v }); - - private static IReadOnlyCollection SourceValues - => - new object?[] - { - null, - "Some String", - string.Empty, - new DateTime(2020, 09, 25), - (int?)15, - new object(), - new { Id = 1, Text = "Some Text" } - }; - } -} diff --git a/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNotNullOrEmpty.cs b/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNotNullOrEmpty.cs deleted file mode 100644 index 065f593..0000000 --- a/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNotNullOrEmpty.cs +++ /dev/null @@ -1,40 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using System; -using static PrimeFuncPack.UnitTest.TestData; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class PredicateExtensionsTests - { - [Test] - public void IsNotNullOrEmpty_SourceIsNull_ExpectFalse() - { - string? source = null; - - var actual = source.IsNotNullOrEmpty(); - Assert.False(actual); - } - - [Test] - public void IsNotNullOrEmpty_SourceIsEmpty_ExpectFalse() - { - string source = string.Empty; - - var actual = source.IsNotNullOrEmpty(); - Assert.False(actual); - } - - [Test] - [TestCase(WhiteSpaceString)] - [TestCase(TabString)] - [TestCase(SomeString)] - public void IsNotNullOrEmpty_SourceIsNotEmpty_ExpectTrue( - string source) - { - var actual = source.IsNotNullOrEmpty(); - Assert.True(actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNotNullOrWhiteSpace.cs b/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNotNullOrWhiteSpace.cs deleted file mode 100644 index efab0a6..0000000 --- a/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNotNullOrWhiteSpace.cs +++ /dev/null @@ -1,49 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using System; -using static PrimeFuncPack.UnitTest.TestData; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class PredicateExtensionsTests - { - [Test] - public void IsNotNullOrWhiteSpace_SourceIsNull_ExpectFalse() - { - string? source = null; - - var actual = source.IsNotNullOrWhiteSpace(); - Assert.False(actual); - } - - [Test] - public void IsNotNullOrWhiteSpace_SourceIsEmpty_ExpectFalse() - { - string source = string.Empty; - - var actual = source.IsNotNullOrWhiteSpace(); - Assert.False(actual); - } - - [Test] - [TestCase(WhiteSpaceString)] - [TestCase(ThreeWhiteSpacesString)] - [TestCase(TabString)] - public void IsNotNullOrWhiteSpace_SourceIsWhiteSpace_ExpectFalse( - string source) - { - var actual = source.IsNotNullOrWhiteSpace(); - Assert.False(actual); - } - - [Test] - public void IsNotNullOrWhiteSpace_SourceIsNotWhiteSpace_ExpectTrue() - { - var source = SomeString; - - var actual = source.IsNotNullOrWhiteSpace(); - Assert.True(actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNotNull_Anonymous.cs b/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNotNull_Anonymous.cs deleted file mode 100644 index e27b3b8..0000000 --- a/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNotNull_Anonymous.cs +++ /dev/null @@ -1,23 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using System; -using static PrimeFuncPack.UnitTest.TestData; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class PredicateExtensionsTests - { - [Test] - public void IsNotNull_AnonymousValueIsNotNull_ExpectTrue() - { - var source = new - { - Text = SomeTextStructType - }; - - var actual = source.IsNotNull(); - Assert.True(actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNotNull_NonnullableStruct.cs b/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNotNull_NonnullableStruct.cs deleted file mode 100644 index ca04730..0000000 --- a/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNotNull_NonnullableStruct.cs +++ /dev/null @@ -1,20 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using System; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class PredicateExtensionsTests - { - // Test both zero and non-zero values - [Test] - [TestCase(0)] - [TestCase(1)] - public void IsNotNull_NonnullableStruct_ExpectTrue(int source) - { - var actual = source.IsNotNull(); - Assert.True(actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNotNull_NullableStruct.cs b/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNotNull_NullableStruct.cs deleted file mode 100644 index 9e5ade3..0000000 --- a/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNotNull_NullableStruct.cs +++ /dev/null @@ -1,48 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using System; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class PredicateExtensionsTests - { - [Test] - public void IsNotNull_NullableStructIsNull_CallStructOverload_ExpectFalse() - { - int? source = null; - - var actual = source.IsNotNull(); - Assert.False(actual); - } - - [Test] - public void IsNotNull_NullableStructIsNull_CallObjectOverload_ExpectFalse() - { - int? source = null; - - var actual = source.IsNotNull(); - Assert.False(actual); - } - - // Test both zero and non-zero values - [Test] - [TestCase(0)] - [TestCase(1)] - public void IsNotNull_NullableStructIsNotNull_CallStructOverload_ExpectTrue(int? source) - { - var actual = source.IsNotNull(); - Assert.True(actual); - } - - // Test both zero and non-zero values - [Test] - [TestCase(0)] - [TestCase(1)] - public void IsNotNull_NullableStructIsNotNull_CallObjectOverload_ExpectTrue(int? source) - { - var actual = source.IsNotNull(); - Assert.True(actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNotNull_RefType.cs b/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNotNull_RefType.cs deleted file mode 100644 index aff893d..0000000 --- a/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNotNull_RefType.cs +++ /dev/null @@ -1,30 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using PrimeFuncPack.UnitTest; -using System; -using static PrimeFuncPack.UnitTest.TestData; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class PredicateExtensionsTests - { - [Test] - public void IsNotNull_RefValueIsNull_ExpectFalse() - { - RefType source = null!; - - var actual = source.IsNotNull(); - Assert.False(actual); - } - - [Test] - public void IsNotNull_RefValueIsNotNull_ExpectTrue() - { - var source = MinusFifteenIdRefType; - - var actual = source.IsNotNull(); - Assert.True(actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNotNull_String.cs b/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNotNull_String.cs deleted file mode 100644 index 5143fe9..0000000 --- a/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNotNull_String.cs +++ /dev/null @@ -1,31 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using PrimeFuncPack.UnitTest; -using System; - -namespace PrimeFuncPack.Primitives.Tests -{ - public sealed partial class PredicateExtensionsTests - { - [Test] - public void IsNotNull_StringIsNull_ExpectFalse() - { - string source = null!; - - var actual = source.IsNotNull(); - Assert.False(actual); - } - - [Test] - [TestCase(TestData.EmptyString)] - [TestCase(TestData.WhiteSpaceString)] - [TestCase(TestData.TabString)] - [TestCase(TestData.SomeString)] - public void IsNotNull_StringIsNotNull_ExpectTrue(string? source) - { - var actual = source.IsNotNull(); - Assert.True(actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNullOrEmpty.cs b/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNullOrEmpty.cs deleted file mode 100644 index 9e74c3f..0000000 --- a/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNullOrEmpty.cs +++ /dev/null @@ -1,40 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using System; -using static PrimeFuncPack.UnitTest.TestData; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class PredicateExtensionsTests - { - [Test] - public void IsNullOrEmpty_SourceIsNull_ExpectTrue() - { - string? source = null; - - var actual = source.IsNullOrEmpty(); - Assert.True(actual); - } - - [Test] - public void IsNullOrEmpty_SourceIsEmpty_ExpectTrue() - { - string source = string.Empty; - - var actual = source.IsNullOrEmpty(); - Assert.True(actual); - } - - [Test] - [TestCase(WhiteSpaceString)] - [TestCase(TabString)] - [TestCase(SomeString)] - public void IsNullOrEmpty_SourceIsNotEmpty_ExpectFalse( - string source) - { - var actual = source.IsNullOrEmpty(); - Assert.False(actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNullOrWhiteSpace.cs b/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNullOrWhiteSpace.cs deleted file mode 100644 index e58a874..0000000 --- a/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNullOrWhiteSpace.cs +++ /dev/null @@ -1,49 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using System; -using static PrimeFuncPack.UnitTest.TestData; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class PredicateExtensionsTests - { - [Test] - public void IsNullOrWhiteSpace_SourceIsNull_ExpectTrue() - { - string? source = null; - - var actual = source.IsNullOrWhiteSpace(); - Assert.True(actual); - } - - [Test] - public void IsNullOrWhiteSpace_SourceIsEmpty_ExpectTrue() - { - string source = string.Empty; - - var actual = source.IsNullOrWhiteSpace(); - Assert.True(actual); - } - - [Test] - [TestCase(WhiteSpaceString)] - [TestCase(ThreeWhiteSpacesString)] - [TestCase(TabString)] - public void IsNullOrWhiteSpace_SourceIsWhiteSpace_ExpectTrue( - string source) - { - var actual = source.IsNullOrWhiteSpace(); - Assert.True(actual); - } - - [Test] - public void IsNullOrWhiteSpace_SourceIsNotWhiteSpace_ExpectFalse() - { - var source = SomeString; - - var actual = source.IsNullOrWhiteSpace(); - Assert.False(actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNull_Anonymous.cs b/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNull_Anonymous.cs deleted file mode 100644 index 5c064fb..0000000 --- a/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNull_Anonymous.cs +++ /dev/null @@ -1,23 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using System; -using static PrimeFuncPack.UnitTest.TestData; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class PredicateExtensionsTests - { - [Test] - public void IsNull_AnonymousValueIsNotNull_ExpectFalse() - { - var source = new - { - Text = SomeTextStructType - }; - - var actual = source.IsNull(); - Assert.False(actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNull_Nonnullable.cs b/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNull_Nonnullable.cs deleted file mode 100644 index 6429695..0000000 --- a/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNull_Nonnullable.cs +++ /dev/null @@ -1,20 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using System; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class PredicateExtensionsTests - { - // Test both zero and non-zero values - [Test] - [TestCase(0)] - [TestCase(1)] - public void IsNull_NonnullableStruct_ExpectFalse(int source) - { - var actual = source.IsNull(); - Assert.False(actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNull_NullableStruct.cs b/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNull_NullableStruct.cs deleted file mode 100644 index 3518817..0000000 --- a/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNull_NullableStruct.cs +++ /dev/null @@ -1,48 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using System; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class PredicateExtensionsTests - { - [Test] - public void IsNull_NullableStructIsNull_CallStructOverload_ExpectTrue() - { - int? source = null; - - var actual = source.IsNull(); - Assert.True(actual); - } - - [Test] - public void IsNull_NullableStructIsNull_CallObjectOverload_ExpectTrue() - { - int? source = null; - - var actual = source.IsNull(); - Assert.True(actual); - } - - // Test both zero and non-zero values - [Test] - [TestCase(0)] - [TestCase(1)] - public void IsNull_NullableStructIsNotNull_CallStructOverload_ExpectFalse(int? source) - { - var actual = source.IsNull(); - Assert.False(actual); - } - - // Test both zero and non-zero values - [Test] - [TestCase(0)] - [TestCase(1)] - public void IsNull_NullableStructIsNotNull_CallObjectOverload_ExpectFalse(int? source) - { - var actual = source.IsNull(); - Assert.False(actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNull_RefType.cs b/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNull_RefType.cs deleted file mode 100644 index b7c002b..0000000 --- a/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNull_RefType.cs +++ /dev/null @@ -1,29 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using System; -using static PrimeFuncPack.UnitTest.TestData; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class PredicateExtensionsTests - { - [Test] - public void IsNull_RefValueIsNull_ExpectTrue() - { - object source = null!; - - var actual = source.IsNull(); - Assert.True(actual); - } - - [Test] - public void IsNull_RefValueIsNotNull_ExpectFalse() - { - var source = ZeroIdRefType; - - var actual = source.IsNull(); - Assert.False(actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNull_String.cs b/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNull_String.cs deleted file mode 100644 index f1f783f..0000000 --- a/src/primitives/Primitives.Tests/PredicateExtensions.Tests/IsNull_String.cs +++ /dev/null @@ -1,31 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using PrimeFuncPack.UnitTest; -using System; - -namespace PrimeFuncPack.Primitives.Tests -{ - public sealed partial class PredicateExtensionsTests - { - [Test] - public void IsNull_StringIsNull_ExpectTrue() - { - string source = null!; - - var actual = source.IsNull(); - Assert.True(actual); - } - - [Test] - [TestCase(TestData.EmptyString)] - [TestCase(TestData.WhiteSpaceString)] - [TestCase(TestData.TabString)] - [TestCase(TestData.SomeString)] - public void IsNull_StringIsNotNull_ExpectFalse(string? source) - { - var actual = source.IsNull(); - Assert.False(actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/PredicateExtensions.Tests/Tests.cs b/src/primitives/Primitives.Tests/PredicateExtensions.Tests/Tests.cs deleted file mode 100644 index 82f1b59..0000000 --- a/src/primitives/Primitives.Tests/PredicateExtensions.Tests/Tests.cs +++ /dev/null @@ -1,8 +0,0 @@ -#nullable enable - -namespace PrimeFuncPack.Primitives.Tests -{ - public sealed partial class PredicateExtensionsTests - { - } -} diff --git a/src/primitives/Primitives.Tests/Predicates.Tests/IsNotNullOrEmpty.cs b/src/primitives/Primitives.Tests/Predicates.Tests/IsNotNullOrEmpty.cs deleted file mode 100644 index d6492a8..0000000 --- a/src/primitives/Primitives.Tests/Predicates.Tests/IsNotNullOrEmpty.cs +++ /dev/null @@ -1,40 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using System; -using static PrimeFuncPack.UnitTest.TestData; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class PredicatesTests - { - [Test] - public void IsNotNullOrEmpty_SourceIsNull_ExpectFalse() - { - string? source = null; - - var actual = Predicates.IsNotNullOrEmpty(source); - Assert.False(actual); - } - - [Test] - public void IsNotNullOrEmpty_SourceIsEmpty_ExpectFalse() - { - string source = string.Empty; - - var actual = Predicates.IsNotNullOrEmpty(source); - Assert.False(actual); - } - - [Test] - [TestCase(WhiteSpaceString)] - [TestCase(TabString)] - [TestCase(SomeString)] - public void IsNotNullOrEmpty_SourceIsNotEmpty_ExpectTrue( - string source) - { - var actual = Predicates.IsNotNullOrEmpty(source); - Assert.True(actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/Predicates.Tests/IsNotNullOrWhiteSpace.cs b/src/primitives/Primitives.Tests/Predicates.Tests/IsNotNullOrWhiteSpace.cs deleted file mode 100644 index 65678d6..0000000 --- a/src/primitives/Primitives.Tests/Predicates.Tests/IsNotNullOrWhiteSpace.cs +++ /dev/null @@ -1,49 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using System; -using static PrimeFuncPack.UnitTest.TestData; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class PredicatesTests - { - [Test] - public void IsNotNullOrWhiteSpace_SourceIsNull_ExpectFalse() - { - string? source = null; - - var actual = Predicates.IsNotNullOrWhiteSpace(source); - Assert.False(actual); - } - - [Test] - public void IsNotNullOrWhiteSpace_SourceIsEmpty_ExpectFalse() - { - string source = string.Empty; - - var actual = Predicates.IsNotNullOrWhiteSpace(source); - Assert.False(actual); - } - - [Test] - [TestCase(WhiteSpaceString)] - [TestCase(ThreeWhiteSpacesString)] - [TestCase(TabString)] - public void IsNotNullOrWhiteSpace_SourceIsWhiteSpace_ExpectFalse( - string source) - { - var actual = Predicates.IsNotNullOrWhiteSpace(source); - Assert.False(actual); - } - - [Test] - public void IsNotNullOrWhiteSpace_SourceIsNotWhiteSpace_ExpectTrue() - { - var source = SomeString; - - var actual = Predicates.IsNotNullOrWhiteSpace(source); - Assert.True(actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/Predicates.Tests/IsNotNull_Anonymous.cs b/src/primitives/Primitives.Tests/Predicates.Tests/IsNotNull_Anonymous.cs deleted file mode 100644 index 4cf75e0..0000000 --- a/src/primitives/Primitives.Tests/Predicates.Tests/IsNotNull_Anonymous.cs +++ /dev/null @@ -1,23 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using System; -using static PrimeFuncPack.UnitTest.TestData; - -namespace PrimeFuncPack.Primitives.Tests -{ - public sealed partial class PredicatesTests - { - [Test] - public void IsNotNull_AnonymousValueIsNotNull_ExpectTrue() - { - var source = new - { - Text = SomeTextStructType - }; - - var actual = Predicates.IsNotNull(source); - Assert.True(actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/Predicates.Tests/IsNotNull_NonnullableStruct.cs b/src/primitives/Primitives.Tests/Predicates.Tests/IsNotNull_NonnullableStruct.cs deleted file mode 100644 index 720cea3..0000000 --- a/src/primitives/Primitives.Tests/Predicates.Tests/IsNotNull_NonnullableStruct.cs +++ /dev/null @@ -1,22 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using PrimeFuncPack.UnitTest; -using System; - -namespace PrimeFuncPack.Primitives.Tests -{ - public sealed partial class PredicatesTests - { - // Test both some specific cases - [Test] - [TestCase(TestData.MinusOne)] - [TestCase(TestData.Zero)] - [TestCase(TestData.One)] - public void IsNotNull_NonnullableStruct_ExpectTrue(int source) - { - var actual = Predicates.IsNotNull(source); - Assert.True(actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/Predicates.Tests/IsNotNull_NullableStruct.cs b/src/primitives/Primitives.Tests/Predicates.Tests/IsNotNull_NullableStruct.cs deleted file mode 100644 index 2b62074..0000000 --- a/src/primitives/Primitives.Tests/Predicates.Tests/IsNotNull_NullableStruct.cs +++ /dev/null @@ -1,51 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using PrimeFuncPack.UnitTest; -using System; - -namespace PrimeFuncPack.Primitives.Tests -{ - public sealed partial class PredicatesTests - { - [Test] - public void IsNotNull_NullableStructIsNull_CallStructOverload_ExpectFalse() - { - int? source = null; - - var actual = Predicates.IsNotNull(source); - Assert.False(actual); - } - - [Test] - public void IsNotNull_NullableStructIsNull_CallObjectOverload_ExpectFalse() - { - int? source = null; - - var actual = Predicates.IsNotNull(source); - Assert.False(actual); - } - - // Test both some specific cases - [Test] - [TestCase(TestData.MinusOne)] - [TestCase(TestData.Zero)] - [TestCase(TestData.One)] - public void IsNotNull_NullableStructIsNotNull_CallStructOverload_ExpectTrue(int? source) - { - var actual = Predicates.IsNotNull(source); - Assert.True(actual); - } - - // Test both some specific cases - [Test] - [TestCase(TestData.MinusOne)] - [TestCase(TestData.Zero)] - [TestCase(TestData.One)] - public void IsNotNull_NullableStructIsNotNull_CallObjectOverload_ExpectTrue(int? source) - { - var actual = Predicates.IsNotNull(source); - Assert.True(actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/Predicates.Tests/IsNotNull_RefType.cs b/src/primitives/Primitives.Tests/Predicates.Tests/IsNotNull_RefType.cs deleted file mode 100644 index 8f3234c..0000000 --- a/src/primitives/Primitives.Tests/Predicates.Tests/IsNotNull_RefType.cs +++ /dev/null @@ -1,29 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using System; -using static PrimeFuncPack.UnitTest.TestData; - -namespace PrimeFuncPack.Primitives.Tests -{ - public sealed partial class PredicatesTests - { - [Test] - public void IsNotNull_RefValueIsNull_ExpectFalse() - { - object source = null!; - - var actual = Predicates.IsNotNull(source); - Assert.False(actual); - } - - [Test] - public void IsNotNull_RefValueIsNotNull_ExpectTrue() - { - var source = PlusFifteenIdRefType; - - var actual = Predicates.IsNotNull(source); - Assert.True(actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/Predicates.Tests/IsNotNull_String.cs b/src/primitives/Primitives.Tests/Predicates.Tests/IsNotNull_String.cs deleted file mode 100644 index 6754c00..0000000 --- a/src/primitives/Primitives.Tests/Predicates.Tests/IsNotNull_String.cs +++ /dev/null @@ -1,31 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using PrimeFuncPack.UnitTest; -using System; - -namespace PrimeFuncPack.Primitives.Tests -{ - public sealed partial class PredicatesTests - { - [Test] - public void IsNotNull_StringIsNull_ExpectFalse() - { - string source = null!; - - var actual = Predicates.IsNotNull(source); - Assert.False(actual); - } - - [Test] - [TestCase(TestData.EmptyString)] - [TestCase(TestData.WhiteSpaceString)] - [TestCase(TestData.TabString)] - [TestCase(TestData.SomeString)] - public void IsNotNull_StringIsNotNull_ExpectTrue(string? source) - { - var actual = Predicates.IsNotNull(source); - Assert.True(actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/Predicates.Tests/IsNullOrEmpty.cs b/src/primitives/Primitives.Tests/Predicates.Tests/IsNullOrEmpty.cs deleted file mode 100644 index fdd345e..0000000 --- a/src/primitives/Primitives.Tests/Predicates.Tests/IsNullOrEmpty.cs +++ /dev/null @@ -1,40 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using System; -using static PrimeFuncPack.UnitTest.TestData; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class PredicatesTests - { - [Test] - public void IsNullOrEmpty_SourceIsNull_ExpectTrue() - { - string? source = null; - - var actual = Predicates.IsNullOrEmpty(source); - Assert.True(actual); - } - - [Test] - public void IsNullOrEmpty_SourceIsEmpty_ExpectTrue() - { - string source = string.Empty; - - var actual = Predicates.IsNullOrEmpty(source); - Assert.True(actual); - } - - [Test] - [TestCase(WhiteSpaceString)] - [TestCase(TabString)] - [TestCase(SomeString)] - public void IsNullOrEmpty_SourceIsNotEmpty_ExpectFalse( - string source) - { - var actual = Predicates.IsNullOrEmpty(source); - Assert.False(actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/Predicates.Tests/IsNullOrWhiteSpace.cs b/src/primitives/Primitives.Tests/Predicates.Tests/IsNullOrWhiteSpace.cs deleted file mode 100644 index 8282b7e..0000000 --- a/src/primitives/Primitives.Tests/Predicates.Tests/IsNullOrWhiteSpace.cs +++ /dev/null @@ -1,49 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using System; -using static PrimeFuncPack.UnitTest.TestData; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class PredicatesTests - { - [Test] - public void IsNullOrWhiteSpace_SourceIsNull_ExpectTrue() - { - string? source = null; - - var actual = Predicates.IsNullOrWhiteSpace(source); - Assert.True(actual); - } - - [Test] - public void IsNullOrWhiteSpace_SourceIsEmpty_ExpectTrue() - { - string source = string.Empty; - - var actual = Predicates.IsNullOrWhiteSpace(source); - Assert.True(actual); - } - - [Test] - [TestCase(WhiteSpaceString)] - [TestCase(ThreeWhiteSpacesString)] - [TestCase(TabString)] - public void IsNullOrWhiteSpace_SourceIsWhiteSpace_ExpectTrue( - string source) - { - var actual = Predicates.IsNullOrWhiteSpace(source); - Assert.True(actual); - } - - [Test] - public void IsNullOrWhiteSpace_SourceIsNotWhiteSpace_ExpectFalse() - { - var source = SomeString; - - var actual = Predicates.IsNullOrWhiteSpace(source); - Assert.False(actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/Predicates.Tests/IsNull_Anonymous.cs b/src/primitives/Primitives.Tests/Predicates.Tests/IsNull_Anonymous.cs deleted file mode 100644 index 34e404f..0000000 --- a/src/primitives/Primitives.Tests/Predicates.Tests/IsNull_Anonymous.cs +++ /dev/null @@ -1,23 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using System; -using static PrimeFuncPack.UnitTest.TestData; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class PredicatesTests - { - [Test] - public void IsNull_AnonymousValueIsNotNull_ExpectFalse() - { - var source = new - { - Text = SomeTextStructType - }; - - var actual = Predicates.IsNull(source); - Assert.False(actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/Predicates.Tests/IsNull_NonnullableStruct.cs b/src/primitives/Primitives.Tests/Predicates.Tests/IsNull_NonnullableStruct.cs deleted file mode 100644 index 8afa70f..0000000 --- a/src/primitives/Primitives.Tests/Predicates.Tests/IsNull_NonnullableStruct.cs +++ /dev/null @@ -1,22 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using PrimeFuncPack.UnitTest; -using System; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class PredicatesTests - { - // Test both some specific cases - [Test] - [TestCase(TestData.MinusOne)] - [TestCase(TestData.Zero)] - [TestCase(TestData.One)] - public void IsNull_NonnullableStruct_ExpectFalse(int source) - { - var actual = Predicates.IsNull(source); - Assert.False(actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/Predicates.Tests/IsNull_NullableStruct.cs b/src/primitives/Primitives.Tests/Predicates.Tests/IsNull_NullableStruct.cs deleted file mode 100644 index 020b772..0000000 --- a/src/primitives/Primitives.Tests/Predicates.Tests/IsNull_NullableStruct.cs +++ /dev/null @@ -1,51 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using PrimeFuncPack.UnitTest; -using System; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class PredicatesTests - { - [Test] - public void IsNull_NullableStructIsNull_CallStructOverload_ExpectTrue() - { - int? source = null; - - var actual = Predicates.IsNull(source); - Assert.True(actual); - } - - [Test] - public void IsNull_NullableStructIsNull_CallObjectOverload_ExpectTrue() - { - int? source = null; - - var actual = Predicates.IsNull(source); - Assert.True(actual); - } - - // Test both some specific cases - [Test] - [TestCase(TestData.MinusOne)] - [TestCase(TestData.Zero)] - [TestCase(TestData.One)] - public void IsNull_NullableStructIsNotNull_CallStructOverload_ExpectFalse(int? source) - { - var actual = Predicates.IsNull(source); - Assert.False(actual); - } - - // Test both some specific cases - [Test] - [TestCase(TestData.MinusOne)] - [TestCase(TestData.Zero)] - [TestCase(TestData.One)] - public void IsNull_NullableStructIsNotNull_CallObjectOverload_ExpectFalse(int? source) - { - var actual = Predicates.IsNull(source); - Assert.False(actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/Predicates.Tests/IsNull_RefType.cs b/src/primitives/Primitives.Tests/Predicates.Tests/IsNull_RefType.cs deleted file mode 100644 index 6aa432a..0000000 --- a/src/primitives/Primitives.Tests/Predicates.Tests/IsNull_RefType.cs +++ /dev/null @@ -1,30 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using PrimeFuncPack.UnitTest; -using System; -using static PrimeFuncPack.UnitTest.TestData; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class PredicatesTests - { - [Test] - public void IsNull_RefValueIsNull_ExpectTrue() - { - RefType source = null!; - - var actual = Predicates.IsNull(source); - Assert.True(actual); - } - - [Test] - public void IsNull_RefValueIsNull_ExpectFalse() - { - var source = MinusFifteenIdRefType; - - var actual = Predicates.IsNull(source); - Assert.False(actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/Predicates.Tests/IsNull_String.cs b/src/primitives/Primitives.Tests/Predicates.Tests/IsNull_String.cs deleted file mode 100644 index f25843b..0000000 --- a/src/primitives/Primitives.Tests/Predicates.Tests/IsNull_String.cs +++ /dev/null @@ -1,31 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using PrimeFuncPack.UnitTest; -using System; - -namespace PrimeFuncPack.Primitives.Tests -{ - public sealed partial class PredicatesTests - { - [Test] - public void IsNull_StringIsNull_ExpectTrue() - { - string source = null!; - - var actual = Predicates.IsNull(source); - Assert.True(actual); - } - - [Test] - [TestCase(TestData.EmptyString)] - [TestCase(TestData.WhiteSpaceString)] - [TestCase(TestData.TabString)] - [TestCase(TestData.SomeString)] - public void IsNull_StringIsNotNull_ExpectFalse(string? source) - { - var actual = Predicates.IsNull(source); - Assert.False(actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/Predicates.Tests/Tests.cs b/src/primitives/Primitives.Tests/Predicates.Tests/Tests.cs deleted file mode 100644 index 6c287a4..0000000 --- a/src/primitives/Primitives.Tests/Predicates.Tests/Tests.cs +++ /dev/null @@ -1,8 +0,0 @@ -#nullable enable - -namespace PrimeFuncPack.Primitives.Tests -{ - public sealed partial class PredicatesTests - { - } -} diff --git a/src/primitives/Primitives.Tests/Primitives.Tests.csproj b/src/primitives/Primitives.Tests/Primitives.Tests.csproj deleted file mode 100644 index 34f83e0..0000000 --- a/src/primitives/Primitives.Tests/Primitives.Tests.csproj +++ /dev/null @@ -1,26 +0,0 @@ - - - - net6.0 - disable - enable - true - false - Andrei Sergeev, Pavel Moskovoy - Copyright © 2020-2021 Andrei Sergeev, Pavel Moskovoy - PrimeFuncPack.Primitives.Tests - PrimeFuncPack.Primitives.Tests - - - - - - - - - - - - - - diff --git a/src/primitives/Primitives.Tests/StringExtensions.Tests/OrEmpty.cs b/src/primitives/Primitives.Tests/StringExtensions.Tests/OrEmpty.cs deleted file mode 100644 index 7734cfe..0000000 --- a/src/primitives/Primitives.Tests/StringExtensions.Tests/OrEmpty.cs +++ /dev/null @@ -1,32 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using System; -using static PrimeFuncPack.UnitTest.TestData; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class StringExtensionsTests - { - [Test] - public void OrEmpty_SourceIsNull_ExpectEmpty() - { - string? source = null; - - var actual = source.OrEmpty(); - Assert.IsEmpty(actual); - } - - [Test] - [TestCase(EmptyString)] - [TestCase(WhiteSpaceString)] - [TestCase(TabString)] - [TestCase(SomeString)] - public void OrEmpty_SourceIsNotNull_ExpectSourceValue( - string source) - { - var actual = source.OrEmpty(); - Assert.AreSame(source, actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/StringExtensions.Tests/OrNullIfEmpty.cs b/src/primitives/Primitives.Tests/StringExtensions.Tests/OrNullIfEmpty.cs deleted file mode 100644 index 2da816b..0000000 --- a/src/primitives/Primitives.Tests/StringExtensions.Tests/OrNullIfEmpty.cs +++ /dev/null @@ -1,32 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using System; -using static PrimeFuncPack.UnitTest.TestData; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class StringExtensionsTests - { - [Test] - public void OrNullIfEmpty_SourceIsEmpty_ExpectNull() - { - string? source = string.Empty; - - var actual = source.OrNullIfEmpty(); - Assert.IsNull(actual); - } - - [Test] - [TestCase(null)] - [TestCase(WhiteSpaceString)] - [TestCase(TabString)] - [TestCase(SomeString)] - public void OrNullIfEmpty_SourceIsNotEmpty_ExpectSourceValue( - string? source) - { - var actual = source.OrNullIfEmpty(); - Assert.AreSame(source, actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/StringExtensions.Tests/OrNullIfWhiteSpace.cs b/src/primitives/Primitives.Tests/StringExtensions.Tests/OrNullIfWhiteSpace.cs deleted file mode 100644 index f88a26d..0000000 --- a/src/primitives/Primitives.Tests/StringExtensions.Tests/OrNullIfWhiteSpace.cs +++ /dev/null @@ -1,33 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using System; -using static PrimeFuncPack.UnitTest.TestData; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class StringExtensionsTests - { - [Test] - [TestCase(EmptyString)] - [TestCase(WhiteSpaceString)] - [TestCase(ThreeWhiteSpacesString)] - [TestCase(TabString)] - public void OrNullIfWhiteSpace_SourceIsWhiteSpace_ExpectNull( - string? source) - { - var actual = source.OrNullIfWhiteSpace(); - Assert.IsNull(actual); - } - - [Test] - [TestCase(null)] - [TestCase(SomeString)] - public void OrNullIfWhiteSpace_SourceIsNotWhiteSpace_ExpectSourceValue( - string? source) - { - var actual = source.OrNullIfWhiteSpace(); - Assert.AreSame(source, actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/StringExtensions.Tests/Tests.cs b/src/primitives/Primitives.Tests/StringExtensions.Tests/Tests.cs deleted file mode 100644 index 886e099..0000000 --- a/src/primitives/Primitives.Tests/StringExtensions.Tests/Tests.cs +++ /dev/null @@ -1,8 +0,0 @@ -#nullable enable - -namespace PrimeFuncPack.Primitives.Tests -{ - public sealed partial class StringExtensionsTests - { - } -} diff --git a/src/primitives/Primitives.Tests/StringExtensions.Tests/ToStringOrEmpty_Ref.cs b/src/primitives/Primitives.Tests/StringExtensions.Tests/ToStringOrEmpty_Ref.cs deleted file mode 100644 index 884d779..0000000 --- a/src/primitives/Primitives.Tests/StringExtensions.Tests/ToStringOrEmpty_Ref.cs +++ /dev/null @@ -1,43 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using System; -using static PrimeFuncPack.UnitTest.TestData; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class StringExtensionsTests - { - [Test] - public void ToStringOrEmpty_Ref_SourceIsNull_ExpectEmpty() - { - ToStringStubRefType? source = null; - - var actual = source.ToStringOrEmpty(); - Assert.IsEmpty(actual); - } - - [Test] - public void ToStringOrEmpty_Ref_SourceToStringIsNull_ExpectEmpty() - { - ToStringStubRefType? source = new(null); - - var actual = source.ToStringOrEmpty(); - Assert.IsEmpty(actual); - } - - [Test] - [TestCase(EmptyString)] - [TestCase(WhiteSpaceString)] - [TestCase(TabString)] - [TestCase(SomeString)] - public void ToStringOrEmpty_Ref_SourceToStringIsNotNull_ExpectActualToStringValue( - string sourceToStringValue) - { - ToStringStubRefType? source = new(sourceToStringValue); - - var actual = source.ToStringOrEmpty(); - Assert.AreEqual(sourceToStringValue, actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/StringExtensions.Tests/ToStringOrEmpty_StructNullable.cs b/src/primitives/Primitives.Tests/StringExtensions.Tests/ToStringOrEmpty_StructNullable.cs deleted file mode 100644 index 64e5a35..0000000 --- a/src/primitives/Primitives.Tests/StringExtensions.Tests/ToStringOrEmpty_StructNullable.cs +++ /dev/null @@ -1,43 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using System; -using static PrimeFuncPack.UnitTest.TestData; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class StringExtensionsTests - { - [Test] - public void ToStringOrEmpty_StructNullable_SourceIsNull_ExpectEmpty() - { - ToStringStubStructType? source = null; - - var actual = source.ToStringOrEmpty(); - Assert.IsEmpty(actual); - } - - [Test] - public void ToStringOrEmpty_StructNullable_SourceToStringIsNull_ExpectEmpty() - { - ToStringStubStructType? source = new(null); - - var actual = source.ToStringOrEmpty(); - Assert.IsEmpty(actual); - } - - [Test] - [TestCase(EmptyString)] - [TestCase(WhiteSpaceString)] - [TestCase(TabString)] - [TestCase(SomeString)] - public void ToStringOrEmpty_StructNullable_SourceToStringIsNotNull_ExpectActualToStringValue( - string sourceToStringValue) - { - ToStringStubStructType? source = new(sourceToStringValue); - - var actual = source.ToStringOrEmpty(); - Assert.AreEqual(sourceToStringValue, actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/Strings.Tests/Empty.cs b/src/primitives/Primitives.Tests/Strings.Tests/Empty.cs deleted file mode 100644 index e248405..0000000 --- a/src/primitives/Primitives.Tests/Strings.Tests/Empty.cs +++ /dev/null @@ -1,24 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using System; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class StringsTests - { - [Test] - public void Empty_ExpectEmptyString() - { - var actual = Strings.Empty; - Assert.IsEmpty(actual); - } - - [Test] - public void GetEmpty_ExpectEmptyString() - { - var actual = Strings.GetEmpty(); - Assert.IsEmpty(actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/Strings.Tests/OrEmpty.cs b/src/primitives/Primitives.Tests/Strings.Tests/OrEmpty.cs deleted file mode 100644 index 7db99e6..0000000 --- a/src/primitives/Primitives.Tests/Strings.Tests/OrEmpty.cs +++ /dev/null @@ -1,32 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using System; -using static PrimeFuncPack.UnitTest.TestData; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class StringsTests - { - [Test] - public void OrEmpty_SourceIsNull_ExpectEmpty() - { - string? source = null; - - var actual = Strings.OrEmpty(source); - Assert.IsEmpty(actual); - } - - [Test] - [TestCase(EmptyString)] - [TestCase(WhiteSpaceString)] - [TestCase(TabString)] - [TestCase(SomeString)] - public void OrEmpty_SourceIsNotNull_ExpectSourceValue( - string source) - { - var actual = Strings.OrEmpty(source); - Assert.AreSame(source, actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/Strings.Tests/OrNullIfEmpty.cs b/src/primitives/Primitives.Tests/Strings.Tests/OrNullIfEmpty.cs deleted file mode 100644 index 95b462c..0000000 --- a/src/primitives/Primitives.Tests/Strings.Tests/OrNullIfEmpty.cs +++ /dev/null @@ -1,32 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using System; -using static PrimeFuncPack.UnitTest.TestData; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class StringsTests - { - [Test] - public void OrNullIfEmpty_SourceIsEmpty_ExpectNull() - { - string? source = string.Empty; - - var actual = Strings.OrNullIfEmpty(source); - Assert.IsNull(actual); - } - - [Test] - [TestCase(null)] - [TestCase(WhiteSpaceString)] - [TestCase(TabString)] - [TestCase(SomeString)] - public void OrNullIfEmpty_SourceIsNotEmpty_ExpectSourceValue( - string? source) - { - var actual = Strings.OrNullIfEmpty(source); - Assert.AreSame(source, actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/Strings.Tests/OrNullIfWhiteSpace.cs b/src/primitives/Primitives.Tests/Strings.Tests/OrNullIfWhiteSpace.cs deleted file mode 100644 index 3489ef0..0000000 --- a/src/primitives/Primitives.Tests/Strings.Tests/OrNullIfWhiteSpace.cs +++ /dev/null @@ -1,33 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using System; -using static PrimeFuncPack.UnitTest.TestData; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class StringsTests - { - [Test] - [TestCase(EmptyString)] - [TestCase(WhiteSpaceString)] - [TestCase(ThreeWhiteSpacesString)] - [TestCase(TabString)] - public void OrNullIfWhiteSpace_SourceIsWhiteSpace_ExpectNull( - string? source) - { - var actual = Strings.OrNullIfWhiteSpace(source); - Assert.IsNull(actual); - } - - [Test] - [TestCase(null)] - [TestCase(SomeString)] - public void OrNullIfWhiteSpace_SourceIsNotWhiteSpace_ExpectSourceValue( - string? source) - { - var actual = Strings.OrNullIfWhiteSpace(source); - Assert.AreSame(source, actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/Strings.Tests/Tests.cs b/src/primitives/Primitives.Tests/Strings.Tests/Tests.cs deleted file mode 100644 index 9645c81..0000000 --- a/src/primitives/Primitives.Tests/Strings.Tests/Tests.cs +++ /dev/null @@ -1,8 +0,0 @@ -#nullable enable - -namespace PrimeFuncPack.Primitives.Tests -{ - public sealed partial class StringsTests - { - } -} diff --git a/src/primitives/Primitives.Tests/Strings.Tests/ToStringOrEmpty_Ref.cs b/src/primitives/Primitives.Tests/Strings.Tests/ToStringOrEmpty_Ref.cs deleted file mode 100644 index 490c169..0000000 --- a/src/primitives/Primitives.Tests/Strings.Tests/ToStringOrEmpty_Ref.cs +++ /dev/null @@ -1,43 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using System; -using static PrimeFuncPack.UnitTest.TestData; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class StringsTests - { - [Test] - public void ToStringOrEmpty_Ref_SourceIsNull_ExpectEmpty() - { - ToStringStubRefType? source = null; - - var actual = Strings.ToStringOrEmpty(source); - Assert.IsEmpty(actual); - } - - [Test] - public void ToStringOrEmpty_Ref_SourceToStringIsNull_ExpectEmpty() - { - ToStringStubRefType? source = new(null); - - var actual = Strings.ToStringOrEmpty(source); - Assert.IsEmpty(actual); - } - - [Test] - [TestCase(EmptyString)] - [TestCase(WhiteSpaceString)] - [TestCase(TabString)] - [TestCase(SomeString)] - public void ToStringOrEmpty_Ref_SourceToStringIsNotNull_ExpectActualToStringValue( - string sourceToStringValue) - { - ToStringStubRefType? source = new(sourceToStringValue); - - var actual = Strings.ToStringOrEmpty(source); - Assert.AreEqual(sourceToStringValue, actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/Strings.Tests/ToStringOrEmpty_StructNullable.cs b/src/primitives/Primitives.Tests/Strings.Tests/ToStringOrEmpty_StructNullable.cs deleted file mode 100644 index 6bef6d5..0000000 --- a/src/primitives/Primitives.Tests/Strings.Tests/ToStringOrEmpty_StructNullable.cs +++ /dev/null @@ -1,43 +0,0 @@ -#nullable enable - -using NUnit.Framework; -using System; -using static PrimeFuncPack.UnitTest.TestData; - -namespace PrimeFuncPack.Primitives.Tests -{ - partial class StringsTests - { - [Test] - public void ToStringOrEmpty_StructNullable_SourceIsNull_ExpectEmpty() - { - ToStringStubStructType? source = null; - - var actual = Strings.ToStringOrEmpty(source); - Assert.IsEmpty(actual); - } - - [Test] - public void ToStringOrEmpty_StructNullable_SourceToStringIsNull_ExpectEmpty() - { - ToStringStubStructType? source = new(null); - - var actual = Strings.ToStringOrEmpty(source); - Assert.IsEmpty(actual); - } - - [Test] - [TestCase(EmptyString)] - [TestCase(WhiteSpaceString)] - [TestCase(TabString)] - [TestCase(SomeString)] - public void ToStringOrEmpty_StructNullable_SourceToStringIsNotNull_ExpectActualToStringValue( - string sourceToStringValue) - { - ToStringStubStructType? source = new(sourceToStringValue); - - var actual = Strings.ToStringOrEmpty(source); - Assert.AreEqual(sourceToStringValue, actual); - } - } -} diff --git a/src/primitives/Primitives.Tests/Stubs/ToStringStubRefType.cs b/src/primitives/Primitives.Tests/Stubs/ToStringStubRefType.cs deleted file mode 100644 index 653444d..0000000 --- a/src/primitives/Primitives.Tests/Stubs/ToStringStubRefType.cs +++ /dev/null @@ -1,15 +0,0 @@ -#nullable enable - -namespace PrimeFuncPack.Primitives.Tests -{ - internal sealed class ToStringStubRefType - { - private readonly string? toStringValue; - - public ToStringStubRefType(string? toStringValue) - => this.toStringValue = toStringValue; - - public override string? ToString() - => toStringValue; - } -} diff --git a/src/primitives/Primitives.Tests/Stubs/ToStringStubStructType.cs b/src/primitives/Primitives.Tests/Stubs/ToStringStubStructType.cs deleted file mode 100644 index 9a5262b..0000000 --- a/src/primitives/Primitives.Tests/Stubs/ToStringStubStructType.cs +++ /dev/null @@ -1,15 +0,0 @@ -#nullable enable - -namespace PrimeFuncPack.Primitives.Tests -{ - internal readonly struct ToStringStubStructType - { - private readonly string? toStringValue; - - public ToStringStubStructType(string? toStringValue) - => this.toStringValue = toStringValue; - - public override string? ToString() - => toStringValue; - } -} diff --git a/src/primitives/Primitives.Tests/TestData/ObjectTestData.cs b/src/primitives/Primitives.Tests/TestData/ObjectTestData.cs deleted file mode 100644 index 4439b6e..0000000 --- a/src/primitives/Primitives.Tests/TestData/ObjectTestData.cs +++ /dev/null @@ -1,21 +0,0 @@ -#nullable enable - -using System.Collections.Generic; -using System.Linq; -using static PrimeFuncPack.UnitTest.TestData; - -namespace PrimeFuncPack.Primitives.Tests -{ - internal static class ObjectTestData - { - public static IEnumerable NullableObjectTestSource - => - new object?[] - { - null, - PlusFifteenIdRefType, - SomeTextStructType - } - .Select(v => new object?[] { v }); - } -} diff --git a/src/primitives/Primitives/Primitives.csproj b/src/primitives/Primitives/Primitives.csproj index e3b30c1..192fae2 100644 --- a/src/primitives/Primitives/Primitives.csproj +++ b/src/primitives/Primitives/Primitives.csproj @@ -17,7 +17,7 @@ PrimeFuncPack Primitives is a core library for .NET consisting of useful extensions and predicates making work with functional pipelines, Linq, strings, the nullable feature, etc. easier. System PrimeFuncPack.Primitives - 2.0.0-rc.1.0.0 + 2.0.0-rc.1.0.1 @@ -32,10 +32,10 @@ - - - - + + + +