diff --git a/src/core-func-factory/Func.Factory.Tests/Func.Factory.Tests.csproj b/src/core-func-extensions/Func.Extensions.Tests/Func.Extensions.Tests.csproj
similarity index 88%
rename from src/core-func-factory/Func.Factory.Tests/Func.Factory.Tests.csproj
rename to src/core-func-extensions/Func.Extensions.Tests/Func.Extensions.Tests.csproj
index 25307fc6..2d2de346 100644
--- a/src/core-func-factory/Func.Factory.Tests/Func.Factory.Tests.csproj
+++ b/src/core-func-extensions/Func.Extensions.Tests/Func.Extensions.Tests.csproj
@@ -8,12 +8,12 @@
PrimeFuncPack: A Functional Programming Pack for .NET
Copyright © 2020 Andrei Sergeev, Pavel Moskovoy
PrimeFuncPack.Core.Tests
- PrimeFuncPack.Core.Func.Factory.Tests
+ PrimeFuncPack.Core.Func.Extensions.Tests
-
+
diff --git a/src/core-func-factory/Func.Factory.Tests/Test.AsyncFunc/AsyncFuncTest.00.cs b/src/core-func-extensions/Func.Extensions.Tests/Test.AsyncFunc/AsyncFuncTest.00.cs
similarity index 80%
rename from src/core-func-factory/Func.Factory.Tests/Test.AsyncFunc/AsyncFuncTest.00.cs
rename to src/core-func-extensions/Func.Extensions.Tests/Test.AsyncFunc/AsyncFuncTest.00.cs
index 77b21660..f0a96d8f 100644
--- a/src/core-func-factory/Func.Factory.Tests/Test.AsyncFunc/AsyncFuncTest.00.cs
+++ b/src/core-func-extensions/Func.Extensions.Tests/Test.AsyncFunc/AsyncFuncTest.00.cs
@@ -12,10 +12,10 @@ namespace PrimeFuncPack.Core.Tests
partial class AsyncFuncTest
{
[Fact]
- public void Create_00_SourceFuncIsNull_ExpectArgumentNullException()
+ public void From_00_SourceFuncIsNull_ExpectArgumentNullException()
{
var sourceFunc = (Func>)null!;
- var ex = Assert.Throws(() => _ = Func.Create(sourceFunc));
+ var ex = Assert.Throws(() => _ = Func.From(sourceFunc));
Assert.Equal("funcAsync", ex.ParamName);
}
@@ -28,10 +28,10 @@ public void Create_00_SourceFuncIsNull_ExpectArgumentNullException()
[InlineData(WhiteSpaceString, true)]
[InlineData(SomeString, false)]
[InlineData(SomeString, true)]
- public async Task Create_00_ThenInvokeAsync_ExpectResultOfSourceFunc(
+ public async Task From_00_ThenInvokeAsync_ExpectResultOfSourceFunc(
string? sourceFuncResult, bool canceled)
{
- var actual = Func.Create(_ => ValueTask.FromResult(sourceFuncResult));
+ var actual = Func.From(_ => ValueTask.FromResult(sourceFuncResult));
var cancellationToken = new CancellationToken(canceled: canceled);
var actualResult = await actual.InvokeAsync(cancellationToken);
diff --git a/src/core-func-factory/Func.Factory.Tests/Test.AsyncFunc/AsyncFuncTest.01.cs b/src/core-func-extensions/Func.Extensions.Tests/Test.AsyncFunc/AsyncFuncTest.01.cs
similarity index 75%
rename from src/core-func-factory/Func.Factory.Tests/Test.AsyncFunc/AsyncFuncTest.01.cs
rename to src/core-func-extensions/Func.Extensions.Tests/Test.AsyncFunc/AsyncFuncTest.01.cs
index a5e24f1b..722ae1f1 100644
--- a/src/core-func-factory/Func.Factory.Tests/Test.AsyncFunc/AsyncFuncTest.01.cs
+++ b/src/core-func-extensions/Func.Extensions.Tests/Test.AsyncFunc/AsyncFuncTest.01.cs
@@ -12,19 +12,19 @@ namespace PrimeFuncPack.Core.Tests
partial class AsyncFuncTest
{
[Fact]
- public void Create_01_SourceFuncIsNull_ExpectArgumentNullException()
+ public void From_01_SourceFuncIsNull_ExpectArgumentNullException()
{
var sourceFunc = (Func>)null!;
- var ex = Assert.Throws(() => _ = Func.Create(sourceFunc));
+ var ex = Assert.Throws(() => _ = Func.From(sourceFunc));
Assert.Equal("funcAsync", ex.ParamName);
}
[Theory]
[MemberData(nameof(TestEntitySource.RecordTypes), MemberType = typeof(TestEntitySource))]
- public async Task Create_01_ThenInvokeAsync_ExpectResultOfSourceFunc(
+ public async Task From_01_ThenInvokeAsync_ExpectResultOfSourceFunc(
RecordType? sourceFuncResult)
{
- var actual = Func.Create((_, _) => ValueTask.FromResult(sourceFuncResult));
+ var actual = Func.From((_, _) => ValueTask.FromResult(sourceFuncResult));
var cancellationToken = default(CancellationToken);
var actualResult = await actual.InvokeAsync(PlusFifteenIdRefType, cancellationToken);
diff --git a/src/core-func-factory/Func.Factory.Tests/Test.AsyncFunc/AsyncFuncTest.02.cs b/src/core-func-extensions/Func.Extensions.Tests/Test.AsyncFunc/AsyncFuncTest.02.cs
similarity index 79%
rename from src/core-func-factory/Func.Factory.Tests/Test.AsyncFunc/AsyncFuncTest.02.cs
rename to src/core-func-extensions/Func.Extensions.Tests/Test.AsyncFunc/AsyncFuncTest.02.cs
index 03c5c88f..ab93c6d2 100644
--- a/src/core-func-factory/Func.Factory.Tests/Test.AsyncFunc/AsyncFuncTest.02.cs
+++ b/src/core-func-extensions/Func.Extensions.Tests/Test.AsyncFunc/AsyncFuncTest.02.cs
@@ -12,10 +12,10 @@ namespace PrimeFuncPack.Core.Tests
partial class AsyncFuncTest
{
[Fact]
- public void Create_02_SourceFuncIsNull_ExpectArgumentNullException()
+ public void From_02_SourceFuncIsNull_ExpectArgumentNullException()
{
var sourceFunc = (Func>)null!;
- var ex = Assert.Throws(() => _ = Func.Create(sourceFunc));
+ var ex = Assert.Throws(() => _ = Func.From(sourceFunc));
Assert.Equal("funcAsync", ex.ParamName);
}
@@ -23,10 +23,10 @@ public void Create_02_SourceFuncIsNull_ExpectArgumentNullException()
[InlineData(null)]
[InlineData(true)]
[InlineData(false)]
- public async Task Create_02_ThenInvokeAsync_ExpectResultOfSourceFunc(
+ public async Task From_02_ThenInvokeAsync_ExpectResultOfSourceFunc(
bool? sourceFuncResult)
{
- var actual = Func.Create(
+ var actual = Func.From(
(_, _, _) => ValueTask.FromResult(sourceFuncResult));
var cancellationToken = new CancellationToken(canceled: true);
diff --git a/src/core-func-factory/Func.Factory.Tests/Test.AsyncFunc/AsyncFuncTest.03.cs b/src/core-func-extensions/Func.Extensions.Tests/Test.AsyncFunc/AsyncFuncTest.03.cs
similarity index 80%
rename from src/core-func-factory/Func.Factory.Tests/Test.AsyncFunc/AsyncFuncTest.03.cs
rename to src/core-func-extensions/Func.Extensions.Tests/Test.AsyncFunc/AsyncFuncTest.03.cs
index 2d92b1bc..a0acc66b 100644
--- a/src/core-func-factory/Func.Factory.Tests/Test.AsyncFunc/AsyncFuncTest.03.cs
+++ b/src/core-func-extensions/Func.Extensions.Tests/Test.AsyncFunc/AsyncFuncTest.03.cs
@@ -12,19 +12,19 @@ namespace PrimeFuncPack.Core.Tests
partial class AsyncFuncTest
{
[Fact]
- public void Create_03_SourceFuncIsNull_ExpectArgumentNullException()
+ public void From_03_SourceFuncIsNull_ExpectArgumentNullException()
{
var sourceFunc = (Func>)null!;
- var ex = Assert.Throws(() => _ = Func.Create(sourceFunc));
+ var ex = Assert.Throws(() => _ = Func.From(sourceFunc));
Assert.Equal("funcAsync", ex.ParamName);
}
[Theory]
[MemberData(nameof(TestEntitySource.StructTypes), MemberType = typeof(TestEntitySource))]
- public async Task Create_03_ThenInvokeAsync_ExpectResultOfSourceFunc(
+ public async Task From_03_ThenInvokeAsync_ExpectResultOfSourceFunc(
StructType sourceFuncResult)
{
- var actual = Func.Create(
+ var actual = Func.From(
(_, _, _, _) => ValueTask.FromResult(sourceFuncResult));
var cancellationToken = new CancellationToken(canceled: false);
diff --git a/src/core-func-factory/Func.Factory.Tests/Test.AsyncFunc/AsyncFuncTest.04.cs b/src/core-func-extensions/Func.Extensions.Tests/Test.AsyncFunc/AsyncFuncTest.04.cs
similarity index 80%
rename from src/core-func-factory/Func.Factory.Tests/Test.AsyncFunc/AsyncFuncTest.04.cs
rename to src/core-func-extensions/Func.Extensions.Tests/Test.AsyncFunc/AsyncFuncTest.04.cs
index be3674d0..0ffd2488 100644
--- a/src/core-func-factory/Func.Factory.Tests/Test.AsyncFunc/AsyncFuncTest.04.cs
+++ b/src/core-func-extensions/Func.Extensions.Tests/Test.AsyncFunc/AsyncFuncTest.04.cs
@@ -12,19 +12,19 @@ namespace PrimeFuncPack.Core.Tests
partial class AsyncFuncTest
{
[Fact]
- public void Create_04_SourceFuncIsNull_ExpectArgumentNullException()
+ public void From_04_SourceFuncIsNull_ExpectArgumentNullException()
{
var sourceFunc = (Func>)null!;
- var ex = Assert.Throws(() => _ = Func.Create(sourceFunc));
+ var ex = Assert.Throws(() => _ = Func.From(sourceFunc));
Assert.Equal("funcAsync", ex.ParamName);
}
[Theory]
[MemberData(nameof(TestEntitySource.RefTypes), MemberType = typeof(TestEntitySource))]
- public async Task Create_04_ThenInvokeAsync_ExpectResultOfSourceFunc(
+ public async Task From_04_ThenInvokeAsync_ExpectResultOfSourceFunc(
RefType? sourceFuncResult)
{
- var actual = Func.Create