From 444f759e6688de7fb61bd8487b8d1fe5f15c5297 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Fri, 10 Nov 2023 09:47:16 +0100 Subject: [PATCH 01/18] (build) Updated Cake Tool to version 3.2.0 --- .config/dotnet-tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 8f3a4382f2..c33ff7cb55 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "cake.tool": { - "version": "3.1.0", + "version": "3.2.0", "commands": [ "dotnet-cake" ] From 8047ae45bb969ccd678d133168294cf5a919777d Mon Sep 17 00:00:00 2001 From: "C. Augusto Proiete" Date: Tue, 14 Nov 2023 17:14:43 -0400 Subject: [PATCH 02/18] GH-4132: Add File APIs for setting timestamps (creation time, last write time, last access time) (#4133) (GH-4132) Add File APIs for setting timestamps (creation time, last write time, last access time) --- src/Cake.Core/IO/File.cs | 42 +++++++++++++++++++++++++++++++++ src/Cake.Core/IO/IFile.cs | 45 +++++++++++++++++++++++++++++++++++- src/Cake.Testing/FakeFile.cs | 38 +++++++++++++++++++++++++++++- 3 files changed, 123 insertions(+), 2 deletions(-) diff --git a/src/Cake.Core/IO/File.cs b/src/Cake.Core/IO/File.cs index d100381ffc..3ee422e20a 100644 --- a/src/Cake.Core/IO/File.cs +++ b/src/Cake.Core/IO/File.cs @@ -62,5 +62,47 @@ public Stream Open(FileMode fileMode, FileAccess fileAccess, FileShare fileShare { return _file.Open(fileMode, fileAccess, fileShare); } + + /// + public IFile SetCreationTime(DateTime creationTime) + { + System.IO.File.SetCreationTime(Path.FullPath, creationTime); + return this; + } + + /// + public IFile SetCreationTimeUtc(DateTime creationTimeUtc) + { + System.IO.File.SetCreationTimeUtc(Path.FullPath, creationTimeUtc); + return this; + } + + /// + public IFile SetLastAccessTime(DateTime lastAccessTime) + { + System.IO.File.SetLastAccessTime(Path.FullPath, lastAccessTime); + return this; + } + + /// + public IFile SetLastAccessTimeUtc(DateTime lastAccessTimeUtc) + { + System.IO.File.SetLastAccessTimeUtc(Path.FullPath, lastAccessTimeUtc); + return this; + } + + /// + public IFile SetLastWriteTime(DateTime lastWriteTime) + { + System.IO.File.SetLastWriteTime(Path.FullPath, lastWriteTime); + return this; + } + + /// + public IFile SetLastWriteTimeUtc(DateTime lastWriteTimeUtc) + { + System.IO.File.SetLastWriteTimeUtc(Path.FullPath, lastWriteTimeUtc); + return this; + } } } \ No newline at end of file diff --git a/src/Cake.Core/IO/IFile.cs b/src/Cake.Core/IO/IFile.cs index 102eb8a06a..0bb6851b6e 100644 --- a/src/Cake.Core/IO/IFile.cs +++ b/src/Cake.Core/IO/IFile.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System; using System.IO; namespace Cake.Core.IO @@ -55,5 +56,47 @@ public interface IFile : IFileSystemInfo /// The file share. /// A to the file. Stream Open(FileMode fileMode, FileAccess fileAccess, FileShare fileShare); + + /// + /// Sets the date and time that the file was created. + /// + /// A containing the value to set for the creation date and time of path. This value is expressed in local time. + /// A instance representing the specified path. + IFile SetCreationTime(DateTime creationTime) => this; + + /// + /// Sets the date and time, in Coordinated Universal Time (UTC), that the file was created. + /// + /// A containing the value to set for the creation date and time of path. This value is expressed in UTC time. + /// A instance representing the specified path. + IFile SetCreationTimeUtc(DateTime creationTimeUtc) => this; + + /// + /// Sets the date and time that the specified file or directory was last accessed. + /// + /// A containing the value to set for the last access date and time of path. This value is expressed in local time. + /// A instance representing the specified path. + IFile SetLastAccessTime(DateTime lastAccessTime) => this; + + /// + /// Sets the date and time, in Coordinated Universal Time (UTC), that the specified file or directory was last accessed. + /// + /// A containing the value to set for the last access date and time of path. This value is expressed in local time. + /// A instance representing the specified path. + IFile SetLastAccessTimeUtc(DateTime lastAccessTimeUtc) => this; + + /// + /// Sets the date and time that the specified file or directory was last written to. + /// + /// A containing the value to set for the last access date and time of path. This value is expressed in local time. + /// A instance representing the specified path. + IFile SetLastWriteTime(DateTime lastWriteTime) => this; + + /// + /// Sets the date and time, in Coordinated Universal Time (UTC), that the specified file or directory was last written to. + /// + /// A containing the value to set for the last access date and time of path. This value is expressed in local time. + /// A instance representing the specified path. + IFile SetLastWriteTimeUtc(DateTime lastWriteTimeUtc) => this; } -} \ No newline at end of file +} diff --git a/src/Cake.Testing/FakeFile.cs b/src/Cake.Testing/FakeFile.cs index 5cc67671b2..e8705f1cf7 100644 --- a/src/Cake.Testing/FakeFile.cs +++ b/src/Cake.Testing/FakeFile.cs @@ -157,5 +157,41 @@ private long GetPosition(FileMode fileMode, out bool fileWasCreated) } throw new NotSupportedException(); } + + /// + public IFile SetCreationTime(DateTime creationTime) + { + return this; + } + + /// + public IFile SetCreationTimeUtc(DateTime creationTimeUtc) + { + return this; + } + + /// + public IFile SetLastAccessTime(DateTime lastAccessTime) + { + return this; + } + + /// + public IFile SetLastAccessTimeUtc(DateTime lastAccessTimeUtc) + { + return this; + } + + /// + public IFile SetLastWriteTime(DateTime lastWriteTime) + { + return this; + } + + /// + public IFile SetLastWriteTimeUtc(DateTime lastWriteTimeUtc) + { + return this; + } } -} \ No newline at end of file +} From 03470560f6b9eec0227d939f2ac1c070911eee0a Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Tue, 14 Nov 2023 22:09:04 +0100 Subject: [PATCH 03/18] (GH-4247) Update xunit to 2.6.1 * fixes #4247 --- src/Cake.Common.Tests/Cake.Common.Tests.csproj | 2 +- src/Cake.Core.Tests/Cake.Core.Tests.csproj | 2 +- .../Cake.DotNetTool.Module.Tests.csproj | 2 +- src/Cake.Frosting.Tests/Cake.Frosting.Tests.csproj | 2 +- src/Cake.NuGet.Tests/Cake.NuGet.Tests.csproj | 2 +- src/Cake.Testing.Xunit/Cake.Testing.Xunit.csproj | 2 +- src/Cake.Tests/Cake.Tests.csproj | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Cake.Common.Tests/Cake.Common.Tests.csproj b/src/Cake.Common.Tests/Cake.Common.Tests.csproj index 77e3c8f9af..71f31478f9 100644 --- a/src/Cake.Common.Tests/Cake.Common.Tests.csproj +++ b/src/Cake.Common.Tests/Cake.Common.Tests.csproj @@ -17,7 +17,7 @@ - + all runtime; build; native; contentfiles; analyzers diff --git a/src/Cake.Core.Tests/Cake.Core.Tests.csproj b/src/Cake.Core.Tests/Cake.Core.Tests.csproj index 617f0a86cd..f10330c70e 100644 --- a/src/Cake.Core.Tests/Cake.Core.Tests.csproj +++ b/src/Cake.Core.Tests/Cake.Core.Tests.csproj @@ -15,7 +15,7 @@ - + all runtime; build; native; contentfiles; analyzers diff --git a/src/Cake.DotNetTool.Module.Tests/Cake.DotNetTool.Module.Tests.csproj b/src/Cake.DotNetTool.Module.Tests/Cake.DotNetTool.Module.Tests.csproj index 049ca37bd7..9fdccc2cb0 100644 --- a/src/Cake.DotNetTool.Module.Tests/Cake.DotNetTool.Module.Tests.csproj +++ b/src/Cake.DotNetTool.Module.Tests/Cake.DotNetTool.Module.Tests.csproj @@ -17,7 +17,7 @@ - + all runtime; build; native; contentfiles; analyzers diff --git a/src/Cake.Frosting.Tests/Cake.Frosting.Tests.csproj b/src/Cake.Frosting.Tests/Cake.Frosting.Tests.csproj index e500faf181..ae699cd100 100644 --- a/src/Cake.Frosting.Tests/Cake.Frosting.Tests.csproj +++ b/src/Cake.Frosting.Tests/Cake.Frosting.Tests.csproj @@ -10,7 +10,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Cake.NuGet.Tests/Cake.NuGet.Tests.csproj b/src/Cake.NuGet.Tests/Cake.NuGet.Tests.csproj index 6b46c84ff0..39e76e0e32 100644 --- a/src/Cake.NuGet.Tests/Cake.NuGet.Tests.csproj +++ b/src/Cake.NuGet.Tests/Cake.NuGet.Tests.csproj @@ -16,7 +16,7 @@ - + all runtime; build; native; contentfiles; analyzers diff --git a/src/Cake.Testing.Xunit/Cake.Testing.Xunit.csproj b/src/Cake.Testing.Xunit/Cake.Testing.Xunit.csproj index 4575a25519..178063f110 100644 --- a/src/Cake.Testing.Xunit/Cake.Testing.Xunit.csproj +++ b/src/Cake.Testing.Xunit/Cake.Testing.Xunit.csproj @@ -11,7 +11,7 @@ - + diff --git a/src/Cake.Tests/Cake.Tests.csproj b/src/Cake.Tests/Cake.Tests.csproj index 7990841020..5998756fe1 100644 --- a/src/Cake.Tests/Cake.Tests.csproj +++ b/src/Cake.Tests/Cake.Tests.csproj @@ -11,7 +11,7 @@ - + all runtime; build; native; contentfiles; analyzers From a842f8c71d501293f0ea5725b6463fcda2b23d37 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Tue, 14 Nov 2023 22:10:51 +0100 Subject: [PATCH 04/18] (GH-4248) Update Microsoft.NET.Test.Sdk to 17.8.0 * fixes #4248 --- src/Cake.Common.Tests/Cake.Common.Tests.csproj | 2 +- src/Cake.Core.Tests/Cake.Core.Tests.csproj | 2 +- .../Cake.DotNetTool.Module.Tests.csproj | 2 +- src/Cake.Frosting.Tests/Cake.Frosting.Tests.csproj | 4 ++-- src/Cake.NuGet.Tests/Cake.NuGet.Tests.csproj | 2 +- src/Cake.Tests/Cake.Tests.csproj | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Cake.Common.Tests/Cake.Common.Tests.csproj b/src/Cake.Common.Tests/Cake.Common.Tests.csproj index 71f31478f9..252d2ff0b3 100644 --- a/src/Cake.Common.Tests/Cake.Common.Tests.csproj +++ b/src/Cake.Common.Tests/Cake.Common.Tests.csproj @@ -16,7 +16,7 @@ - + all diff --git a/src/Cake.Core.Tests/Cake.Core.Tests.csproj b/src/Cake.Core.Tests/Cake.Core.Tests.csproj index f10330c70e..7ed265ca0b 100644 --- a/src/Cake.Core.Tests/Cake.Core.Tests.csproj +++ b/src/Cake.Core.Tests/Cake.Core.Tests.csproj @@ -14,7 +14,7 @@ - + all diff --git a/src/Cake.DotNetTool.Module.Tests/Cake.DotNetTool.Module.Tests.csproj b/src/Cake.DotNetTool.Module.Tests/Cake.DotNetTool.Module.Tests.csproj index 9fdccc2cb0..36f0148820 100644 --- a/src/Cake.DotNetTool.Module.Tests/Cake.DotNetTool.Module.Tests.csproj +++ b/src/Cake.DotNetTool.Module.Tests/Cake.DotNetTool.Module.Tests.csproj @@ -16,7 +16,7 @@ - + all diff --git a/src/Cake.Frosting.Tests/Cake.Frosting.Tests.csproj b/src/Cake.Frosting.Tests/Cake.Frosting.Tests.csproj index ae699cd100..ee2e8c5d54 100644 --- a/src/Cake.Frosting.Tests/Cake.Frosting.Tests.csproj +++ b/src/Cake.Frosting.Tests/Cake.Frosting.Tests.csproj @@ -8,8 +8,8 @@ - - + + all diff --git a/src/Cake.NuGet.Tests/Cake.NuGet.Tests.csproj b/src/Cake.NuGet.Tests/Cake.NuGet.Tests.csproj index 39e76e0e32..10ba35d167 100644 --- a/src/Cake.NuGet.Tests/Cake.NuGet.Tests.csproj +++ b/src/Cake.NuGet.Tests/Cake.NuGet.Tests.csproj @@ -15,7 +15,7 @@ - + all diff --git a/src/Cake.Tests/Cake.Tests.csproj b/src/Cake.Tests/Cake.Tests.csproj index 5998756fe1..5342cc1d6a 100644 --- a/src/Cake.Tests/Cake.Tests.csproj +++ b/src/Cake.Tests/Cake.Tests.csproj @@ -10,7 +10,7 @@ - + all From b8f2771648a94ee95898ddcd8a7fdc9715d634b2 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Tue, 14 Nov 2023 22:12:48 +0100 Subject: [PATCH 05/18] (GH-4249) Update Microsoft.Extensions.DependencyInjection to 8.0.0 * fixes #4249 --- src/Cake.Frosting/Cake.Frosting.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cake.Frosting/Cake.Frosting.csproj b/src/Cake.Frosting/Cake.Frosting.csproj index f5541fc85c..629957d9ff 100644 --- a/src/Cake.Frosting/Cake.Frosting.csproj +++ b/src/Cake.Frosting/Cake.Frosting.csproj @@ -12,7 +12,7 @@ - + From ef99348235c627e72b6d5bc1fdba67a722f9a323 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Tue, 14 Nov 2023 22:17:00 +0100 Subject: [PATCH 06/18] (GH-4250) Update System.Collections.Immutable to 8.0.0 * fixes #4250 --- src/Cake/Cake.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cake/Cake.csproj b/src/Cake/Cake.csproj index 2b5607877d..aaba55871a 100644 --- a/src/Cake/Cake.csproj +++ b/src/Cake/Cake.csproj @@ -27,7 +27,7 @@ - + From 29896fb5fd3e7c10a0ae1375bd28271b56219c24 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Tue, 14 Nov 2023 22:18:14 +0100 Subject: [PATCH 07/18] (GH-4251) Update System.Reflection.Metadata 8.0.0 * fixes #4251 --- src/Cake/Cake.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cake/Cake.csproj b/src/Cake/Cake.csproj index aaba55871a..f3f9ca5719 100644 --- a/src/Cake/Cake.csproj +++ b/src/Cake/Cake.csproj @@ -28,7 +28,7 @@ - + From 5c84ee6e097506aecfa0d1945be828359124bb71 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Wed, 15 Nov 2023 08:21:31 +0100 Subject: [PATCH 08/18] (GH-4252) Update .NET SDK to 8.0.100 * fixes #4252 --- .github/workflows/build.yml | 10 ++++-- GitVersion.yml | 2 +- build.cake | 5 +-- global.json | 2 +- src/Cake.Core.Tests/Unit/CakeRuntimeTests.cs | 4 ++- src/Cake.Core/Scripting/ScriptConventions.cs | 3 ++ .../Cake.Frosting.Template.csproj | 2 +- .../.template.config/template.json | 6 +++- src/Cake/Cake.csproj | 3 +- .../Scripting/ReferenceAssemblyResolver.cs | 4 ++- src/Shared.msbuild | 4 +-- .../ValidateGitHubActionsProvider.cake | 9 +++-- .../Tools/Command/CommandAliases.cake | 33 +++++++++++++++---- .../Tools/DotNet/DotNetAliases.cake | 10 +++--- .../Cake.Core/Scripting/AddinDirective.cake | 3 +- .../Cake.Core/Scripting/DefineDirective.cake | 30 +++++++++++++---- .../Cake.Frosting/build/Build.csproj | 2 +- .../DotNet/hwapp.tests/hwapp.tests.csproj | 13 +++++--- .../Tools/DotNet/hwapp/hwapp.csproj | 2 +- 19 files changed, 105 insertions(+), 42 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d5111f6d32..1209ef9f18 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,10 +20,13 @@ jobs: with: fetch-depth: 0 - - name: Install .NET SDK 6.0.x + - name: Install .NET SDK 6.0.x - 8.0.x uses: actions/setup-dotnet@v3 with: - dotnet-version: '6.0.x' + dotnet-version: | + 6.0.x + 7.0.x + 8.0.x - name: Install .NET Core SDK (global.json) uses: actions/setup-dotnet@v3 @@ -46,4 +49,5 @@ jobs: arguments: | CAKE_NETCOREAPP_6_0_VERSION_OS: ${{ steps.build-cake.outputs.CAKE_NETCOREAPP_6_0_VERSION_OS }} CAKE_NETCOREAPP_7_0_VERSION_OS: ${{ steps.build-cake.outputs.CAKE_NETCOREAPP_7_0_VERSION_OS }} - + CAKE_NETCOREAPP_8_0_VERSION_OS: ${{ steps.build-cake.outputs.CAKE_NETCOREAPP_8_0_VERSION_OS }} + ValidateGitHubActionsProvider: true diff --git a/GitVersion.yml b/GitVersion.yml index e34c9bf3b0..08f41c59b1 100644 --- a/GitVersion.yml +++ b/GitVersion.yml @@ -1,4 +1,4 @@ -next-version: 3.0.0 +next-version: 4.0.0 branches: master: regex: main diff --git a/build.cake b/build.cake index 41a4007690..a74183d668 100644 --- a/build.cake +++ b/build.cake @@ -108,7 +108,7 @@ Task("Run-Unit-Tests") () => GetFiles("./src/**/*.Tests.csproj"), (parameters, project, context) => { - foreach(var framework in new[] { "net6.0", "net7.0" }) + foreach(var framework in new[] { "net6.0", "net7.0", "net8.0" }) { FilePath testResultsPath = MakeAbsolute(parameters.Paths.Directories.TestResults .CombineWithFilePath($"{project.GetFilenameWithoutExtension()}_{framework}_TestResults.xml")); @@ -368,7 +368,8 @@ Task("Run-Integration-Tests") .DoesForEach( parameters => new[] { GetFiles($"{parameters.Paths.Directories.IntegrationTestsBinTool.FullPath}/**/net6.0/**/Cake.dll").Single(), - GetFiles($"{parameters.Paths.Directories.IntegrationTestsBinTool.FullPath}/**/net7.0/**/Cake.dll").Single() + GetFiles($"{parameters.Paths.Directories.IntegrationTestsBinTool.FullPath}/**/net7.0/**/Cake.dll").Single(), + GetFiles($"{parameters.Paths.Directories.IntegrationTestsBinTool.FullPath}/**/net8.0/**/Cake.dll").Single() }, (parameters, cakeAssembly, context) => { diff --git a/global.json b/global.json index 52954cc8d6..05239f3b96 100644 --- a/global.json +++ b/global.json @@ -3,7 +3,7 @@ "src" ], "sdk": { - "version": "7.0.403", + "version": "8.0.100", "rollForward": "latestFeature" } } \ No newline at end of file diff --git a/src/Cake.Core.Tests/Unit/CakeRuntimeTests.cs b/src/Cake.Core.Tests/Unit/CakeRuntimeTests.cs index 65cb681b09..54a72754a1 100644 --- a/src/Cake.Core.Tests/Unit/CakeRuntimeTests.cs +++ b/src/Cake.Core.Tests/Unit/CakeRuntimeTests.cs @@ -39,7 +39,9 @@ public void Should_Return_Correct_Result_For_CoreClr() Assert.Equal(".NETStandard,Version=v2.0", framework.FullName); #else var expect = string.Concat(".NETCoreApp,Version=v", -#if NET7_0 +#if NET8_0 + "8.0"); +#elif NET7_0 "7.0"); #elif NET6_0 "6.0"); diff --git a/src/Cake.Core/Scripting/ScriptConventions.cs b/src/Cake.Core/Scripting/ScriptConventions.cs index 91d6115467..10d76814dc 100644 --- a/src/Cake.Core/Scripting/ScriptConventions.cs +++ b/src/Cake.Core/Scripting/ScriptConventions.cs @@ -125,6 +125,9 @@ private string GetFrameworkDefine() case ".NETCoreApp,Version=v7.0": return "NET7_0"; + case ".NETCoreApp,Version=v8.0": + return "NET8_0"; + default: Console.Error.WriteLine(_runtime.BuiltFramework.FullName); Console.Error.Flush(); diff --git a/src/Cake.Frosting.Template/Cake.Frosting.Template.csproj b/src/Cake.Frosting.Template/Cake.Frosting.Template.csproj index b2d7b86f2e..36aec71de6 100644 --- a/src/Cake.Frosting.Template/Cake.Frosting.Template.csproj +++ b/src/Cake.Frosting.Template/Cake.Frosting.Template.csproj @@ -5,7 +5,7 @@ Cake.Frosting.Template Cake.Frosting templates for the .NET SDK. Cake.Frosting templates for the .NET SDK. - net7.0 + net8.0 true false content diff --git a/src/Cake.Frosting.Template/templates/cakefrosting/.template.config/template.json b/src/Cake.Frosting.Template/templates/cakefrosting/.template.config/template.json index 46901ce9f3..e146824c5a 100644 --- a/src/Cake.Frosting.Template/templates/cakefrosting/.template.config/template.json +++ b/src/Cake.Frosting.Template/templates/cakefrosting/.template.config/template.json @@ -17,7 +17,7 @@ "type": "parameter", "description": "The target framework for the project.", "datatype": "choice", - "defaultValue": "net7.0", + "defaultValue": "net8.0", "replaces": "TargetFrameworkValue", "choices": [ { @@ -27,6 +27,10 @@ { "choice": "net7.0", "description": "Target .NET 7" + }, + { + "choice": "net8.0", + "description": "Target .NET 8" } ] } diff --git a/src/Cake/Cake.csproj b/src/Cake/Cake.csproj index f3f9ca5719..2e101eb3cc 100644 --- a/src/Cake/Cake.csproj +++ b/src/Cake/Cake.csproj @@ -26,10 +26,11 @@ - + + diff --git a/src/Cake/Infrastructure/Scripting/ReferenceAssemblyResolver.cs b/src/Cake/Infrastructure/Scripting/ReferenceAssemblyResolver.cs index 3c20c2b706..aa84dd8655 100644 --- a/src/Cake/Infrastructure/Scripting/ReferenceAssemblyResolver.cs +++ b/src/Cake/Infrastructure/Scripting/ReferenceAssemblyResolver.cs @@ -24,8 +24,10 @@ IEnumerable TryGetReferenceAssemblies() foreach (var reference in #if NET6_0 Basic.Reference.Assemblies.Net60.References.All) -#else +#elif NET7_0 Basic.Reference.Assemblies.Net70.References.All) +#else + Basic.Reference.Assemblies.Net80.References.All) #endif { Assembly assembly; diff --git a/src/Shared.msbuild b/src/Shared.msbuild index c394ab929a..5de0cd2088 100644 --- a/src/Shared.msbuild +++ b/src/Shared.msbuild @@ -1,7 +1,7 @@ - net6.0;net7.0 + net6.0;net7.0;net8.0 $(AssemblyName) Copyright (c) .NET Foundation and contributors Patrik Svensson, Mattias Karlsson, Gary Ewan Park, Alistair Chapman, Martin Björkström, Dave Glick, Pascal Berger, Jérémie Desautels, Enrico Campidoglio, C. Augusto Proiete, Nils Andresen, and contributors @@ -17,7 +17,7 @@ - + 2.0.0 $(DefineConstants);NETCORE portable diff --git a/tests/integration/Cake.Common/Build/GitHubActions/ValidateGitHubActionsProvider.cake b/tests/integration/Cake.Common/Build/GitHubActions/ValidateGitHubActionsProvider.cake index 85afae1e8c..66075a10ad 100644 --- a/tests/integration/Cake.Common/Build/GitHubActions/ValidateGitHubActionsProvider.cake +++ b/tests/integration/Cake.Common/Build/GitHubActions/ValidateGitHubActionsProvider.cake @@ -21,7 +21,8 @@ Task("ValidateEnvironment") .DoesForEach( data => new [] { $"CAKE_{data.OS}_NETCOREAPP_6_0_VERSION", - $"CAKE_{data.OS}_NETCOREAPP_7_0_VERSION" + $"CAKE_{data.OS}_NETCOREAPP_7_0_VERSION", + $"CAKE_{data.OS}_NETCOREAPP_8_0_VERSION" }, (data, envKey) => Assert.Equal(data.GitVersion, EnvironmentVariable(envKey)) ); @@ -29,6 +30,7 @@ Task("ValidateEnvironment") Task("ValidatePath") .DoesForEach( new [] { + "Cake\\WTool\\Wtools\\Wnet8\\W0", "Cake\\WTool\\Wtools\\Wnet7\\W0", "Cake\\WTool\\Wtools\\Wnet6\\W0" }, @@ -38,8 +40,9 @@ Task("ValidatePath") Task("ValidateVariable") .DoesForEach( () => new [] { - $"CAKE_NETCOREAPP_6_0_VERSION_OS", - $"CAKE_NETCOREAPP_7_0_VERSION_OS" + "CAKE_NETCOREAPP_6_0_VERSION_OS", + "CAKE_NETCOREAPP_7_0_VERSION_OS", + "CAKE_NETCOREAPP_8_0_VERSION_OS" }, (data, varKey) => Assert.Equal(data.GitVersionAndOS, Argument(varKey)) ); diff --git a/tests/integration/Cake.Common/Tools/Command/CommandAliases.cake b/tests/integration/Cake.Common/Tools/Command/CommandAliases.cake index 835911d09d..34ecc2f4f4 100644 --- a/tests/integration/Cake.Common/Tools/Command/CommandAliases.cake +++ b/tests/integration/Cake.Common/Tools/Command/CommandAliases.cake @@ -31,9 +31,16 @@ Task("Cake.Common.Tools.Command.CommandAliases.CommandStandardOutput") List tools installed globally or locally. Usage: - dotnet tool list [options] + dotnet tool list [] [options] -Options:"; +Arguments: + The NuGet Package Id of the tool to list + +Options: + -g, --global List tools installed for the current user. + --local List the tools installed in the local tool manifest. + --tool-path The directory containing the tools to list. + -?, -h, --help Show command line help."; // When var exitCode = ctx.Command(settings.ToolExecutableNames, out var standardOutput, "tool list -h"); @@ -53,9 +60,16 @@ Task("Cake.Common.Tools.Command.CommandAliases.CommandStandardOutput.Settings") List tools installed globally or locally. Usage: - dotnet tool list [options] + dotnet tool list [] [options] + +Arguments: + The NuGet Package Id of the tool to list -Options:"; +Options: + -g, --global List tools installed for the current user. + --local List the tools installed in the local tool manifest. + --tool-path The directory containing the tools to list. + -?, -h, --help Show command line help."; // When var exitCode = ctx.Command(settings, out var standardOutput, "tool list -h"); @@ -75,9 +89,16 @@ Task("Cake.Common.Tools.Command.CommandAliases.CommandStandardOutput.SettingsCus List tools installed globally or locally. Usage: - dotnet tool list [options] + dotnet tool list [] [options] + +Arguments: + The NuGet Package Id of the tool to list -Options:"; +Options: + -g, --global List tools installed for the current user. + --local List the tools installed in the local tool manifest. + --tool-path The directory containing the tools to list. + -?, -h, --help Show command line help."; // When var exitCode = ctx.Command( diff --git a/tests/integration/Cake.Common/Tools/DotNet/DotNetAliases.cake b/tests/integration/Cake.Common/Tools/DotNet/DotNetAliases.cake index 66e835d469..63f9ef61f2 100644 --- a/tests/integration/Cake.Common/Tools/DotNet/DotNetAliases.cake +++ b/tests/integration/Cake.Common/Tools/DotNet/DotNetAliases.cake @@ -34,7 +34,7 @@ Task("Cake.Common.Tools.DotNet.DotNetAliases.DotNetBuild") // Given var path = Paths.Temp.Combine("./Cake.Common/Tools/DotNet"); var project = path.CombineWithFilePath("hwapp/hwapp.csproj"); - var assembly = path.CombineWithFilePath("hwapp/bin/Debug/net7.0/hwapp.dll"); + var assembly = path.CombineWithFilePath("hwapp/bin/Debug/net8.0/hwapp.dll"); // When DotNetBuild(project.FullPath); @@ -61,7 +61,7 @@ Task("Cake.Common.Tools.DotNet.DotNetAliases.DotNetVSTest") { // Given var path = Paths.Temp.Combine("./Cake.Common/Tools/DotNet"); - var assembly = path.CombineWithFilePath("hwapp.tests/bin/Debug/net7.0/hwapp.tests.dll"); + var assembly = path.CombineWithFilePath("hwapp.tests/bin/Debug/net8.0/hwapp.tests.dll"); // When DotNetVSTest(assembly.FullPath); @@ -184,7 +184,7 @@ Task("Cake.Common.Tools.DotNet.DotNetAliases.DotNetExecute") { // Given var path = Paths.Temp.Combine("./Cake.Common/Tools/DotNet"); - var assembly = path.CombineWithFilePath("hwapp/bin/Debug/net7.0/hwapp.dll"); + var assembly = path.CombineWithFilePath("hwapp/bin/Debug/net8.0/hwapp.dll"); // When DotNetExecute(assembly); @@ -197,7 +197,7 @@ Task("Cake.Common.Tools.DotNet.DotNetAliases.DotNetClean") // Given var path = Paths.Temp.Combine("./Cake.Common/Tools/DotNet"); var project = path.CombineWithFilePath("hwapp/hwapp.csproj"); - var assembly = path.CombineWithFilePath("hwapp/bin/Debug/net7.0/hwapp.dll"); + var assembly = path.CombineWithFilePath("hwapp/bin/Debug/net8.0/hwapp.dll"); Assert.True(System.IO.File.Exists(assembly.FullPath)); // When @@ -214,7 +214,7 @@ Task("Cake.Common.Tools.DotNet.DotNetAliases.DotNetMSBuild") // Given var path = Paths.Temp.Combine("./Cake.Common/Tools/DotNet"); var project = path.CombineWithFilePath("hwapp/hwapp.csproj"); - var assembly = path.CombineWithFilePath("hwapp/bin/Debug/net7.0/hwapp.dll"); + var assembly = path.CombineWithFilePath("hwapp/bin/Debug/net8.0/hwapp.dll"); // When DotNetMSBuild(project.FullPath); diff --git a/tests/integration/Cake.Core/Scripting/AddinDirective.cake b/tests/integration/Cake.Core/Scripting/AddinDirective.cake index 7ed5a21702..f9ee839f33 100644 --- a/tests/integration/Cake.Core/Scripting/AddinDirective.cake +++ b/tests/integration/Cake.Core/Scripting/AddinDirective.cake @@ -24,7 +24,8 @@ Task("Cake.Core.Scripting.AddinDirective.LoadTargetedAddin") cake switch { FilePath net6_0Path when net6_0Path.FullPath.Contains("net6.0") => "net6.0", - _ => "net7.0" + FilePath net7_0Path when net7_0Path.FullPath.Contains("net7.0") => "net7.0", + _ => "net8.0" } ); diff --git a/tests/integration/Cake.Core/Scripting/DefineDirective.cake b/tests/integration/Cake.Core/Scripting/DefineDirective.cake index 201d8dc6a2..9e55338918 100644 --- a/tests/integration/Cake.Core/Scripting/DefineDirective.cake +++ b/tests/integration/Cake.Core/Scripting/DefineDirective.cake @@ -52,6 +52,8 @@ Task("Cake.Core.Scripting.DefineDirective.Runtime") "6.0", #elif NET7_0 "7.0", +#elif NET8_0 + "8.0", #endif context.Environment.Runtime.BuiltFramework.FullName); }); @@ -68,7 +70,7 @@ Task("Cake.Core.Scripting.DefineDirective.Cake") Assert.True(cake); }); -#if NET6_0 || NET7_0 +#if NET6_0 || NET7_0 || NET8_0 Task("Cake.Core.Scripting.DefineDirective.C#9") .Does(() => { @@ -80,7 +82,7 @@ Task("Cake.Core.Scripting.DefineDirective.Cake") public record CSharpNine(bool IsNine); #endif -#if NET6_0 || NET7_0 +#if NET6_0 || NET7_0 || NET8_0 Task("Cake.Core.Scripting.DefineDirective.C#10") .Does(() => { @@ -97,7 +99,7 @@ public record CSharpNine(bool IsNine); #endif -#if NET7_0 +#if NET7_0 || NET8_0 Task("Cake.Core.Scripting.DefineDirective.C#11") .Does(() => { @@ -114,17 +116,33 @@ public record CSharpNine(bool IsNine); #endif +#if NET8_0 + Task("Cake.Core.Scripting.DefineDirective.C#12") + .Does(() => +{ + // Given / When / Then + int[] row0 = [1, 2, 3]; + int[] row1 = [4, 5, 6]; + int[] row2 = [7, 8, 9]; + int[] single = [..row0, ..row1, ..row2]; +}); + +#endif + ////////////////////////////////////////////////////////////////////////////// Task("Cake.Core.Scripting.DefineDirective") -#if NET6_0 || NET7_0 +#if NET6_0 || NET7_0 || NET8_0 .IsDependentOn("Cake.Core.Scripting.DefineDirective.C#9") #endif -#if NET6_0 || NET7_0 +#if NET6_0 || NET7_0 || NET8_0 .IsDependentOn("Cake.Core.Scripting.DefineDirective.C#10") #endif -#if NET7_0 +#if NET7_0 || NET8_0 .IsDependentOn("Cake.Core.Scripting.DefineDirective.C#11") +#endif +#if NET8_0 + .IsDependentOn("Cake.Core.Scripting.DefineDirective.C#12") #endif .IsDependentOn("Cake.Core.Scripting.DefineDirective.Defined") .IsDependentOn("Cake.Core.Scripting.DefineDirective.NotDefined") diff --git a/tests/integration/Cake.Frosting/build/Build.csproj b/tests/integration/Cake.Frosting/build/Build.csproj index 967a3cf7fc..cfa2e4c11c 100644 --- a/tests/integration/Cake.Frosting/build/Build.csproj +++ b/tests/integration/Cake.Frosting/build/Build.csproj @@ -2,7 +2,7 @@ Exe - net6.0;net7.0 + net6.0;net7.0;net8.0 true diff --git a/tests/integration/resources/Cake.Common/Tools/DotNet/hwapp.tests/hwapp.tests.csproj b/tests/integration/resources/Cake.Common/Tools/DotNet/hwapp.tests/hwapp.tests.csproj index 809b83300c..5ba87a6f84 100644 --- a/tests/integration/resources/Cake.Common/Tools/DotNet/hwapp.tests/hwapp.tests.csproj +++ b/tests/integration/resources/Cake.Common/Tools/DotNet/hwapp.tests/hwapp.tests.csproj @@ -1,15 +1,18 @@  - net7.0 + net8.0 false - - - - + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + diff --git a/tests/integration/resources/Cake.Common/Tools/DotNet/hwapp/hwapp.csproj b/tests/integration/resources/Cake.Common/Tools/DotNet/hwapp/hwapp.csproj index c54cbbeb30..b2fa4dff47 100644 --- a/tests/integration/resources/Cake.Common/Tools/DotNet/hwapp/hwapp.csproj +++ b/tests/integration/resources/Cake.Common/Tools/DotNet/hwapp/hwapp.csproj @@ -1,7 +1,7 @@  Exe - net7.0 + net8.0 From 42787d50d4ca8523ed865694b6f5f94c9a7144bf Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Wed, 15 Nov 2023 23:59:57 +0100 Subject: [PATCH 09/18] (GH-4255) Introduce Verify for CodeGen Expectations * fixes #4255 --- .gitignore | 5 ++- src/Cake.Core.Tests/Cake.Core.Tests.csproj | 3 +- .../Exceptions/CustomeExitCodeTests.cs | 26 ----------- ...name=Generic_ExtensionMethod.verified.txt} | 0 ...MethodWithGenericReturnValue.verified.txt} | 0 ...ValueAndTypeParamConstraints.verified.txt} | 0 ...ExtensionMethodWithParameter.verified.txt} | 0 ...MethodWithDynamicReturnValue.verified.txt} | 0 ...enericCollectionOfNestedType.verified.txt} | 0 ...ericExpressionArrayParameter.verified.txt} | 0 ...thGenericExpressionParameter.verified.txt} | 0 ...pressionParamsArrayParameter.verified.txt} | 0 ...onMethodWithGenericParameter.verified.txt} | 0 ...ensionMethodWithNoParameters.verified.txt} | 0 ...WithOptionalBooleanParameter.verified.txt} | 0 ...hodWithOptionalCharParameter.verified.txt} | 0 ...WithOptionalDecimalParameter.verified.txt} | 0 ...hodWithOptionalEnumParameter.verified.txt} | 0 ...onalNullableBooleanParameter.verified.txt} | 0 ...ptionalNullableCharParameter.verified.txt} | 0 ...onalNullableDecimalParameter.verified.txt} | 0 ...ionalNullableDoubleParameter.verified.txt} | 0 ...ptionalNullableEnumParameter.verified.txt} | 0 ...ptionalNullableLongParameter.verified.txt} | 0 ...thOptionalNullableTParameter.verified.txt} | 0 ...dWithOptionalObjectParameter.verified.txt} | 0 ...dWithOptionalStringParameter.verified.txt} | 0 ...ionMethodWithOutputParameter.verified.txt} | 0 ...ExtensionMethodWithParameter.verified.txt} | 0 ...sionMethodWithParameterArray.verified.txt} | 0 ...ethodWithParameterAttributes.verified.txt} | 0 ...WithReservedKeywordParameter.verified.txt} | 0 ...tensionMethodWithReturnValue.verified.txt} | 0 ...te_ExplicitError_WithMessage.verified.txt} | 0 ..._ExplicitWarning_WithMessage.verified.txt} | 0 ...te_ImplicitWarning_NoMessage.verified.txt} | 0 ..._ImplicitWarning_WithMessage.verified.txt} | 0 ...te_ExplicitError_WithMessage.verified.txt} | 0 ..._ExplicitWarning_WithMessage.verified.txt} | 0 ...te_ImplicitWarning_NoMessage.verified.txt} | 0 ..._ImplicitWarning_WithMessage.verified.txt} | 0 ...ies_name=Cached_Dynamic_Type.verified.txt} | 0 ...s_name=Cached_Reference_Type.verified.txt} | 0 ...rties_name=Cached_Value_Type.verified.txt} | 0 ...te_ExplicitError_WithMessage.verified.txt} | 0 ..._ExplicitWarning_WithMessage.verified.txt} | 0 ...te_ImplicitWarning_NoMessage.verified.txt} | 0 ..._ImplicitWarning_WithMessage.verified.txt} | 0 ..._name=NonCached_Dynamic_Type.verified.txt} | 0 ...es_name=NonCached_Value_Type.verified.txt} | 0 .../Fixtures/MethodAliasGeneratorFixture.cs | 19 -------- .../Fixtures/PropertyAliasGeneratorFixture.cs | 17 ------- ...nGeneric_ExtensionMethodWithArrayParameter | 5 --- .../CodeGen/MethodAliasGeneratorTests.cs | 35 +++++++-------- .../CodeGen/PropertyAliasGeneratorTests.cs | 45 +++++++++---------- src/Cake.Core.Tests/VerifyConfig.cs | 15 +++++++ 56 files changed, 59 insertions(+), 111 deletions(-) delete mode 100644 src/Cake.Core.Tests/Exceptions/CustomeExitCodeTests.cs rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Methods/Generic_ExtensionMethod => Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethod.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Methods/Generic_ExtensionMethodWithGenericReturnValue => Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithGenericReturnValue.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Methods/Generic_ExtensionMethodWithGenericReturnValueAndTypeParamConstraints => Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithGenericReturnValueAndTypeParamConstraints.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Methods/Generic_ExtensionMethodWithParameter => Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithParameter.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithDynamicReturnValue => Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithDynamicReturnValue.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithGenericCollectionOfNestedType => Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericCollectionOfNestedType.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithGenericExpressionArrayParameter => Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericExpressionArrayParameter.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithGenericExpressionParameter => Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericExpressionParameter.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithGenericExpressionParamsArrayParameter => Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericExpressionParamsArrayParameter.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithGenericParameter => Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericParameter.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithNoParameters => Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithNoParameters.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalBooleanParameter => Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalBooleanParameter.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalCharParameter => Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalCharParameter.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalDecimalParameter => Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalDecimalParameter.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalEnumParameter => Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalEnumParameter.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableBooleanParameter => Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableBooleanParameter.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableCharParameter => Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableCharParameter.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableDecimalParameter => Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableDecimalParameter.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableDoubleParameter => Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableDoubleParameter.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableEnumParameter => Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableEnumParameter.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableLongParameter => Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableLongParameter.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableTParameter => Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableTParameter.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalObjectParameter => Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalObjectParameter.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalStringParameter => Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalStringParameter.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOutputParameter => Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOutputParameter.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithParameter => Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithParameter.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithParameterArray => Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithParameterArray.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithParameterAttributes => Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithParameterAttributes.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithReservedKeywordParameter => Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithReservedKeywordParameter.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithReturnValue => Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithReturnValue.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Methods/Obsolete_ExplicitError_WithMessage => Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ExplicitError_WithMessage.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Methods/Obsolete_ExplicitWarning_WithMessage => Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ExplicitWarning_WithMessage.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Methods/Obsolete_ImplicitWarning_NoMessage => Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ImplicitWarning_NoMessage.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Methods/Obsolete_ImplicitWarning_WithMessage => Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ImplicitWarning_WithMessage.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Properties/Cached_Obsolete_ExplicitError_WithMessage => Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ExplicitError_WithMessage.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Properties/Cached_Obsolete_ExplicitWarning_WithMessage => Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ExplicitWarning_WithMessage.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Properties/Cached_Obsolete_ImplicitWarning_NoMessage => Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ImplicitWarning_NoMessage.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Properties/Cached_Obsolete_ImplicitWarning_WithMessage => Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ImplicitWarning_WithMessage.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Properties/Cached_Dynamic_Type => Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Dynamic_Type.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Properties/Cached_Reference_Type => Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Reference_Type.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Properties/Cached_Value_Type => Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Value_Type.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Properties/NonCached_Obsolete_ExplicitError_WithMessage => Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ExplicitError_WithMessage.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Properties/NonCached_Obsolete_ExplicitWarning_WithMessage => Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ExplicitWarning_WithMessage.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Properties/NonCached_Obsolete_ImplicitWarning_NoMessage => Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ImplicitWarning_NoMessage.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Properties/NonCached_Obsolete_ImplicitWarning_WithMessage => Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ImplicitWarning_WithMessage.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Properties/NonCached_Dynamic_Type => Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Properties_name=NonCached_Dynamic_Type.verified.txt} (100%) rename src/Cake.Core.Tests/{Unit/Scripting/CodeGen/Expected/Properties/NonCached_Value_Type => Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Properties_name=NonCached_Value_Type.verified.txt} (100%) delete mode 100644 src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithArrayParameter create mode 100644 src/Cake.Core.Tests/VerifyConfig.cs diff --git a/.gitignore b/.gitignore index 9bc26f7992..98ea8ea147 100644 --- a/.gitignore +++ b/.gitignore @@ -94,4 +94,7 @@ Thumbs.db .DS_Store # Generated Assembly info -AssemblyInfo.Generated.cs \ No newline at end of file +AssemblyInfo.Generated.cs + +# Verify +*.received \ No newline at end of file diff --git a/src/Cake.Core.Tests/Cake.Core.Tests.csproj b/src/Cake.Core.Tests/Cake.Core.Tests.csproj index 7ed265ca0b..1ce40c3a19 100644 --- a/src/Cake.Core.Tests/Cake.Core.Tests.csproj +++ b/src/Cake.Core.Tests/Cake.Core.Tests.csproj @@ -15,6 +15,8 @@ + + all @@ -24,7 +26,6 @@ - \ No newline at end of file diff --git a/src/Cake.Core.Tests/Exceptions/CustomeExitCodeTests.cs b/src/Cake.Core.Tests/Exceptions/CustomeExitCodeTests.cs deleted file mode 100644 index 38b37db0e7..0000000000 --- a/src/Cake.Core.Tests/Exceptions/CustomeExitCodeTests.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Xunit; - -namespace Cake.Core.Tests.Exceptions -{ - public class CustomeExitCodeTests - { - [Fact] - public void Should_Return_Default_ExitCode() - { - var exception = new CakeException(); - Assert.Equal(1, exception.ExitCode); - } - - [Fact] - public void Should_Return_Custom_ExitCode() - { - var exception = new CakeException(5); - Assert.Equal(5, exception.ExitCode); - } - } -} diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Generic_ExtensionMethod b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethod.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Generic_ExtensionMethod rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethod.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Generic_ExtensionMethodWithGenericReturnValue b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithGenericReturnValue.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Generic_ExtensionMethodWithGenericReturnValue rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithGenericReturnValue.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Generic_ExtensionMethodWithGenericReturnValueAndTypeParamConstraints b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithGenericReturnValueAndTypeParamConstraints.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Generic_ExtensionMethodWithGenericReturnValueAndTypeParamConstraints rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithGenericReturnValueAndTypeParamConstraints.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Generic_ExtensionMethodWithParameter b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithParameter.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Generic_ExtensionMethodWithParameter rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithParameter.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithDynamicReturnValue b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithDynamicReturnValue.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithDynamicReturnValue rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithDynamicReturnValue.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithGenericCollectionOfNestedType b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericCollectionOfNestedType.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithGenericCollectionOfNestedType rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericCollectionOfNestedType.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithGenericExpressionArrayParameter b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericExpressionArrayParameter.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithGenericExpressionArrayParameter rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericExpressionArrayParameter.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithGenericExpressionParameter b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericExpressionParameter.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithGenericExpressionParameter rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericExpressionParameter.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithGenericExpressionParamsArrayParameter b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericExpressionParamsArrayParameter.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithGenericExpressionParamsArrayParameter rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericExpressionParamsArrayParameter.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithGenericParameter b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericParameter.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithGenericParameter rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericParameter.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithNoParameters b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithNoParameters.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithNoParameters rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithNoParameters.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalBooleanParameter b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalBooleanParameter.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalBooleanParameter rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalBooleanParameter.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalCharParameter b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalCharParameter.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalCharParameter rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalCharParameter.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalDecimalParameter b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalDecimalParameter.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalDecimalParameter rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalDecimalParameter.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalEnumParameter b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalEnumParameter.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalEnumParameter rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalEnumParameter.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableBooleanParameter b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableBooleanParameter.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableBooleanParameter rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableBooleanParameter.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableCharParameter b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableCharParameter.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableCharParameter rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableCharParameter.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableDecimalParameter b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableDecimalParameter.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableDecimalParameter rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableDecimalParameter.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableDoubleParameter b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableDoubleParameter.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableDoubleParameter rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableDoubleParameter.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableEnumParameter b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableEnumParameter.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableEnumParameter rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableEnumParameter.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableLongParameter b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableLongParameter.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableLongParameter rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableLongParameter.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableTParameter b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableTParameter.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableTParameter rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableTParameter.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalObjectParameter b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalObjectParameter.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalObjectParameter rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalObjectParameter.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalStringParameter b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalStringParameter.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalStringParameter rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalStringParameter.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOutputParameter b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOutputParameter.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOutputParameter rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOutputParameter.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithParameter b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithParameter.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithParameter rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithParameter.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithParameterArray b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithParameterArray.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithParameterArray rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithParameterArray.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithParameterAttributes b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithParameterAttributes.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithParameterAttributes rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithParameterAttributes.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithReservedKeywordParameter b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithReservedKeywordParameter.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithReservedKeywordParameter rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithReservedKeywordParameter.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithReturnValue b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithReturnValue.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithReturnValue rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithReturnValue.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Obsolete_ExplicitError_WithMessage b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ExplicitError_WithMessage.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Obsolete_ExplicitError_WithMessage rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ExplicitError_WithMessage.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Obsolete_ExplicitWarning_WithMessage b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ExplicitWarning_WithMessage.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Obsolete_ExplicitWarning_WithMessage rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ExplicitWarning_WithMessage.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Obsolete_ImplicitWarning_NoMessage b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ImplicitWarning_NoMessage.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Obsolete_ImplicitWarning_NoMessage rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ImplicitWarning_NoMessage.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Obsolete_ImplicitWarning_WithMessage b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ImplicitWarning_WithMessage.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Obsolete_ImplicitWarning_WithMessage rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ImplicitWarning_WithMessage.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Obsolete_ExplicitError_WithMessage b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ExplicitError_WithMessage.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Obsolete_ExplicitError_WithMessage rename to src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ExplicitError_WithMessage.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Obsolete_ExplicitWarning_WithMessage b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ExplicitWarning_WithMessage.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Obsolete_ExplicitWarning_WithMessage rename to src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ExplicitWarning_WithMessage.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Obsolete_ImplicitWarning_NoMessage b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ImplicitWarning_NoMessage.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Obsolete_ImplicitWarning_NoMessage rename to src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ImplicitWarning_NoMessage.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Obsolete_ImplicitWarning_WithMessage b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ImplicitWarning_WithMessage.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Obsolete_ImplicitWarning_WithMessage rename to src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ImplicitWarning_WithMessage.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Dynamic_Type b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Dynamic_Type.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Dynamic_Type rename to src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Dynamic_Type.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Reference_Type b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Reference_Type.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Reference_Type rename to src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Reference_Type.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Value_Type b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Value_Type.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Value_Type rename to src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Value_Type.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/NonCached_Obsolete_ExplicitError_WithMessage b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ExplicitError_WithMessage.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/NonCached_Obsolete_ExplicitError_WithMessage rename to src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ExplicitError_WithMessage.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/NonCached_Obsolete_ExplicitWarning_WithMessage b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ExplicitWarning_WithMessage.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/NonCached_Obsolete_ExplicitWarning_WithMessage rename to src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ExplicitWarning_WithMessage.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/NonCached_Obsolete_ImplicitWarning_NoMessage b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ImplicitWarning_NoMessage.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/NonCached_Obsolete_ImplicitWarning_NoMessage rename to src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ImplicitWarning_NoMessage.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/NonCached_Obsolete_ImplicitWarning_WithMessage b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ImplicitWarning_WithMessage.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/NonCached_Obsolete_ImplicitWarning_WithMessage rename to src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ImplicitWarning_WithMessage.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/NonCached_Dynamic_Type b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Properties_name=NonCached_Dynamic_Type.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/NonCached_Dynamic_Type rename to src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Properties_name=NonCached_Dynamic_Type.verified.txt diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/NonCached_Value_Type b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Properties_name=NonCached_Value_Type.verified.txt similarity index 100% rename from src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/NonCached_Value_Type rename to src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Properties_name=NonCached_Value_Type.verified.txt diff --git a/src/Cake.Core.Tests/Fixtures/MethodAliasGeneratorFixture.cs b/src/Cake.Core.Tests/Fixtures/MethodAliasGeneratorFixture.cs index 3917db8fe8..eae535d452 100644 --- a/src/Cake.Core.Tests/Fixtures/MethodAliasGeneratorFixture.cs +++ b/src/Cake.Core.Tests/Fixtures/MethodAliasGeneratorFixture.cs @@ -13,32 +13,13 @@ namespace Cake.Core.Tests.Fixtures { public sealed class MethodAliasGeneratorFixture { - private readonly Assembly _assembly; private readonly MethodInfo[] _methods; public MethodAliasGeneratorFixture() { - _assembly = typeof(MethodAliasGeneratorFixture).GetTypeInfo().Assembly; _methods = typeof(MethodAliasGeneratorData).GetMethods(); } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2202:Do not dispose objects multiple times")] - public string GetExpectedCode(string name) - { - var resource = string.Concat("Cake.Core.Tests.Unit.Scripting.CodeGen.Expected.Methods.", name); - using (var stream = _assembly.GetManifestResourceStream(resource)) - { - if (stream == null) - { - throw new InvalidOperationException("Could not load manifest resource stream."); - } - using (var reader = new StreamReader(stream)) - { - return reader.ReadToEnd().NormalizeGeneratedCode(); - } - } - } - public string Generate(string name) { var method = _methods.SingleOrDefault(x => x.Name == name); diff --git a/src/Cake.Core.Tests/Fixtures/PropertyAliasGeneratorFixture.cs b/src/Cake.Core.Tests/Fixtures/PropertyAliasGeneratorFixture.cs index a65046b55c..05edf31455 100644 --- a/src/Cake.Core.Tests/Fixtures/PropertyAliasGeneratorFixture.cs +++ b/src/Cake.Core.Tests/Fixtures/PropertyAliasGeneratorFixture.cs @@ -22,23 +22,6 @@ public PropertyAliasGeneratorFixture() _methods = typeof(PropertyAliasGeneratorData).GetMethods(); } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2202:Do not dispose objects multiple times")] - public string GetExpectedData(string name) - { - var resource = string.Concat("Cake.Core.Tests.Unit.Scripting.CodeGen.Expected.Properties.", name); - using (var stream = _assembly.GetManifestResourceStream(resource)) - { - if (stream == null) - { - throw new InvalidOperationException("Could not load manifest resource stream."); - } - using (var reader = new StreamReader(stream)) - { - return reader.ReadToEnd().NormalizeGeneratedCode(); - } - } - } - public string Generate(string name) { var method = _methods.SingleOrDefault(x => x.Name == name); diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithArrayParameter b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithArrayParameter deleted file mode 100644 index cbf59c7a7f..0000000000 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithArrayParameter +++ /dev/null @@ -1,5 +0,0 @@ -[System.Diagnostics.DebuggerStepThrough] -public void NonGeneric_ExtensionMethodWithArrayParameter(System.String[] values) -{ - Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithArrayParameter(Context, values); -} \ No newline at end of file diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/MethodAliasGeneratorTests.cs b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/MethodAliasGeneratorTests.cs index 464f84d199..e585b9e154 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/MethodAliasGeneratorTests.cs +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/MethodAliasGeneratorTests.cs @@ -2,14 +2,19 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Threading.Tasks; using Cake.Core.Scripting.CodeGen; using Cake.Core.Tests.Fixtures; +using VerifyXunit; using Xunit; +using static VerifyXunit.Verifier; namespace Cake.Core.Tests.Unit.Scripting.CodeGen { + [UsesVerify] public sealed class MethodAliasGeneratorTests { + [UsesVerify] public sealed class TheGeneratorMethod : IClassFixture { private readonly MethodAliasGeneratorFixture _fixture; @@ -56,16 +61,14 @@ public void Should_Throw_If_Method_Is_Null() [InlineData("NonGeneric_ExtensionMethodWithGenericCollectionOfNestedType")] [InlineData("NonGeneric_ExtensionMethodWithParameterAttributes")] [InlineData("NonGeneric_ExtensionMethodWithDynamicReturnValue")] - public void Should_Return_Correct_Generated_Code_For_Non_Generic_Methods(string name) + public Task Should_Return_Correct_Generated_Code_For_Non_Generic_Methods(string name) { - // Given - var expected = _fixture.GetExpectedCode(name); - - // When + // Given / When var result = _fixture.Generate(name); // Then - Assert.Equal(expected, result); + return Verify(result) + .UseParameters(name); } [Theory] @@ -73,16 +76,14 @@ public void Should_Return_Correct_Generated_Code_For_Non_Generic_Methods(string [InlineData("Generic_ExtensionMethodWithParameter")] [InlineData("Generic_ExtensionMethodWithGenericReturnValue")] [InlineData("Generic_ExtensionMethodWithGenericReturnValueAndTypeParamConstraints")] - public void Should_Return_Correct_Generated_Code_For_Generic_Methods(string name) + public Task Should_Return_Correct_Generated_Code_For_Generic_Methods(string name) { - // Given - var expected = _fixture.GetExpectedCode(name); - - // When + // Given / When var result = _fixture.Generate(name); // Then - Assert.Equal(expected, result); + return Verify(result) + .UseParameters(name); } [Theory] @@ -90,16 +91,14 @@ public void Should_Return_Correct_Generated_Code_For_Generic_Methods(string name [InlineData("Obsolete_ImplicitWarning_WithMessage")] [InlineData("Obsolete_ExplicitWarning_WithMessage")] [InlineData("Obsolete_ExplicitError_WithMessage")] - public void Should_Return_Correct_Generated_Code_For_Obsolete_Methods(string name) + public Task Should_Return_Correct_Generated_Code_For_Obsolete_Methods(string name) { - // Given - var expected = _fixture.GetExpectedCode(name); - - // When + // Given / When var result = _fixture.Generate(name); // Then - Assert.Equal(expected, result); + return Verify(result) + .UseParameters(name); } } } diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/PropertyAliasGeneratorTests.cs b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/PropertyAliasGeneratorTests.cs index af8ca01a83..e9c9112826 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/PropertyAliasGeneratorTests.cs +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/PropertyAliasGeneratorTests.cs @@ -3,14 +3,19 @@ // See the LICENSE file in the project root for more information. using System.Reflection; +using System.Threading.Tasks; using Cake.Core.Scripting.CodeGen; using Cake.Core.Tests.Fixtures; +using VerifyXunit; using Xunit; +using static VerifyXunit.Verifier; namespace Cake.Core.Tests.Unit.Scripting.CodeGen { + [UsesVerify] public sealed class PropertyAliasGeneratorTests { + [UsesVerify] public sealed class TheGenerateMethod : IClassFixture { private readonly PropertyAliasGeneratorFixture _fixture; @@ -113,32 +118,28 @@ public void Should_Throw_If_Property_Alias_Returns_Void() [Theory] [InlineData("NonCached_Value_Type")] [InlineData("NonCached_Dynamic_Type")] - public void Should_Return_Correct_Generated_Code_For_Non_Cached_Properties(string name) + public Task Should_Return_Correct_Generated_Code_For_Non_Cached_Properties(string name) { - // Given - var expected = _fixture.GetExpectedData(name); - - // When + // Given / When var result = _fixture.Generate(name); // Then - Assert.Equal(expected, result); + return Verify(result) + .UseParameters(name); } [Theory] [InlineData("Cached_Reference_Type")] [InlineData("Cached_Value_Type")] [InlineData("Cached_Dynamic_Type")] - public void Should_Return_Correct_Generated_Code_For_Cached_Properties(string name) + public Task Should_Return_Correct_Generated_Code_For_Cached_Properties(string name) { - // Given - var expected = _fixture.GetExpectedData(name); - - // When + // Given / When var result = _fixture.Generate(name); // Then - Assert.Equal(expected, result); + return Verify(result) + .UseParameters(name); } [Theory] @@ -146,16 +147,14 @@ public void Should_Return_Correct_Generated_Code_For_Cached_Properties(string na [InlineData("NonCached_Obsolete_ImplicitWarning_WithMessage")] [InlineData("NonCached_Obsolete_ExplicitWarning_WithMessage")] [InlineData("NonCached_Obsolete_ExplicitError_WithMessage")] - public void Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties(string name) + public Task Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties(string name) { - // Given - var expected = _fixture.GetExpectedData(name); - - // When + // Given / When var result = _fixture.Generate(name); // Then - Assert.Equal(expected, result); + return Verify(result) + .UseParameters(name); } [Theory] @@ -163,16 +162,14 @@ public void Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Propert [InlineData("Cached_Obsolete_ImplicitWarning_WithMessage")] [InlineData("Cached_Obsolete_ExplicitWarning_WithMessage")] [InlineData("Cached_Obsolete_ExplicitError_WithMessage")] - public void Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties(string name) + public Task Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties(string name) { - // Given - var expected = _fixture.GetExpectedData(name); - - // When + // Given / When var result = _fixture.Generate(name); // Then - Assert.Equal(expected, result); + return Verify(result) + .UseParameters(name); } } } diff --git a/src/Cake.Core.Tests/VerifyConfig.cs b/src/Cake.Core.Tests/VerifyConfig.cs new file mode 100644 index 0000000000..416e82c760 --- /dev/null +++ b/src/Cake.Core.Tests/VerifyConfig.cs @@ -0,0 +1,15 @@ +using System.Runtime.CompilerServices; +using VerifyTests; +using VerifyXunit; + +namespace Cake.Core.Tests +{ + public static class VerifyConfig + { + [ModuleInitializer] + public static void Init() + { + Verifier.DerivePathInfo(Expectations.Initialize); + } + } +} From 041d6bcceb407934eab938b4a805317d29a5f474 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Thu, 16 Nov 2023 11:35:04 +0100 Subject: [PATCH 10/18] Verify: Codegen use Cake extension, git atrributes, editorconfig --- .editorconfig | 12 ++++++++++- .gitattributes | 17 ++++++++++++---- ...ame=Generic_ExtensionMethod.verified.cake} | 0 ...ethodWithGenericReturnValue.verified.cake} | 0 ...alueAndTypeParamConstraints.verified.cake} | 0 ...xtensionMethodWithParameter.verified.cake} | 0 ...ethodWithDynamicReturnValue.verified.cake} | 0 ...nericCollectionOfNestedType.verified.cake} | 0 ...ricExpressionArrayParameter.verified.cake} | 0 ...hGenericExpressionParameter.verified.cake} | 0 ...ressionParamsArrayParameter.verified.cake} | 0 ...nMethodWithGenericParameter.verified.cake} | 0 ...nsionMethodWithNoParameters.verified.cake} | 0 ...ithOptionalBooleanParameter.verified.cake} | 0 ...odWithOptionalCharParameter.verified.cake} | 0 ...ithOptionalDecimalParameter.verified.cake} | 0 ...odWithOptionalEnumParameter.verified.cake} | 0 ...nalNullableBooleanParameter.verified.cake} | 0 ...tionalNullableCharParameter.verified.cake} | 0 ...nalNullableDecimalParameter.verified.cake} | 0 ...onalNullableDoubleParameter.verified.cake} | 0 ...tionalNullableEnumParameter.verified.cake} | 0 ...tionalNullableLongParameter.verified.cake} | 0 ...hOptionalNullableTParameter.verified.cake} | 0 ...WithOptionalObjectParameter.verified.cake} | 0 ...WithOptionalStringParameter.verified.cake} | 0 ...onMethodWithOutputParameter.verified.cake} | 0 ...xtensionMethodWithParameter.verified.cake} | 0 ...ionMethodWithParameterArray.verified.cake} | 0 ...thodWithParameterAttributes.verified.cake} | 0 ...ithReservedKeywordParameter.verified.cake} | 0 ...ensionMethodWithReturnValue.verified.cake} | 0 ...e_ExplicitError_WithMessage.verified.cake} | 0 ...ExplicitWarning_WithMessage.verified.cake} | 0 ...e_ImplicitWarning_NoMessage.verified.cake} | 0 ...ImplicitWarning_WithMessage.verified.cake} | 0 ...e_ExplicitError_WithMessage.verified.cake} | 0 ...ExplicitWarning_WithMessage.verified.cake} | 0 ...e_ImplicitWarning_NoMessage.verified.cake} | 0 ...ImplicitWarning_WithMessage.verified.cake} | 0 ...es_name=Cached_Dynamic_Type.verified.cake} | 0 ..._name=Cached_Reference_Type.verified.cake} | 0 ...ties_name=Cached_Value_Type.verified.cake} | 0 ...e_ExplicitError_WithMessage.verified.cake} | 0 ...ExplicitWarning_WithMessage.verified.cake} | 0 ...e_ImplicitWarning_NoMessage.verified.cake} | 0 ...ImplicitWarning_WithMessage.verified.cake} | 0 ...name=NonCached_Dynamic_Type.verified.cake} | 0 ...s_name=NonCached_Value_Type.verified.cake} | 0 .../CodeGen/MethodAliasGeneratorTests.cs | 8 ++++---- .../CodeGen/PropertyAliasGeneratorTests.cs | 10 +++++----- src/Cake.Core.Tests/VerifyConfig.cs | 20 ++++++++++++++++--- 52 files changed, 50 insertions(+), 17 deletions(-) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethod.verified.txt => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethod.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithGenericReturnValue.verified.txt => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithGenericReturnValue.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithGenericReturnValueAndTypeParamConstraints.verified.txt => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithGenericReturnValueAndTypeParamConstraints.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithParameter.verified.txt => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithDynamicReturnValue.verified.txt => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithDynamicReturnValue.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericCollectionOfNestedType.verified.txt => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericCollectionOfNestedType.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericExpressionArrayParameter.verified.txt => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericExpressionArrayParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericExpressionParameter.verified.txt => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericExpressionParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericExpressionParamsArrayParameter.verified.txt => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericExpressionParamsArrayParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericParameter.verified.txt => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithNoParameters.verified.txt => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithNoParameters.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalBooleanParameter.verified.txt => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalBooleanParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalCharParameter.verified.txt => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalCharParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalDecimalParameter.verified.txt => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalDecimalParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalEnumParameter.verified.txt => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalEnumParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableBooleanParameter.verified.txt => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableBooleanParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableCharParameter.verified.txt => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableCharParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableDecimalParameter.verified.txt => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableDecimalParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableDoubleParameter.verified.txt => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableDoubleParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableEnumParameter.verified.txt => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableEnumParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableLongParameter.verified.txt => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableLongParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableTParameter.verified.txt => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableTParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalObjectParameter.verified.txt => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalObjectParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalStringParameter.verified.txt => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalStringParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOutputParameter.verified.txt => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOutputParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithParameter.verified.txt => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithParameterArray.verified.txt => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithParameterArray.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithParameterAttributes.verified.txt => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithParameterAttributes.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithReservedKeywordParameter.verified.txt => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithReservedKeywordParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithReturnValue.verified.txt => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithReturnValue.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ExplicitError_WithMessage.verified.txt => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ExplicitError_WithMessage.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ExplicitWarning_WithMessage.verified.txt => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ExplicitWarning_WithMessage.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ImplicitWarning_NoMessage.verified.txt => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ImplicitWarning_NoMessage.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ImplicitWarning_WithMessage.verified.txt => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ImplicitWarning_WithMessage.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ExplicitError_WithMessage.verified.txt => PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ExplicitError_WithMessage.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ExplicitWarning_WithMessage.verified.txt => PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ExplicitWarning_WithMessage.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ImplicitWarning_NoMessage.verified.txt => PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ImplicitWarning_NoMessage.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ImplicitWarning_WithMessage.verified.txt => PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ImplicitWarning_WithMessage.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Dynamic_Type.verified.txt => PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Dynamic_Type.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Reference_Type.verified.txt => PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Reference_Type.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Value_Type.verified.txt => PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Value_Type.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ExplicitError_WithMessage.verified.txt => PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ExplicitError_WithMessage.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ExplicitWarning_WithMessage.verified.txt => PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ExplicitWarning_WithMessage.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ImplicitWarning_NoMessage.verified.txt => PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ImplicitWarning_NoMessage.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ImplicitWarning_WithMessage.verified.txt => PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ImplicitWarning_WithMessage.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Properties_name=NonCached_Dynamic_Type.verified.txt => PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Properties_name=NonCached_Dynamic_Type.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Properties_name=NonCached_Value_Type.verified.txt => PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Properties_name=NonCached_Value_Type.verified.cake} (100%) diff --git a/.editorconfig b/.editorconfig index a709d6bbf4..c20801b14d 100644 --- a/.editorconfig +++ b/.editorconfig @@ -20,4 +20,14 @@ indent_size = 4 [*.js] indent_style = tab -indent_size = 2 \ No newline at end of file +indent_size = 2 + +# Verify settings +[*.{received,verified}.{txt,xml,json,cake}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false \ No newline at end of file diff --git a/.gitattributes b/.gitattributes index 4cfbb10890..75b9c6b431 100644 --- a/.gitattributes +++ b/.gitattributes @@ -18,7 +18,7 @@ # # Merging from the command prompt will add diff markers to the files if there # are conflicts (Merging from VS is not affected by the settings below, in VS -# the diff markers are never inserted). Diff markers may cause the following +# the diff markers are never inserted). Diff markers may cause the following # file extensions to fail to load in VS. An alternative would be to treat # these files as binary and thus will always conflict and require user # intervention with every merge. To do so, just uncomment the entries below @@ -47,9 +47,9 @@ ############################################################################### # diff behavior for common document formats -# +# # Convert binary document formats to text before diffing them. This feature -# is only available from the command line. Turn it on by uncommenting the +# is only available from the command line. Turn it on by uncommenting the # entries below. ############################################################################### #*.doc diff=astextplain @@ -61,4 +61,13 @@ #*.pdf diff=astextplain #*.PDF diff=astextplain #*.rtf diff=astextplain -#*.RTF diff=astextplain \ No newline at end of file +#*.RTF diff=astextplain + +############################################################################### +# Verify files +############################################################################### + +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +*.verified.cake text eol=lf working-tree-encoding=UTF-8 \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethod.verified.txt b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethod.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethod.verified.txt rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethod.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithGenericReturnValue.verified.txt b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithGenericReturnValue.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithGenericReturnValue.verified.txt rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithGenericReturnValue.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithGenericReturnValueAndTypeParamConstraints.verified.txt b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithGenericReturnValueAndTypeParamConstraints.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithGenericReturnValueAndTypeParamConstraints.verified.txt rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithGenericReturnValueAndTypeParamConstraints.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithParameter.verified.txt b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithParameter.verified.txt rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithDynamicReturnValue.verified.txt b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithDynamicReturnValue.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithDynamicReturnValue.verified.txt rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithDynamicReturnValue.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericCollectionOfNestedType.verified.txt b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericCollectionOfNestedType.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericCollectionOfNestedType.verified.txt rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericCollectionOfNestedType.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericExpressionArrayParameter.verified.txt b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericExpressionArrayParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericExpressionArrayParameter.verified.txt rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericExpressionArrayParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericExpressionParameter.verified.txt b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericExpressionParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericExpressionParameter.verified.txt rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericExpressionParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericExpressionParamsArrayParameter.verified.txt b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericExpressionParamsArrayParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericExpressionParamsArrayParameter.verified.txt rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericExpressionParamsArrayParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericParameter.verified.txt b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericParameter.verified.txt rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithNoParameters.verified.txt b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithNoParameters.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithNoParameters.verified.txt rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithNoParameters.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalBooleanParameter.verified.txt b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalBooleanParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalBooleanParameter.verified.txt rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalBooleanParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalCharParameter.verified.txt b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalCharParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalCharParameter.verified.txt rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalCharParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalDecimalParameter.verified.txt b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalDecimalParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalDecimalParameter.verified.txt rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalDecimalParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalEnumParameter.verified.txt b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalEnumParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalEnumParameter.verified.txt rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalEnumParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableBooleanParameter.verified.txt b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableBooleanParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableBooleanParameter.verified.txt rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableBooleanParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableCharParameter.verified.txt b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableCharParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableCharParameter.verified.txt rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableCharParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableDecimalParameter.verified.txt b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableDecimalParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableDecimalParameter.verified.txt rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableDecimalParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableDoubleParameter.verified.txt b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableDoubleParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableDoubleParameter.verified.txt rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableDoubleParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableEnumParameter.verified.txt b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableEnumParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableEnumParameter.verified.txt rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableEnumParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableLongParameter.verified.txt b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableLongParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableLongParameter.verified.txt rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableLongParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableTParameter.verified.txt b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableTParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableTParameter.verified.txt rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableTParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalObjectParameter.verified.txt b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalObjectParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalObjectParameter.verified.txt rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalObjectParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalStringParameter.verified.txt b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalStringParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalStringParameter.verified.txt rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalStringParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOutputParameter.verified.txt b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOutputParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOutputParameter.verified.txt rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOutputParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithParameter.verified.txt b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithParameter.verified.txt rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithParameterArray.verified.txt b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithParameterArray.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithParameterArray.verified.txt rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithParameterArray.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithParameterAttributes.verified.txt b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithParameterAttributes.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithParameterAttributes.verified.txt rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithParameterAttributes.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithReservedKeywordParameter.verified.txt b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithReservedKeywordParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithReservedKeywordParameter.verified.txt rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithReservedKeywordParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithReturnValue.verified.txt b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithReturnValue.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithReturnValue.verified.txt rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithReturnValue.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ExplicitError_WithMessage.verified.txt b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ExplicitError_WithMessage.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ExplicitError_WithMessage.verified.txt rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ExplicitError_WithMessage.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ExplicitWarning_WithMessage.verified.txt b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ExplicitWarning_WithMessage.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ExplicitWarning_WithMessage.verified.txt rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ExplicitWarning_WithMessage.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ImplicitWarning_NoMessage.verified.txt b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ImplicitWarning_NoMessage.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ImplicitWarning_NoMessage.verified.txt rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ImplicitWarning_NoMessage.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ImplicitWarning_WithMessage.verified.txt b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ImplicitWarning_WithMessage.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ImplicitWarning_WithMessage.verified.txt rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ImplicitWarning_WithMessage.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ExplicitError_WithMessage.verified.txt b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ExplicitError_WithMessage.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ExplicitError_WithMessage.verified.txt rename to src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ExplicitError_WithMessage.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ExplicitWarning_WithMessage.verified.txt b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ExplicitWarning_WithMessage.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ExplicitWarning_WithMessage.verified.txt rename to src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ExplicitWarning_WithMessage.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ImplicitWarning_NoMessage.verified.txt b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ImplicitWarning_NoMessage.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ImplicitWarning_NoMessage.verified.txt rename to src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ImplicitWarning_NoMessage.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ImplicitWarning_WithMessage.verified.txt b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ImplicitWarning_WithMessage.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ImplicitWarning_WithMessage.verified.txt rename to src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ImplicitWarning_WithMessage.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Dynamic_Type.verified.txt b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Dynamic_Type.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Dynamic_Type.verified.txt rename to src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Dynamic_Type.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Reference_Type.verified.txt b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Reference_Type.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Reference_Type.verified.txt rename to src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Reference_Type.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Value_Type.verified.txt b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Value_Type.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Value_Type.verified.txt rename to src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Value_Type.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ExplicitError_WithMessage.verified.txt b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ExplicitError_WithMessage.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ExplicitError_WithMessage.verified.txt rename to src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ExplicitError_WithMessage.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ExplicitWarning_WithMessage.verified.txt b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ExplicitWarning_WithMessage.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ExplicitWarning_WithMessage.verified.txt rename to src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ExplicitWarning_WithMessage.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ImplicitWarning_NoMessage.verified.txt b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ImplicitWarning_NoMessage.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ImplicitWarning_NoMessage.verified.txt rename to src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ImplicitWarning_NoMessage.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ImplicitWarning_WithMessage.verified.txt b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ImplicitWarning_WithMessage.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ImplicitWarning_WithMessage.verified.txt rename to src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ImplicitWarning_WithMessage.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Properties_name=NonCached_Dynamic_Type.verified.txt b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Properties_name=NonCached_Dynamic_Type.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Properties_name=NonCached_Dynamic_Type.verified.txt rename to src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Properties_name=NonCached_Dynamic_Type.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Properties_name=NonCached_Value_Type.verified.txt b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Properties_name=NonCached_Value_Type.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Properties_name=NonCached_Value_Type.verified.txt rename to src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Properties_name=NonCached_Value_Type.verified.cake diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/MethodAliasGeneratorTests.cs b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/MethodAliasGeneratorTests.cs index e585b9e154..34c2686a7e 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/MethodAliasGeneratorTests.cs +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/MethodAliasGeneratorTests.cs @@ -7,7 +7,7 @@ using Cake.Core.Tests.Fixtures; using VerifyXunit; using Xunit; -using static VerifyXunit.Verifier; +using static Cake.Core.Tests.VerifyConfig; namespace Cake.Core.Tests.Unit.Scripting.CodeGen { @@ -67,7 +67,7 @@ public Task Should_Return_Correct_Generated_Code_For_Non_Generic_Methods(string var result = _fixture.Generate(name); // Then - return Verify(result) + return VerifyCake(result) .UseParameters(name); } @@ -82,7 +82,7 @@ public Task Should_Return_Correct_Generated_Code_For_Generic_Methods(string name var result = _fixture.Generate(name); // Then - return Verify(result) + return VerifyCake(result) .UseParameters(name); } @@ -97,7 +97,7 @@ public Task Should_Return_Correct_Generated_Code_For_Obsolete_Methods(string nam var result = _fixture.Generate(name); // Then - return Verify(result) + return VerifyCake(result) .UseParameters(name); } } diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/PropertyAliasGeneratorTests.cs b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/PropertyAliasGeneratorTests.cs index e9c9112826..c6595a8e15 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/PropertyAliasGeneratorTests.cs +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/PropertyAliasGeneratorTests.cs @@ -8,7 +8,7 @@ using Cake.Core.Tests.Fixtures; using VerifyXunit; using Xunit; -using static VerifyXunit.Verifier; +using static Cake.Core.Tests.VerifyConfig; namespace Cake.Core.Tests.Unit.Scripting.CodeGen { @@ -124,7 +124,7 @@ public Task Should_Return_Correct_Generated_Code_For_Non_Cached_Properties(strin var result = _fixture.Generate(name); // Then - return Verify(result) + return VerifyCake(result) .UseParameters(name); } @@ -138,7 +138,7 @@ public Task Should_Return_Correct_Generated_Code_For_Cached_Properties(string na var result = _fixture.Generate(name); // Then - return Verify(result) + return VerifyCake(result) .UseParameters(name); } @@ -153,7 +153,7 @@ public Task Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Propert var result = _fixture.Generate(name); // Then - return Verify(result) + return VerifyCake(result) .UseParameters(name); } @@ -168,7 +168,7 @@ public Task Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties( var result = _fixture.Generate(name); // Then - return Verify(result) + return VerifyCake(result) .UseParameters(name); } } diff --git a/src/Cake.Core.Tests/VerifyConfig.cs b/src/Cake.Core.Tests/VerifyConfig.cs index 416e82c760..a32ee74f29 100644 --- a/src/Cake.Core.Tests/VerifyConfig.cs +++ b/src/Cake.Core.Tests/VerifyConfig.cs @@ -1,6 +1,7 @@ -using System.Runtime.CompilerServices; +using System.Diagnostics.Contracts; +using System.Runtime.CompilerServices; using VerifyTests; -using VerifyXunit; +using static VerifyXunit.Verifier; namespace Cake.Core.Tests { @@ -9,7 +10,20 @@ public static class VerifyConfig [ModuleInitializer] public static void Init() { - Verifier.DerivePathInfo(Expectations.Initialize); + EmptyFiles.FileExtensions.AddTextExtension(Extensions.Cake); + DerivePathInfo(Expectations.Initialize); } + + public static class Extensions + { + public const string Cake = "cake"; + } + + [Pure] + public static SettingsTask VerifyCake( + string target, + VerifySettings settings = null, + [CallerFilePath] string sourceFile = "") + => Verify(target, Extensions.Cake, settings, sourceFile); } } From 16a25bd1d49ee5cb67cc62c8e2d7bbbb6a7057ed Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Thu, 16 Nov 2023 12:34:13 +0100 Subject: [PATCH 11/18] Shorten some names for libgit (i.e. TeamCity) --- ...ethodWithDynamicReturnValue.verified.cake} | 0 ...nericCollectionOfNestedType.verified.cake} | 0 ...ricExpressionArrayParameter.verified.cake} | 0 ...hGenericExpressionParameter.verified.cake} | 0 ...ressionParamsArrayParameter.verified.cake} | 0 ...nMethodWithGenericParameter.verified.cake} | 0 ...nsionMethodWithNoParameters.verified.cake} | 0 ...ithOptionalBooleanParameter.verified.cake} | 0 ...odWithOptionalCharParameter.verified.cake} | 0 ...ithOptionalDecimalParameter.verified.cake} | 0 ...odWithOptionalEnumParameter.verified.cake} | 0 ...nalNullableBooleanParameter.verified.cake} | 0 ...tionalNullableCharParameter.verified.cake} | 0 ...nalNullableDecimalParameter.verified.cake} | 0 ...onalNullableDoubleParameter.verified.cake} | 0 ...tionalNullableEnumParameter.verified.cake} | 0 ...tionalNullableLongParameter.verified.cake} | 0 ...hOptionalNullableTParameter.verified.cake} | 0 ...WithOptionalObjectParameter.verified.cake} | 0 ...WithOptionalStringParameter.verified.cake} | 0 ...onMethodWithOutputParameter.verified.cake} | 0 ...xtensionMethodWithParameter.verified.cake} | 0 ...ionMethodWithParameterArray.verified.cake} | 0 ...thodWithParameterAttributes.verified.cake} | 0 ...ithReservedKeywordParameter.verified.cake} | 0 ...ensionMethodWithReturnValue.verified.cake} | 0 .../CodeGen/MethodAliasGeneratorTests.cs | 54 +++++++++---------- 27 files changed, 27 insertions(+), 27 deletions(-) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithDynamicReturnValue.verified.cake => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithDynamicReturnValue.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericCollectionOfNestedType.verified.cake => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithGenericCollectionOfNestedType.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericExpressionArrayParameter.verified.cake => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithGenericExpressionArrayParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericExpressionParameter.verified.cake => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithGenericExpressionParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericExpressionParamsArrayParameter.verified.cake => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithGenericExpressionParamsArrayParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericParameter.verified.cake => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithGenericParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithNoParameters.verified.cake => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithNoParameters.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalBooleanParameter.verified.cake => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalBooleanParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalCharParameter.verified.cake => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalCharParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalDecimalParameter.verified.cake => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalDecimalParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalEnumParameter.verified.cake => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalEnumParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableBooleanParameter.verified.cake => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableBooleanParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableCharParameter.verified.cake => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableCharParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableDecimalParameter.verified.cake => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableDecimalParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableDoubleParameter.verified.cake => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableDoubleParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableEnumParameter.verified.cake => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableEnumParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableLongParameter.verified.cake => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableLongParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableTParameter.verified.cake => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableTParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalObjectParameter.verified.cake => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalObjectParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalStringParameter.verified.cake => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalStringParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOutputParameter.verified.cake => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOutputParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithParameter.verified.cake => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithParameterArray.verified.cake => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithParameterArray.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithParameterAttributes.verified.cake => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithParameterAttributes.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithReservedKeywordParameter.verified.cake => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithReservedKeywordParameter.verified.cake} (100%) rename src/Cake.Core.Tests/Expectations/{MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithReturnValue.verified.cake => MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithReturnValue.verified.cake} (100%) diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithDynamicReturnValue.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithDynamicReturnValue.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithDynamicReturnValue.verified.cake rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithDynamicReturnValue.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericCollectionOfNestedType.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithGenericCollectionOfNestedType.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericCollectionOfNestedType.verified.cake rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithGenericCollectionOfNestedType.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericExpressionArrayParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithGenericExpressionArrayParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericExpressionArrayParameter.verified.cake rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithGenericExpressionArrayParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericExpressionParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithGenericExpressionParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericExpressionParameter.verified.cake rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithGenericExpressionParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericExpressionParamsArrayParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithGenericExpressionParamsArrayParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericExpressionParamsArrayParameter.verified.cake rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithGenericExpressionParamsArrayParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithGenericParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithGenericParameter.verified.cake rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithGenericParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithNoParameters.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithNoParameters.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithNoParameters.verified.cake rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithNoParameters.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalBooleanParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalBooleanParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalBooleanParameter.verified.cake rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalBooleanParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalCharParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalCharParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalCharParameter.verified.cake rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalCharParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalDecimalParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalDecimalParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalDecimalParameter.verified.cake rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalDecimalParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalEnumParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalEnumParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalEnumParameter.verified.cake rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalEnumParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableBooleanParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableBooleanParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableBooleanParameter.verified.cake rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableBooleanParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableCharParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableCharParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableCharParameter.verified.cake rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableCharParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableDecimalParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableDecimalParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableDecimalParameter.verified.cake rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableDecimalParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableDoubleParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableDoubleParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableDoubleParameter.verified.cake rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableDoubleParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableEnumParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableEnumParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableEnumParameter.verified.cake rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableEnumParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableLongParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableLongParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableLongParameter.verified.cake rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableLongParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableTParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableTParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalNullableTParameter.verified.cake rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableTParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalObjectParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalObjectParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalObjectParameter.verified.cake rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalObjectParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalStringParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalStringParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOptionalStringParameter.verified.cake rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalStringParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOutputParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOutputParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithOutputParameter.verified.cake rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOutputParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithParameter.verified.cake rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithParameterArray.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithParameterArray.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithParameterArray.verified.cake rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithParameterArray.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithParameterAttributes.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithParameterAttributes.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithParameterAttributes.verified.cake rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithParameterAttributes.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithReservedKeywordParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithReservedKeywordParameter.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithReservedKeywordParameter.verified.cake rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithReservedKeywordParameter.verified.cake diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithReturnValue.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithReturnValue.verified.cake similarity index 100% rename from src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=NonGeneric_ExtensionMethodWithReturnValue.verified.cake rename to src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithReturnValue.verified.cake diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/MethodAliasGeneratorTests.cs b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/MethodAliasGeneratorTests.cs index 34c2686a7e..ebcf9a5614 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/MethodAliasGeneratorTests.cs +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/MethodAliasGeneratorTests.cs @@ -35,36 +35,36 @@ public void Should_Throw_If_Method_Is_Null() } [Theory] - [InlineData("NonGeneric_ExtensionMethodWithNoParameters")] - [InlineData("NonGeneric_ExtensionMethodWithParameter")] - [InlineData("NonGeneric_ExtensionMethodWithGenericParameter")] - [InlineData("NonGeneric_ExtensionMethodWithGenericExpressionParameter")] - [InlineData("NonGeneric_ExtensionMethodWithGenericExpressionArrayParameter")] - [InlineData("NonGeneric_ExtensionMethodWithGenericExpressionParamsArrayParameter")] - [InlineData("NonGeneric_ExtensionMethodWithReturnValue")] - [InlineData("NonGeneric_ExtensionMethodWithParameterArray")] - [InlineData("NonGeneric_ExtensionMethodWithOptionalObjectParameter")] - [InlineData("NonGeneric_ExtensionMethodWithOptionalBooleanParameter")] - [InlineData("NonGeneric_ExtensionMethodWithOptionalStringParameter")] - [InlineData("NonGeneric_ExtensionMethodWithOptionalEnumParameter")] - [InlineData("NonGeneric_ExtensionMethodWithOptionalCharParameter")] - [InlineData("NonGeneric_ExtensionMethodWithOptionalDecimalParameter")] - [InlineData("NonGeneric_ExtensionMethodWithOptionalNullableTParameter")] - [InlineData("NonGeneric_ExtensionMethodWithOptionalNullableBooleanParameter")] - [InlineData("NonGeneric_ExtensionMethodWithOptionalNullableCharParameter")] - [InlineData("NonGeneric_ExtensionMethodWithOptionalNullableEnumParameter")] - [InlineData("NonGeneric_ExtensionMethodWithOptionalNullableDecimalParameter")] - [InlineData("NonGeneric_ExtensionMethodWithOptionalNullableLongParameter")] - [InlineData("NonGeneric_ExtensionMethodWithOptionalNullableDoubleParameter")] - [InlineData("NonGeneric_ExtensionMethodWithReservedKeywordParameter")] - [InlineData("NonGeneric_ExtensionMethodWithOutputParameter")] - [InlineData("NonGeneric_ExtensionMethodWithGenericCollectionOfNestedType")] - [InlineData("NonGeneric_ExtensionMethodWithParameterAttributes")] - [InlineData("NonGeneric_ExtensionMethodWithDynamicReturnValue")] + [InlineData("ExtensionMethodWithNoParameters")] + [InlineData("ExtensionMethodWithParameter")] + [InlineData("ExtensionMethodWithGenericParameter")] + [InlineData("ExtensionMethodWithGenericExpressionParameter")] + [InlineData("ExtensionMethodWithGenericExpressionArrayParameter")] + [InlineData("ExtensionMethodWithGenericExpressionParamsArrayParameter")] + [InlineData("ExtensionMethodWithReturnValue")] + [InlineData("ExtensionMethodWithParameterArray")] + [InlineData("ExtensionMethodWithOptionalObjectParameter")] + [InlineData("ExtensionMethodWithOptionalBooleanParameter")] + [InlineData("ExtensionMethodWithOptionalStringParameter")] + [InlineData("ExtensionMethodWithOptionalEnumParameter")] + [InlineData("ExtensionMethodWithOptionalCharParameter")] + [InlineData("ExtensionMethodWithOptionalDecimalParameter")] + [InlineData("ExtensionMethodWithOptionalNullableTParameter")] + [InlineData("ExtensionMethodWithOptionalNullableBooleanParameter")] + [InlineData("ExtensionMethodWithOptionalNullableCharParameter")] + [InlineData("ExtensionMethodWithOptionalNullableEnumParameter")] + [InlineData("ExtensionMethodWithOptionalNullableDecimalParameter")] + [InlineData("ExtensionMethodWithOptionalNullableLongParameter")] + [InlineData("ExtensionMethodWithOptionalNullableDoubleParameter")] + [InlineData("ExtensionMethodWithReservedKeywordParameter")] + [InlineData("ExtensionMethodWithOutputParameter")] + [InlineData("ExtensionMethodWithGenericCollectionOfNestedType")] + [InlineData("ExtensionMethodWithParameterAttributes")] + [InlineData("ExtensionMethodWithDynamicReturnValue")] public Task Should_Return_Correct_Generated_Code_For_Non_Generic_Methods(string name) { // Given / When - var result = _fixture.Generate(name); + var result = _fixture.Generate("NonGeneric_" + name); // Then return VerifyCake(result) From 16bb84d262e6d0ea8d69df810b6adb93a209d4d4 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Fri, 17 Nov 2023 16:30:03 +0100 Subject: [PATCH 12/18] (GH-4264) Update Verify.Xunit to 22.5.0 * fixes #4264 --- src/Cake.Core.Tests/Cake.Core.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cake.Core.Tests/Cake.Core.Tests.csproj b/src/Cake.Core.Tests/Cake.Core.Tests.csproj index 1ce40c3a19..5e487992f3 100644 --- a/src/Cake.Core.Tests/Cake.Core.Tests.csproj +++ b/src/Cake.Core.Tests/Cake.Core.Tests.csproj @@ -16,7 +16,7 @@ - + all From 6aef5af98cfe845f02f3baa8ed87a081c883f9e5 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Fri, 17 Nov 2023 16:25:51 +0100 Subject: [PATCH 13/18] (GH-4262) Update Microsoft.SourceLink.GitHub to 8.0.0 * #4262 --- src/Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index df7179b480..b7c02cade1 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -6,6 +6,6 @@ - + From 69ba60c27b5895f537a23348932dc163030619d4 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Fri, 17 Nov 2023 17:00:51 +0100 Subject: [PATCH 14/18] (GH-4266) Update LatestPotentialBreakingChange to 4.0.0 * fixes #4266 --- src/Cake.Core/Constants.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cake.Core/Constants.cs b/src/Cake.Core/Constants.cs index e00914192d..76adf9bf79 100644 --- a/src/Cake.Core/Constants.cs +++ b/src/Cake.Core/Constants.cs @@ -11,7 +11,7 @@ internal static class Constants public const ConsoleColor DefaultConsoleColor = (ConsoleColor)(-1); public static readonly Version LatestBreakingChange = new Version(0, 26, 0); - public static readonly Version LatestPotentialBreakingChange = new Version(3, 0, 0); + public static readonly Version LatestPotentialBreakingChange = new Version(4, 0, 0); public static class Settings { From eb0f19d918b1b7b15a59195b007aa35762a28120 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Fri, 17 Nov 2023 16:07:13 +0100 Subject: [PATCH 15/18] (GH-4260) Unzip alias should support overwrite files * fixes #4260 --- src/Cake.Common/IO/ZipAliases.cs | 23 ++++++++++++++++++----- src/Cake.Common/IO/Zipper.cs | 23 +++++++++++++---------- 2 files changed, 31 insertions(+), 15 deletions(-) diff --git a/src/Cake.Common/IO/ZipAliases.cs b/src/Cake.Common/IO/ZipAliases.cs index 42188b9a4c..cb91063e62 100644 --- a/src/Cake.Common/IO/ZipAliases.cs +++ b/src/Cake.Common/IO/ZipAliases.cs @@ -135,14 +135,27 @@ public static void Zip(this ICakeContext context, DirectoryPath rootPath, FilePa /// [CakeMethodAlias] public static void Unzip(this ICakeContext context, FilePath zipFile, DirectoryPath outputPath) + => context.Unzip(zipFile, outputPath, false); + + /// + /// Unzips the specified file. + /// + /// The context. + /// Zip file to unzip. + /// Output path to unzip into. + /// Flag for if files should be overwritten in output. + /// + /// + /// Unzip("Cake.zip", "./cake", true); + /// + /// + [CakeMethodAlias] + public static void Unzip(this ICakeContext context, FilePath zipFile, DirectoryPath outputPath, bool overwriteFiles) { - if (context == null) - { - throw new ArgumentNullException(nameof(context)); - } + ArgumentNullException.ThrowIfNull(context); var zipper = new Zipper(context.FileSystem, context.Environment, context.Log); - zipper.Unzip(zipFile, outputPath); + zipper.Unzip(zipFile, outputPath, overwriteFiles); } } } \ No newline at end of file diff --git a/src/Cake.Common/IO/Zipper.cs b/src/Cake.Common/IO/Zipper.cs index 0b0df02353..252b7fd54b 100644 --- a/src/Cake.Common/IO/Zipper.cs +++ b/src/Cake.Common/IO/Zipper.cs @@ -204,22 +204,25 @@ public void Zip(DirectoryPath rootPath, FilePath outputPath, IEnumerableZip file path. /// Output directory path. public void Unzip(FilePath zipPath, DirectoryPath outputPath) + => Unzip(zipPath, outputPath, false); + + /// + /// Unzips the specified file to the specified output path. + /// + /// Zip file path. + /// Output directory path. + /// Flag for if files should be overwritten in output. + public void Unzip(FilePath zipPath, DirectoryPath outputPath, bool overwriteFiles) { - if (zipPath == null) - { - throw new ArgumentNullException(nameof(zipPath)); - } - if (outputPath == null) - { - throw new ArgumentNullException(nameof(outputPath)); - } + ArgumentNullException.ThrowIfNull(zipPath); + ArgumentNullException.ThrowIfNull(outputPath); // Make root path and output file path absolute. zipPath = zipPath.MakeAbsolute(_environment); outputPath = outputPath.MakeAbsolute(_environment); - _log.Verbose("Unzipping file {0} to {1}", zipPath.FullPath, outputPath.FullPath); - ZipFile.ExtractToDirectory(zipPath.FullPath, outputPath.FullPath); + _log.Verbose("Unzipping file {0} to {1} (overwrite files: {2})", zipPath.FullPath, outputPath.FullPath, overwriteFiles); + ZipFile.ExtractToDirectory(zipPath.FullPath, outputPath.FullPath, overwriteFiles); } private string GetRelativePath(DirectoryPath root, Path path) From a9d5d99d429414cd15e776a9bd37598916bf1778 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Fri, 17 Nov 2023 00:10:43 +0100 Subject: [PATCH 16/18] (GH-4150,GH-4197) Codegen styling & nullable param * fixes #4150 - Fix styling warnings * fixes #4197 - Fix parameter nullability error --- .../Data/MethodAliasGeneratorData.cs | 16 ++ .../Data/PropertyAliasGeneratorData.cs | 8 + ...name=Generic_ExtensionMethod.verified.cake | 4 +- ...MethodWithGenericReturnValue.verified.cake | 4 +- ...ValueAndTypeParamConstraints.verified.cake | 4 +- ...ExtensionMethodWithParameter.verified.cake | 4 +- ...MethodWithDynamicReturnValue.verified.cake | 4 +- ...enericCollectionOfNestedType.verified.cake | 4 +- ...ericExpressionArrayParameter.verified.cake | 4 +- ...thGenericExpressionParameter.verified.cake | 4 +- ...pressionParamsArrayParameter.verified.cake | 4 +- ...onMethodWithGenericParameter.verified.cake | 4 +- ...ensionMethodWithNoParameters.verified.cake | 4 +- ...nMethodWithNullableParameter.verified.cake | 3 + ...ethodWithNullableReturnValue.verified.cake | 3 + ...WithOptionalBooleanParameter.verified.cake | 4 +- ...hodWithOptionalCharParameter.verified.cake | 4 +- ...WithOptionalDecimalParameter.verified.cake | 4 +- ...hodWithOptionalEnumParameter.verified.cake | 4 +- ...onalNullableBooleanParameter.verified.cake | 4 +- ...ptionalNullableCharParameter.verified.cake | 4 +- ...onalNullableDecimalParameter.verified.cake | 4 +- ...ionalNullableDoubleParameter.verified.cake | 4 +- ...ptionalNullableEnumParameter.verified.cake | 4 +- ...ptionalNullableLongParameter.verified.cake | 4 +- ...thOptionalNullableTParameter.verified.cake | 4 +- ...dWithOptionalObjectParameter.verified.cake | 4 +- ...dWithOptionalStringParameter.verified.cake | 4 +- ...ionMethodWithOutputParameter.verified.cake | 4 +- ...ExtensionMethodWithParameter.verified.cake | 4 +- ...sionMethodWithParameterArray.verified.cake | 4 +- ...ethodWithParameterAttributes.verified.cake | 4 +- ...WithReservedKeywordParameter.verified.cake | 4 +- ...tensionMethodWithReturnValue.verified.cake | 4 +- ...te_ExplicitError_WithMessage.verified.cake | 4 +- ..._ExplicitWarning_WithMessage.verified.cake | 7 +- ...te_ImplicitWarning_NoMessage.verified.cake | 7 +- ..._ImplicitWarning_WithMessage.verified.cake | 7 +- ...te_ExplicitError_WithMessage.verified.cake | 13 +- ..._ExplicitWarning_WithMessage.verified.cake | 17 +-- ...te_ImplicitWarning_NoMessage.verified.cake | 15 +- ..._ImplicitWarning_WithMessage.verified.cake | 17 +-- ...ies_name=Cached_Dynamic_Type.verified.cake | 12 +- ...es_name=Cached_Nullable_Type.verified.cake | 3 + ...s_name=Cached_Reference_Type.verified.cake | 12 +- ...rties_name=Cached_Value_Type.verified.cake | 12 +- ...te_ExplicitError_WithMessage.verified.cake | 13 +- ..._ExplicitWarning_WithMessage.verified.cake | 14 +- ...te_ImplicitWarning_NoMessage.verified.cake | 14 +- ..._ImplicitWarning_WithMessage.verified.cake | 14 +- ..._name=NonCached_Dynamic_Type.verified.cake | 8 +- ...es_name=NonCached_Value_Type.verified.cake | 8 +- .../CodeGen/MethodAliasGeneratorTests.cs | 2 + .../CodeGen/PropertyAliasGeneratorTests.cs | 1 + .../Scripting/CodeGen/MethodAliasGenerator.cs | 67 +++------ .../Scripting/CodeGen/ParameterEmitter.cs | 33 +++-- .../CodeGen/PropertyAliasGenerator.cs | 140 +++++------------- 57 files changed, 197 insertions(+), 393 deletions(-) create mode 100644 src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithNullableParameter.verified.cake create mode 100644 src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithNullableReturnValue.verified.cake create mode 100644 src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Nullable_Type.verified.cake diff --git a/src/Cake.Core.Tests/Data/MethodAliasGeneratorData.cs b/src/Cake.Core.Tests/Data/MethodAliasGeneratorData.cs index 5faca2b3eb..c81008e33e 100644 --- a/src/Cake.Core.Tests/Data/MethodAliasGeneratorData.cs +++ b/src/Cake.Core.Tests/Data/MethodAliasGeneratorData.cs @@ -246,5 +246,21 @@ public static dynamic NonGeneric_ExtensionMethodWithDynamicReturnValue(this ICak { throw new NotImplementedException(); } + + [CakeMethodAlias] +#nullable enable + public static void NonGeneric_ExtensionMethodWithNullableParameter(this ICakeContext context, string? parameter) +#nullable disable + { + throw new NotImplementedException(); + } + + [CakeMethodAlias] +#nullable enable + public static string? NonGeneric_ExtensionMethodWithNullableReturnValue(this ICakeContext context) +#nullable disable + { + throw new NotImplementedException(); + } } } \ No newline at end of file diff --git a/src/Cake.Core.Tests/Data/PropertyAliasGeneratorData.cs b/src/Cake.Core.Tests/Data/PropertyAliasGeneratorData.cs index 06542fc8e4..bcfc01a80f 100644 --- a/src/Cake.Core.Tests/Data/PropertyAliasGeneratorData.cs +++ b/src/Cake.Core.Tests/Data/PropertyAliasGeneratorData.cs @@ -123,5 +123,13 @@ public static int Cached_Obsolete_ExplicitError_WithMessage(this ICakeContext co { throw new NotImplementedException(); } + + [CakePropertyAlias(Cache = true)] +#nullable enable + public static string? Cached_Nullable_Type(this ICakeContext context) +#nullable disable + { + throw new NotImplementedException(); + } } } \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethod.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethod.verified.cake index 3dc2260389..32e48d1be2 100644 --- a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethod.verified.cake +++ b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethod.verified.cake @@ -1,5 +1,3 @@ [System.Diagnostics.DebuggerStepThrough] public void Generic_ExtensionMethod() -{ - Cake.Core.Tests.Data.MethodAliasGeneratorData.Generic_ExtensionMethod(Context); -} \ No newline at end of file + => Cake.Core.Tests.Data.MethodAliasGeneratorData.Generic_ExtensionMethod(Context); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithGenericReturnValue.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithGenericReturnValue.verified.cake index 98ad68a1b4..6ed38f7ff1 100644 --- a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithGenericReturnValue.verified.cake +++ b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithGenericReturnValue.verified.cake @@ -1,5 +1,3 @@ [System.Diagnostics.DebuggerStepThrough] public TTest Generic_ExtensionMethodWithGenericReturnValue(TTest value) -{ - return Cake.Core.Tests.Data.MethodAliasGeneratorData.Generic_ExtensionMethodWithGenericReturnValue(Context, value); -} \ No newline at end of file + => Cake.Core.Tests.Data.MethodAliasGeneratorData.Generic_ExtensionMethodWithGenericReturnValue(Context, value); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithGenericReturnValueAndTypeParamConstraints.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithGenericReturnValueAndTypeParamConstraints.verified.cake index 2c686ebe56..460f1bef3c 100644 --- a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithGenericReturnValueAndTypeParamConstraints.verified.cake +++ b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithGenericReturnValueAndTypeParamConstraints.verified.cake @@ -2,6 +2,4 @@ public TOut Generic_ExtensionMethodWithGenericReturnValueAndTypeParamConstraints(TIn arg) where TIn : class, new() where TOut : System.Collections.ArrayList, System.IDisposable -{ - return Cake.Core.Tests.Data.MethodAliasGeneratorData.Generic_ExtensionMethodWithGenericReturnValueAndTypeParamConstraints(Context, arg); -} \ No newline at end of file + => Cake.Core.Tests.Data.MethodAliasGeneratorData.Generic_ExtensionMethodWithGenericReturnValueAndTypeParamConstraints(Context, arg); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithParameter.verified.cake index 44046190c2..243e4c734a 100644 --- a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithParameter.verified.cake +++ b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Generic_Methods_name=Generic_ExtensionMethodWithParameter.verified.cake @@ -1,5 +1,3 @@ [System.Diagnostics.DebuggerStepThrough] public void Generic_ExtensionMethodWithParameter(TTest value) -{ - Cake.Core.Tests.Data.MethodAliasGeneratorData.Generic_ExtensionMethodWithParameter(Context, value); -} \ No newline at end of file + => Cake.Core.Tests.Data.MethodAliasGeneratorData.Generic_ExtensionMethodWithParameter(Context, value); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithDynamicReturnValue.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithDynamicReturnValue.verified.cake index 4f21aed07e..176b3d095a 100644 --- a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithDynamicReturnValue.verified.cake +++ b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithDynamicReturnValue.verified.cake @@ -1,5 +1,3 @@ [System.Diagnostics.DebuggerStepThrough] public dynamic NonGeneric_ExtensionMethodWithDynamicReturnValue() -{ - return Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithDynamicReturnValue(Context); -} \ No newline at end of file + => Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithDynamicReturnValue(Context); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithGenericCollectionOfNestedType.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithGenericCollectionOfNestedType.verified.cake index 63f1d940ff..3df11a5ceb 100644 --- a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithGenericCollectionOfNestedType.verified.cake +++ b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithGenericCollectionOfNestedType.verified.cake @@ -1,5 +1,3 @@ [System.Diagnostics.DebuggerStepThrough] public void NonGeneric_ExtensionMethodWithGenericCollectionOfNestedType(System.Collections.Generic.ICollection items) -{ - Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithGenericCollectionOfNestedType(Context, items); -} \ No newline at end of file + => Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithGenericCollectionOfNestedType(Context, items); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithGenericExpressionArrayParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithGenericExpressionArrayParameter.verified.cake index 4f2f20600c..0473c84c68 100644 --- a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithGenericExpressionArrayParameter.verified.cake +++ b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithGenericExpressionArrayParameter.verified.cake @@ -1,5 +1,3 @@ [System.Diagnostics.DebuggerStepThrough] public void NonGeneric_ExtensionMethodWithGenericExpressionArrayParameter(System.Linq.Expressions.Expression>[] expression) -{ - Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithGenericExpressionArrayParameter(Context, expression); -} \ No newline at end of file + => Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithGenericExpressionArrayParameter(Context, expression); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithGenericExpressionParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithGenericExpressionParameter.verified.cake index d6938025dd..6fab8485d2 100644 --- a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithGenericExpressionParameter.verified.cake +++ b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithGenericExpressionParameter.verified.cake @@ -1,5 +1,3 @@ [System.Diagnostics.DebuggerStepThrough] public void NonGeneric_ExtensionMethodWithGenericExpressionParameter(System.Linq.Expressions.Expression> expression) -{ - Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithGenericExpressionParameter(Context, expression); -} \ No newline at end of file + => Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithGenericExpressionParameter(Context, expression); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithGenericExpressionParamsArrayParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithGenericExpressionParamsArrayParameter.verified.cake index adef40989b..e0fc61c506 100644 --- a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithGenericExpressionParamsArrayParameter.verified.cake +++ b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithGenericExpressionParamsArrayParameter.verified.cake @@ -1,5 +1,3 @@ [System.Diagnostics.DebuggerStepThrough] public void NonGeneric_ExtensionMethodWithGenericExpressionParamsArrayParameter(params System.Linq.Expressions.Expression>[] expression) -{ - Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithGenericExpressionParamsArrayParameter(Context, expression); -} \ No newline at end of file + => Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithGenericExpressionParamsArrayParameter(Context, expression); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithGenericParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithGenericParameter.verified.cake index b0cc1889fd..72fbd4a722 100644 --- a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithGenericParameter.verified.cake +++ b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithGenericParameter.verified.cake @@ -1,5 +1,3 @@ [System.Diagnostics.DebuggerStepThrough] public void NonGeneric_ExtensionMethodWithGenericParameter(System.Action value) -{ - Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithGenericParameter(Context, value); -} \ No newline at end of file + => Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithGenericParameter(Context, value); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithNoParameters.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithNoParameters.verified.cake index 4377daf9c0..ca74b8c2c7 100644 --- a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithNoParameters.verified.cake +++ b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithNoParameters.verified.cake @@ -1,5 +1,3 @@ [System.Diagnostics.DebuggerStepThrough] public void NonGeneric_ExtensionMethodWithNoParameters() -{ - Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithNoParameters(Context); -} \ No newline at end of file + => Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithNoParameters(Context); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithNullableParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithNullableParameter.verified.cake new file mode 100644 index 0000000000..756f9ffafc --- /dev/null +++ b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithNullableParameter.verified.cake @@ -0,0 +1,3 @@ +[System.Diagnostics.DebuggerStepThrough] +public void NonGeneric_ExtensionMethodWithNullableParameter(System.String? parameter) + => Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithNullableParameter(Context, parameter); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithNullableReturnValue.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithNullableReturnValue.verified.cake new file mode 100644 index 0000000000..a2ed6d19ac --- /dev/null +++ b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithNullableReturnValue.verified.cake @@ -0,0 +1,3 @@ +[System.Diagnostics.DebuggerStepThrough] +public System.String? NonGeneric_ExtensionMethodWithNullableReturnValue() + => Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithNullableReturnValue(Context); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalBooleanParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalBooleanParameter.verified.cake index 0e55a933cf..a582e31fdb 100644 --- a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalBooleanParameter.verified.cake +++ b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalBooleanParameter.verified.cake @@ -1,5 +1,3 @@ [System.Diagnostics.DebuggerStepThrough] public void NonGeneric_ExtensionMethodWithOptionalBooleanParameter(System.Int32 value, System.Boolean flag = false) -{ - Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalBooleanParameter(Context, value, flag); -} \ No newline at end of file + => Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalBooleanParameter(Context, value, flag); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalCharParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalCharParameter.verified.cake index b4a6ae2b04..a89ab1efed 100644 --- a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalCharParameter.verified.cake +++ b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalCharParameter.verified.cake @@ -1,5 +1,3 @@ [System.Diagnostics.DebuggerStepThrough] public void NonGeneric_ExtensionMethodWithOptionalCharParameter(System.String s, System.Char c = 's') -{ - Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalCharParameter(Context, s, c); -} \ No newline at end of file + => Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalCharParameter(Context, s, c); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalDecimalParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalDecimalParameter.verified.cake index 4fee401a0b..bf6d48a86e 100644 --- a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalDecimalParameter.verified.cake +++ b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalDecimalParameter.verified.cake @@ -1,5 +1,3 @@ [System.Diagnostics.DebuggerStepThrough] public void NonGeneric_ExtensionMethodWithOptionalDecimalParameter(System.String s, System.Decimal value = (System.Decimal)12.12) -{ - Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalDecimalParameter(Context, s, value); -} \ No newline at end of file + => Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalDecimalParameter(Context, s, value); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalEnumParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalEnumParameter.verified.cake index 5219816d75..9b9f861896 100644 --- a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalEnumParameter.verified.cake +++ b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalEnumParameter.verified.cake @@ -1,5 +1,3 @@ [System.Diagnostics.DebuggerStepThrough] public void NonGeneric_ExtensionMethodWithOptionalEnumParameter(System.Int32 value, System.AttributeTargets targets = (System.AttributeTargets)4) -{ - Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalEnumParameter(Context, value, targets); -} \ No newline at end of file + => Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalEnumParameter(Context, value, targets); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableBooleanParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableBooleanParameter.verified.cake index 5fc4d9a697..ed9dc89338 100644 --- a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableBooleanParameter.verified.cake +++ b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableBooleanParameter.verified.cake @@ -1,5 +1,3 @@ [System.Diagnostics.DebuggerStepThrough] public void NonGeneric_ExtensionMethodWithOptionalNullableBooleanParameter(System.String s, System.Nullable value = (System.Boolean)false) -{ - Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalNullableBooleanParameter(Context, s, value); -} \ No newline at end of file + => Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalNullableBooleanParameter(Context, s, value); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableCharParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableCharParameter.verified.cake index 49504fb8ee..b883d52848 100644 --- a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableCharParameter.verified.cake +++ b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableCharParameter.verified.cake @@ -1,5 +1,3 @@ [System.Diagnostics.DebuggerStepThrough] public void NonGeneric_ExtensionMethodWithOptionalNullableCharParameter(System.String s, System.Nullable value = (System.Char)'s') -{ - Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalNullableCharParameter(Context, s, value); -} \ No newline at end of file + => Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalNullableCharParameter(Context, s, value); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableDecimalParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableDecimalParameter.verified.cake index 9d4cd6c2d8..96bfe95405 100644 --- a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableDecimalParameter.verified.cake +++ b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableDecimalParameter.verified.cake @@ -1,5 +1,3 @@ [System.Diagnostics.DebuggerStepThrough] public void NonGeneric_ExtensionMethodWithOptionalNullableDecimalParameter(System.String s, System.Nullable value = (System.Decimal)123.12) -{ - Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalNullableDecimalParameter(Context, s, value); -} \ No newline at end of file + => Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalNullableDecimalParameter(Context, s, value); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableDoubleParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableDoubleParameter.verified.cake index b6ab059a48..ff56f6e3e0 100644 --- a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableDoubleParameter.verified.cake +++ b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableDoubleParameter.verified.cake @@ -1,5 +1,3 @@ [System.Diagnostics.DebuggerStepThrough] public void NonGeneric_ExtensionMethodWithOptionalNullableDoubleParameter(System.String s, System.Nullable value = (System.Double)1234567890.12) -{ - Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalNullableDoubleParameter(Context, s, value); -} \ No newline at end of file + => Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalNullableDoubleParameter(Context, s, value); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableEnumParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableEnumParameter.verified.cake index 1bdc60c744..e7fa4aeeb1 100644 --- a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableEnumParameter.verified.cake +++ b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableEnumParameter.verified.cake @@ -1,5 +1,3 @@ [System.Diagnostics.DebuggerStepThrough] public void NonGeneric_ExtensionMethodWithOptionalNullableEnumParameter(System.String s, System.Nullable targets = (System.AttributeTargets)4) -{ - Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalNullableEnumParameter(Context, s, targets); -} \ No newline at end of file + => Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalNullableEnumParameter(Context, s, targets); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableLongParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableLongParameter.verified.cake index c8b25f8cae..53d3146e72 100644 --- a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableLongParameter.verified.cake +++ b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableLongParameter.verified.cake @@ -1,5 +1,3 @@ [System.Diagnostics.DebuggerStepThrough] public void NonGeneric_ExtensionMethodWithOptionalNullableLongParameter(System.String s, System.Nullable value = (System.Int64)1234567890) -{ - Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalNullableLongParameter(Context, s, value); -} \ No newline at end of file + => Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalNullableLongParameter(Context, s, value); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableTParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableTParameter.verified.cake index 5df7b4ef28..83efdef1d6 100644 --- a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableTParameter.verified.cake +++ b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalNullableTParameter.verified.cake @@ -1,5 +1,3 @@ [System.Diagnostics.DebuggerStepThrough] public void NonGeneric_ExtensionMethodWithOptionalNullableTParameter(System.String s, System.Nullable value = (System.Int32)0) -{ - Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalNullableTParameter(Context, s, value); -} \ No newline at end of file + => Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalNullableTParameter(Context, s, value); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalObjectParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalObjectParameter.verified.cake index 82c9bac65f..921c14ade0 100644 --- a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalObjectParameter.verified.cake +++ b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalObjectParameter.verified.cake @@ -1,5 +1,3 @@ [System.Diagnostics.DebuggerStepThrough] public void NonGeneric_ExtensionMethodWithOptionalObjectParameter(System.Int32 value, System.Object option = null) -{ - Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalObjectParameter(Context, value, option); -} \ No newline at end of file + => Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalObjectParameter(Context, value, option); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalStringParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalStringParameter.verified.cake index 1b8260d784..855d08957c 100644 --- a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalStringParameter.verified.cake +++ b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOptionalStringParameter.verified.cake @@ -1,5 +1,3 @@ [System.Diagnostics.DebuggerStepThrough] public void NonGeneric_ExtensionMethodWithOptionalStringParameter(System.Int32 value, System.String s = "there is a \"string\" here and a \t tab") -{ - Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalStringParameter(Context, value, s); -} \ No newline at end of file + => Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalStringParameter(Context, value, s); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOutputParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOutputParameter.verified.cake index 800ce262a6..c6f8631591 100644 --- a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOutputParameter.verified.cake +++ b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithOutputParameter.verified.cake @@ -1,5 +1,3 @@ [System.Diagnostics.DebuggerStepThrough] public void NonGeneric_ExtensionMethodWithOutputParameter(out System.IDisposable arg) -{ - Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOutputParameter(Context, out arg); -} \ No newline at end of file + => Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOutputParameter(Context, out arg); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithParameter.verified.cake index 196d594e5b..5ace2e0914 100644 --- a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithParameter.verified.cake +++ b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithParameter.verified.cake @@ -1,5 +1,3 @@ [System.Diagnostics.DebuggerStepThrough] public void NonGeneric_ExtensionMethodWithParameter(System.Int32 value) -{ - Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithParameter(Context, value); -} \ No newline at end of file + => Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithParameter(Context, value); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithParameterArray.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithParameterArray.verified.cake index c265f0b697..8d44f06ec5 100644 --- a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithParameterArray.verified.cake +++ b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithParameterArray.verified.cake @@ -1,5 +1,3 @@ [System.Diagnostics.DebuggerStepThrough] public void NonGeneric_ExtensionMethodWithParameterArray(params System.Int32[] values) -{ - Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithParameterArray(Context, values); -} \ No newline at end of file + => Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithParameterArray(Context, values); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithParameterAttributes.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithParameterAttributes.verified.cake index 39391cc7f4..f3ae8f531d 100644 --- a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithParameterAttributes.verified.cake +++ b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithParameterAttributes.verified.cake @@ -1,5 +1,3 @@ [System.Diagnostics.DebuggerStepThrough] public void NonGeneric_ExtensionMethodWithParameterAttributes([System.Runtime.CompilerServices.CallerMemberName] System.String memberName = "", [System.Runtime.CompilerServices.CallerFilePath] System.String sourceFilePath = "", [System.Runtime.CompilerServices.CallerLineNumber] System.Int32 sourceLineNumber = (System.Int32)0) -{ - Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithParameterAttributes(Context, memberName, sourceFilePath, sourceLineNumber); -} \ No newline at end of file + => Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithParameterAttributes(Context, memberName, sourceFilePath, sourceLineNumber); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithReservedKeywordParameter.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithReservedKeywordParameter.verified.cake index c16ac53884..f3fc73d725 100644 --- a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithReservedKeywordParameter.verified.cake +++ b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithReservedKeywordParameter.verified.cake @@ -1,5 +1,3 @@ [System.Diagnostics.DebuggerStepThrough] public void NonGeneric_ExtensionMethodWithReservedKeywordParameter(System.Int32 @new) -{ - Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithReservedKeywordParameter(Context, @new); -} \ No newline at end of file + => Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithReservedKeywordParameter(Context, @new); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithReturnValue.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithReturnValue.verified.cake index 8075bdc12d..3af6e2ae3e 100644 --- a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithReturnValue.verified.cake +++ b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Non_Generic_Methods_name=ExtensionMethodWithReturnValue.verified.cake @@ -1,5 +1,3 @@ [System.Diagnostics.DebuggerStepThrough] public System.String NonGeneric_ExtensionMethodWithReturnValue() -{ - return Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithReturnValue(Context); -} \ No newline at end of file + => Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithReturnValue(Context); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ExplicitError_WithMessage.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ExplicitError_WithMessage.verified.cake index d180837ad1..a87e6874ad 100644 --- a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ExplicitError_WithMessage.verified.cake +++ b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ExplicitError_WithMessage.verified.cake @@ -1,5 +1,3 @@ [System.Diagnostics.DebuggerStepThrough] public void Obsolete_ExplicitError_WithMessage() -{ - throw new Cake.Core.CakeException("The alias Obsolete_ExplicitError_WithMessage has been made obsolete. Please use Foo.Bar instead."); -} \ No newline at end of file + => throw new Cake.Core.CakeException("The alias Obsolete_ExplicitError_WithMessage has been made obsolete. Please use Foo.Bar instead."); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ExplicitWarning_WithMessage.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ExplicitWarning_WithMessage.verified.cake index e436ddede9..c617650e9c 100644 --- a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ExplicitWarning_WithMessage.verified.cake +++ b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ExplicitWarning_WithMessage.verified.cake @@ -1,8 +1,5 @@ [System.Diagnostics.DebuggerStepThrough] public void Obsolete_ExplicitWarning_WithMessage() -{ - Context.Log.Warning("Warning: The alias Obsolete_ExplicitWarning_WithMessage has been made obsolete. Please use Foo.Bar instead."); #pragma warning disable 0618 - Cake.Core.Tests.Data.MethodAliasGeneratorData.Obsolete_ExplicitWarning_WithMessage(Context); -#pragma warning restore 0618 -} \ No newline at end of file + => Cake.Core.Tests.Data.MethodAliasGeneratorData.Obsolete_ExplicitWarning_WithMessage(Context); +#pragma warning restore 0618 \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ImplicitWarning_NoMessage.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ImplicitWarning_NoMessage.verified.cake index 1523fa310d..ace37bde77 100644 --- a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ImplicitWarning_NoMessage.verified.cake +++ b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ImplicitWarning_NoMessage.verified.cake @@ -1,8 +1,5 @@ [System.Diagnostics.DebuggerStepThrough] public void Obsolete_ImplicitWarning_NoMessage() -{ - Context.Log.Warning("Warning: The alias Obsolete_ImplicitWarning_NoMessage has been made obsolete."); #pragma warning disable 0618 - Cake.Core.Tests.Data.MethodAliasGeneratorData.Obsolete_ImplicitWarning_NoMessage(Context); -#pragma warning restore 0618 -} \ No newline at end of file + => Cake.Core.Tests.Data.MethodAliasGeneratorData.Obsolete_ImplicitWarning_NoMessage(Context); +#pragma warning restore 0618 \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ImplicitWarning_WithMessage.verified.cake b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ImplicitWarning_WithMessage.verified.cake index 4ab4b9ea47..1962dbc49e 100644 --- a/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ImplicitWarning_WithMessage.verified.cake +++ b/src/Cake.Core.Tests/Expectations/MethodAliasGeneratorTests.TheGeneratorMethod.Should_Return_Correct_Generated_Code_For_Obsolete_Methods_name=Obsolete_ImplicitWarning_WithMessage.verified.cake @@ -1,8 +1,5 @@ [System.Diagnostics.DebuggerStepThrough] public void Obsolete_ImplicitWarning_WithMessage() -{ - Context.Log.Warning("Warning: The alias Obsolete_ImplicitWarning_WithMessage has been made obsolete. Please use Foo.Bar instead."); #pragma warning disable 0618 - Cake.Core.Tests.Data.MethodAliasGeneratorData.Obsolete_ImplicitWarning_WithMessage(Context); -#pragma warning restore 0618 -} \ No newline at end of file + => Cake.Core.Tests.Data.MethodAliasGeneratorData.Obsolete_ImplicitWarning_WithMessage(Context); +#pragma warning restore 0618 \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ExplicitError_WithMessage.verified.cake b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ExplicitError_WithMessage.verified.cake index 0d109964de..d25430c7c4 100644 --- a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ExplicitError_WithMessage.verified.cake +++ b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ExplicitError_WithMessage.verified.cake @@ -1,8 +1,5 @@ -public System.Int32 Cached_Obsolete_ExplicitError_WithMessage -{ - [System.Diagnostics.DebuggerStepThrough] - get - { - throw new Cake.Core.CakeException("The alias Cached_Obsolete_ExplicitError_WithMessage has been made obsolete. Please use Foo.Bar instead."); - } -} \ No newline at end of file +[Obsolete("Please use Foo.Bar instead.", true)] +public System.Int32 Cached_Obsolete_ExplicitError_WithMessage +#pragma warning disable CS0618 + => Cake.Core.Tests.Data.PropertyAliasGeneratorData.Cached_Obsolete_ExplicitError_WithMessage(Context); +#pragma warning restore CS0618 \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ExplicitWarning_WithMessage.verified.cake b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ExplicitWarning_WithMessage.verified.cake index a54cb38ce5..15df323b2b 100644 --- a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ExplicitWarning_WithMessage.verified.cake +++ b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ExplicitWarning_WithMessage.verified.cake @@ -1,17 +1,6 @@ private System.Int32? _Cached_Obsolete_ExplicitWarning_WithMessage; -[Obsolete("Please use Foo.Bar instead.")] +[Obsolete("Please use Foo.Bar instead.", false)] public System.Int32 Cached_Obsolete_ExplicitWarning_WithMessage -{ - [System.Diagnostics.DebuggerStepThrough] - get - { - Context.Log.Warning("Warning: The alias Cached_Obsolete_ExplicitWarning_WithMessage has been made obsolete. Please use Foo.Bar instead."); - if (_Cached_Obsolete_ExplicitWarning_WithMessage==null) - { #pragma warning disable CS0618 - _Cached_Obsolete_ExplicitWarning_WithMessage = Cake.Core.Tests.Data.PropertyAliasGeneratorData.Cached_Obsolete_ExplicitWarning_WithMessage(Context); -#pragma warning restore CS0618 - } - return _Cached_Obsolete_ExplicitWarning_WithMessage.Value; - } -} \ No newline at end of file + => _Cached_Obsolete_ExplicitWarning_WithMessage ??= Cake.Core.Tests.Data.PropertyAliasGeneratorData.Cached_Obsolete_ExplicitWarning_WithMessage(Context); +#pragma warning restore CS0618 \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ImplicitWarning_NoMessage.verified.cake b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ImplicitWarning_NoMessage.verified.cake index 0b5db4d12e..6758a9c930 100644 --- a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ImplicitWarning_NoMessage.verified.cake +++ b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ImplicitWarning_NoMessage.verified.cake @@ -1,17 +1,6 @@ private System.Int32? _Cached_Obsolete_ImplicitWarning_NoMessage; [Obsolete] public System.Int32 Cached_Obsolete_ImplicitWarning_NoMessage -{ - [System.Diagnostics.DebuggerStepThrough] - get - { - Context.Log.Warning("Warning: The alias Cached_Obsolete_ImplicitWarning_NoMessage has been made obsolete."); - if (_Cached_Obsolete_ImplicitWarning_NoMessage==null) - { #pragma warning disable CS0618 - _Cached_Obsolete_ImplicitWarning_NoMessage = Cake.Core.Tests.Data.PropertyAliasGeneratorData.Cached_Obsolete_ImplicitWarning_NoMessage(Context); -#pragma warning restore CS0618 - } - return _Cached_Obsolete_ImplicitWarning_NoMessage.Value; - } -} \ No newline at end of file + => _Cached_Obsolete_ImplicitWarning_NoMessage ??= Cake.Core.Tests.Data.PropertyAliasGeneratorData.Cached_Obsolete_ImplicitWarning_NoMessage(Context); +#pragma warning restore CS0618 \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ImplicitWarning_WithMessage.verified.cake b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ImplicitWarning_WithMessage.verified.cake index ffb6c8c272..ffea761aa4 100644 --- a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ImplicitWarning_WithMessage.verified.cake +++ b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Obsolete_Properties_name=Cached_Obsolete_ImplicitWarning_WithMessage.verified.cake @@ -1,17 +1,6 @@ private System.Int32? _Cached_Obsolete_ImplicitWarning_WithMessage; -[Obsolete("Please use Foo.Bar instead.")] +[Obsolete("Please use Foo.Bar instead.", false)] public System.Int32 Cached_Obsolete_ImplicitWarning_WithMessage -{ - [System.Diagnostics.DebuggerStepThrough] - get - { - Context.Log.Warning("Warning: The alias Cached_Obsolete_ImplicitWarning_WithMessage has been made obsolete. Please use Foo.Bar instead."); - if (_Cached_Obsolete_ImplicitWarning_WithMessage==null) - { #pragma warning disable CS0618 - _Cached_Obsolete_ImplicitWarning_WithMessage = Cake.Core.Tests.Data.PropertyAliasGeneratorData.Cached_Obsolete_ImplicitWarning_WithMessage(Context); -#pragma warning restore CS0618 - } - return _Cached_Obsolete_ImplicitWarning_WithMessage.Value; - } -} \ No newline at end of file + => _Cached_Obsolete_ImplicitWarning_WithMessage ??= Cake.Core.Tests.Data.PropertyAliasGeneratorData.Cached_Obsolete_ImplicitWarning_WithMessage(Context); +#pragma warning restore CS0618 \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Dynamic_Type.verified.cake b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Dynamic_Type.verified.cake index b57a1679d3..ee26752285 100644 --- a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Dynamic_Type.verified.cake +++ b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Dynamic_Type.verified.cake @@ -1,13 +1,3 @@ private dynamic _Cached_Dynamic_Type; public dynamic Cached_Dynamic_Type -{ - [System.Diagnostics.DebuggerStepThrough] - get - { - if (_Cached_Dynamic_Type==null) - { - _Cached_Dynamic_Type = Cake.Core.Tests.Data.PropertyAliasGeneratorData.Cached_Dynamic_Type(Context); - } - return _Cached_Dynamic_Type; - } -} \ No newline at end of file + => _Cached_Dynamic_Type ??= Cake.Core.Tests.Data.PropertyAliasGeneratorData.Cached_Dynamic_Type(Context); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Nullable_Type.verified.cake b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Nullable_Type.verified.cake new file mode 100644 index 0000000000..247a2cb74c --- /dev/null +++ b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Nullable_Type.verified.cake @@ -0,0 +1,3 @@ +private System.String? _Cached_Nullable_Type; +public System.String? Cached_Nullable_Type + => _Cached_Nullable_Type ??= Cake.Core.Tests.Data.PropertyAliasGeneratorData.Cached_Nullable_Type(Context); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Reference_Type.verified.cake b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Reference_Type.verified.cake index 203e42b432..f76291c846 100644 --- a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Reference_Type.verified.cake +++ b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Reference_Type.verified.cake @@ -1,13 +1,3 @@ private System.String _Cached_Reference_Type; public System.String Cached_Reference_Type -{ - [System.Diagnostics.DebuggerStepThrough] - get - { - if (_Cached_Reference_Type==null) - { - _Cached_Reference_Type = Cake.Core.Tests.Data.PropertyAliasGeneratorData.Cached_Reference_Type(Context); - } - return _Cached_Reference_Type; - } -} \ No newline at end of file + => _Cached_Reference_Type ??= Cake.Core.Tests.Data.PropertyAliasGeneratorData.Cached_Reference_Type(Context); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Value_Type.verified.cake b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Value_Type.verified.cake index 159ad45343..87cd6a7249 100644 --- a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Value_Type.verified.cake +++ b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Cached_Properties_name=Cached_Value_Type.verified.cake @@ -1,13 +1,3 @@ private System.Boolean? _Cached_Value_Type; public System.Boolean Cached_Value_Type -{ - [System.Diagnostics.DebuggerStepThrough] - get - { - if (_Cached_Value_Type==null) - { - _Cached_Value_Type = Cake.Core.Tests.Data.PropertyAliasGeneratorData.Cached_Value_Type(Context); - } - return _Cached_Value_Type.Value; - } -} \ No newline at end of file + => _Cached_Value_Type ??= Cake.Core.Tests.Data.PropertyAliasGeneratorData.Cached_Value_Type(Context); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ExplicitError_WithMessage.verified.cake b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ExplicitError_WithMessage.verified.cake index 981d8ef161..a13ad1d445 100644 --- a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ExplicitError_WithMessage.verified.cake +++ b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ExplicitError_WithMessage.verified.cake @@ -1,8 +1,5 @@ -public System.Int32 NonCached_Obsolete_ExplicitError_WithMessage -{ - [System.Diagnostics.DebuggerStepThrough] - get - { - throw new Cake.Core.CakeException("The alias NonCached_Obsolete_ExplicitError_WithMessage has been made obsolete. Please use Foo.Bar instead."); - } -} \ No newline at end of file +[Obsolete("Please use Foo.Bar instead.", true)] +public System.Int32 NonCached_Obsolete_ExplicitError_WithMessage +#pragma warning disable CS0618 + => Cake.Core.Tests.Data.PropertyAliasGeneratorData.NonCached_Obsolete_ExplicitError_WithMessage(Context); +#pragma warning restore CS0618 \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ExplicitWarning_WithMessage.verified.cake b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ExplicitWarning_WithMessage.verified.cake index 4fc0eb5f89..16d4002b73 100644 --- a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ExplicitWarning_WithMessage.verified.cake +++ b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ExplicitWarning_WithMessage.verified.cake @@ -1,9 +1,5 @@ -public System.Int32 NonCached_Obsolete_ExplicitWarning_WithMessage -{ - [System.Diagnostics.DebuggerStepThrough] - get - { - Context.Log.Warning("Warning: The alias NonCached_Obsolete_ExplicitWarning_WithMessage has been made obsolete. Please use Foo.Bar instead."); - return Cake.Core.Tests.Data.PropertyAliasGeneratorData.NonCached_Obsolete_ExplicitWarning_WithMessage(Context); - } -} \ No newline at end of file +[Obsolete("Please use Foo.Bar instead.", false)] +public System.Int32 NonCached_Obsolete_ExplicitWarning_WithMessage +#pragma warning disable CS0618 + => Cake.Core.Tests.Data.PropertyAliasGeneratorData.NonCached_Obsolete_ExplicitWarning_WithMessage(Context); +#pragma warning restore CS0618 \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ImplicitWarning_NoMessage.verified.cake b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ImplicitWarning_NoMessage.verified.cake index 93e9bb7369..c770e57722 100644 --- a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ImplicitWarning_NoMessage.verified.cake +++ b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ImplicitWarning_NoMessage.verified.cake @@ -1,9 +1,5 @@ -public System.Int32 NonCached_Obsolete_ImplicitWarning_NoMessage -{ - [System.Diagnostics.DebuggerStepThrough] - get - { - Context.Log.Warning("Warning: The alias NonCached_Obsolete_ImplicitWarning_NoMessage has been made obsolete."); - return Cake.Core.Tests.Data.PropertyAliasGeneratorData.NonCached_Obsolete_ImplicitWarning_NoMessage(Context); - } -} \ No newline at end of file +[Obsolete] +public System.Int32 NonCached_Obsolete_ImplicitWarning_NoMessage +#pragma warning disable CS0618 + => Cake.Core.Tests.Data.PropertyAliasGeneratorData.NonCached_Obsolete_ImplicitWarning_NoMessage(Context); +#pragma warning restore CS0618 \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ImplicitWarning_WithMessage.verified.cake b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ImplicitWarning_WithMessage.verified.cake index f6def61039..cc739cad85 100644 --- a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ImplicitWarning_WithMessage.verified.cake +++ b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Obsolete_Properties_name=NonCached_Obsolete_ImplicitWarning_WithMessage.verified.cake @@ -1,9 +1,5 @@ -public System.Int32 NonCached_Obsolete_ImplicitWarning_WithMessage -{ - [System.Diagnostics.DebuggerStepThrough] - get - { - Context.Log.Warning("Warning: The alias NonCached_Obsolete_ImplicitWarning_WithMessage has been made obsolete. Please use Foo.Bar instead."); - return Cake.Core.Tests.Data.PropertyAliasGeneratorData.NonCached_Obsolete_ImplicitWarning_WithMessage(Context); - } -} \ No newline at end of file +[Obsolete("Please use Foo.Bar instead.", false)] +public System.Int32 NonCached_Obsolete_ImplicitWarning_WithMessage +#pragma warning disable CS0618 + => Cake.Core.Tests.Data.PropertyAliasGeneratorData.NonCached_Obsolete_ImplicitWarning_WithMessage(Context); +#pragma warning restore CS0618 \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Properties_name=NonCached_Dynamic_Type.verified.cake b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Properties_name=NonCached_Dynamic_Type.verified.cake index 8afeee8917..2d9c520175 100644 --- a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Properties_name=NonCached_Dynamic_Type.verified.cake +++ b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Properties_name=NonCached_Dynamic_Type.verified.cake @@ -1,8 +1,2 @@ public dynamic NonCached_Dynamic_Type -{ - [System.Diagnostics.DebuggerStepThrough] - get - { - return Cake.Core.Tests.Data.PropertyAliasGeneratorData.NonCached_Dynamic_Type(Context); - } -} \ No newline at end of file + => Cake.Core.Tests.Data.PropertyAliasGeneratorData.NonCached_Dynamic_Type(Context); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Properties_name=NonCached_Value_Type.verified.cake b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Properties_name=NonCached_Value_Type.verified.cake index 877caa66bf..3a339fd775 100644 --- a/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Properties_name=NonCached_Value_Type.verified.cake +++ b/src/Cake.Core.Tests/Expectations/PropertyAliasGeneratorTests.TheGenerateMethod.Should_Return_Correct_Generated_Code_For_Non_Cached_Properties_name=NonCached_Value_Type.verified.cake @@ -1,8 +1,2 @@ public System.Int32 NonCached_Value_Type -{ - [System.Diagnostics.DebuggerStepThrough] - get - { - return Cake.Core.Tests.Data.PropertyAliasGeneratorData.NonCached_Value_Type(Context); - } -} \ No newline at end of file + => Cake.Core.Tests.Data.PropertyAliasGeneratorData.NonCached_Value_Type(Context); \ No newline at end of file diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/MethodAliasGeneratorTests.cs b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/MethodAliasGeneratorTests.cs index ebcf9a5614..743efb534c 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/MethodAliasGeneratorTests.cs +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/MethodAliasGeneratorTests.cs @@ -61,6 +61,8 @@ public void Should_Throw_If_Method_Is_Null() [InlineData("ExtensionMethodWithGenericCollectionOfNestedType")] [InlineData("ExtensionMethodWithParameterAttributes")] [InlineData("ExtensionMethodWithDynamicReturnValue")] + [InlineData("ExtensionMethodWithNullableParameter")] + [InlineData("ExtensionMethodWithNullableReturnValue")] public Task Should_Return_Correct_Generated_Code_For_Non_Generic_Methods(string name) { // Given / When diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/PropertyAliasGeneratorTests.cs b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/PropertyAliasGeneratorTests.cs index c6595a8e15..77082d52d3 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/PropertyAliasGeneratorTests.cs +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/PropertyAliasGeneratorTests.cs @@ -132,6 +132,7 @@ public Task Should_Return_Correct_Generated_Code_For_Non_Cached_Properties(strin [InlineData("Cached_Reference_Type")] [InlineData("Cached_Value_Type")] [InlineData("Cached_Dynamic_Type")] + [InlineData("Cached_Nullable_Type")] public Task Should_Return_Correct_Generated_Code_For_Cached_Properties(string name) { // Given / When diff --git a/src/Cake.Core/Scripting/CodeGen/MethodAliasGenerator.cs b/src/Cake.Core/Scripting/CodeGen/MethodAliasGenerator.cs index 570d52b097..6dba303853 100644 --- a/src/Cake.Core/Scripting/CodeGen/MethodAliasGenerator.cs +++ b/src/Cake.Core/Scripting/CodeGen/MethodAliasGenerator.cs @@ -44,15 +44,18 @@ public static string Generate(MethodInfo method, out string hash) throw new ArgumentNullException(nameof(method)); } - var isFunction = method.ReturnType != typeof(void); var builder = new StringBuilder(); - var parameters = method.GetParameters().Skip(1).ToArray(); + var parameters = method.GetParameters()[1..]; + + // Method is obsolete? + var obsolete = method.GetCustomAttribute(); + var isObsolete = obsolete != null; // Generate method signature. builder.AppendLine("[System.Diagnostics.DebuggerStepThrough]"); builder.Append("public "); builder.Append(GetReturnType(method)); - builder.Append(" "); + builder.Append(' '); builder.Append(method.Name); if (method.IsGenericMethod) @@ -61,9 +64,9 @@ public static string Generate(MethodInfo method, out string hash) BuildGenericArguments(method, builder); } - builder.Append("("); + builder.Append('('); builder.Append(string.Concat(GetProxyParameters(parameters, true))); - builder.Append(")"); + builder.Append(')'); // if the method is generic, emit any constraints that might exist. if (method.IsGenericMethod) @@ -71,19 +74,16 @@ public static string Generate(MethodInfo method, out string hash) GenericParameterConstraintEmitter.BuildGenericConstraints(method, builder); } - hash = _hasher - .ComputeHash(Encoding.UTF8.GetBytes(builder.ToString())) - .Aggregate(new StringBuilder(), - (sb, b) => sb.AppendFormat("{0:x2}", b), - sb => sb.ToString()); + hash = Convert.ToHexString( + _hasher.ComputeHash(Encoding.UTF8.GetBytes(builder.ToString()))); builder.AppendLine(); - builder.Append("{"); - builder.AppendLine(); - // Method is obsolete? - var obsolete = method.GetCustomAttribute(); - var isObsolete = obsolete != null; + if (isObsolete && !obsolete.IsError) + { + builder.AppendLine("#pragma warning disable 0618"); + } + builder.Append(" => "); if (isObsolete) { var message = GetObsoleteMessage(method, obsolete); @@ -93,32 +93,13 @@ public static string Generate(MethodInfo method, out string hash) // Throw an exception. var exception = string.Format( CultureInfo.InvariantCulture, - " throw new Cake.Core.CakeException(\"{0}\");", message); + "throw new Cake.Core.CakeException(\"{0}\");", message); builder.AppendLine(exception); // End method. - builder.Append("}"); - builder.AppendLine(); builder.AppendLine(); return builder.ToString(); } - - builder.AppendLine(string.Format( - CultureInfo.InvariantCulture, - " Context.Log.Warning(\"Warning: {0}\");", message)); - } - - if (isObsolete) - { - builder.AppendLine("#pragma warning disable 0618"); - } - - builder.Append(" "); - - if (isFunction) - { - // Add return keyword. - builder.Append("return "); } // Call extension method. @@ -130,10 +111,9 @@ public static string Generate(MethodInfo method, out string hash) BuildGenericArguments(method, builder); } - builder.Append("("); + builder.Append('('); builder.Append(string.Concat(GetProxyParameters(parameters, false))); - builder.Append(");"); - builder.AppendLine(); + builder.AppendLine(");"); if (isObsolete) { @@ -141,8 +121,6 @@ public static string Generate(MethodInfo method, out string hash) } // End method. - builder.Append("}"); - builder.AppendLine(); builder.AppendLine(); return builder.ToString(); @@ -156,7 +134,10 @@ private static string GetReturnType(MethodInfo method) } var isDynamic = method.ReturnTypeCustomAttributes.GetCustomAttributes(typeof(DynamicAttribute), true).Any(); - return isDynamic ? "dynamic" : method.ReturnType.GetFullName(); + var isNullable = method.ReturnTypeCustomAttributes.GetCustomAttributes(true).Any(attr => attr.GetType().FullName == "System.Runtime.CompilerServices.NullableAttribute"); + return string.Concat( + isDynamic ? "dynamic" : method.ReturnType.GetFullName(), + isNullable ? "?" : string.Empty); } private static IEnumerable GetProxyParameters(IEnumerable parameters, bool includeType) @@ -183,14 +164,14 @@ private static IEnumerable GetProxyParameters(IEnumerable private static void BuildGenericArguments(MethodInfo method, StringBuilder builder) { - builder.Append("<"); + builder.Append('<'); var genericArguments = new List(); foreach (var argument in method.GetGenericArguments()) { genericArguments.Add(argument.Name); } builder.Append(string.Join(", ", genericArguments)); - builder.Append(">"); + builder.Append('>'); } private static string GetObsoleteMessage(MethodInfo method, ObsoleteAttribute attribute) diff --git a/src/Cake.Core/Scripting/CodeGen/ParameterEmitter.cs b/src/Cake.Core/Scripting/CodeGen/ParameterEmitter.cs index 68481b63d0..ff08343413 100644 --- a/src/Cake.Core/Scripting/CodeGen/ParameterEmitter.cs +++ b/src/Cake.Core/Scripting/CodeGen/ParameterEmitter.cs @@ -17,6 +17,15 @@ namespace Cake.Core.Scripting.CodeGen /// internal sealed class ParameterEmitter { + // filter out the any custom parameter attributes that will be emitted by other means. + private static readonly Type[] Exclusions = new[] + { + typeof(OptionalAttribute), + typeof(OutAttribute), + typeof(ParamArrayAttribute), + typeof(DecimalConstantAttribute), + }; + private static readonly ParameterFormatter _parameterFormatter = new ParameterFormatter(); internal static string Emit(ParameterInfo parameter, bool includeType) @@ -36,6 +45,7 @@ private static IEnumerable BuildParameterTokens(ParameterInfo parameter, } if (includeType) { + var isNullable = false; if (parameter.IsDefined(typeof(ParamArrayAttribute))) { yield return "params "; @@ -45,21 +55,17 @@ private static IEnumerable BuildParameterTokens(ParameterInfo parameter, var customAttrs = parameter.GetCustomAttributesData(); if (customAttrs.Count > 0) { - // filter out the any custom parameter attributes that will be emitted by other means. - var exclusions = new[] - { - typeof(OptionalAttribute), - typeof(OutAttribute), - typeof(ParamArrayAttribute), - typeof(DecimalConstantAttribute) - }; - - foreach (var item in customAttrs.Where(p => !exclusions.Contains(p.AttributeType))) + foreach (var item in customAttrs.Where(p => !Exclusions.Contains(p.AttributeType))) { var attributeType = item.AttributeType.GetFullName(); + if (item.AttributeType.FullName == "System.Runtime.CompilerServices.NullableAttribute") + { + isNullable = true; + continue; + } if (item.AttributeType.Name.EndsWith("Attribute", StringComparison.OrdinalIgnoreCase)) { - attributeType = attributeType.Substring(0, attributeType.LastIndexOf("Attribute", StringComparison.OrdinalIgnoreCase)); + attributeType = attributeType[..attributeType.LastIndexOf("Attribute", StringComparison.OrdinalIgnoreCase)]; } if (item.ConstructorArguments.Count < 1 && item.NamedArguments.Count < 1) @@ -101,6 +107,11 @@ private static IEnumerable BuildParameterTokens(ParameterInfo parameter, { yield return parameter.ParameterType.GetFullName(); } + + if (isNullable) + { + yield return "?"; + } yield return " "; } diff --git a/src/Cake.Core/Scripting/CodeGen/PropertyAliasGenerator.cs b/src/Cake.Core/Scripting/CodeGen/PropertyAliasGenerator.cs index 3df7afb01d..1b4ac99473 100644 --- a/src/Cake.Core/Scripting/CodeGen/PropertyAliasGenerator.cs +++ b/src/Cake.Core/Scripting/CodeGen/PropertyAliasGenerator.cs @@ -115,48 +115,27 @@ private static string GenerateCode(MethodInfo method, out string hash) { var builder = new StringBuilder(); - hash = GenerateCommonInitalCode(method, ref builder); - - builder.Append("{"); - builder.AppendLine(); - builder.AppendLine(" [System.Diagnostics.DebuggerStepThrough]"); - builder.Append(" get"); - builder.AppendLine(); - builder.AppendLine(" {"); - // Property is obsolete? var obsolete = method.GetCustomAttribute(); if (obsolete != null) { - var message = GetObsoleteMessage(method, obsolete); - - if (obsolete.IsError) - { - builder.Append(" throw new Cake.Core.CakeException(\""); - builder.Append(message); - builder.Append("\");"); - builder.AppendLine(); - builder.AppendLine(" }"); - builder.AppendLine("}"); - builder.AppendLine(); - builder.AppendLine(); - - return builder.ToString(); - } + AddObsoleteAttribute(builder, obsolete); + } - builder.AppendLine(string.Format( - CultureInfo.InvariantCulture, - " Context.Log.Warning(\"Warning: {0}\");", message)); + hash = GenerateCommonInitalCode(method, ref builder); + if (obsolete != null) + { + builder.AppendLine("#pragma warning disable CS0618"); } - builder.Append(" return "); + builder.AppendFormat(" => ", method.Name); builder.Append(method.GetFullName()); - builder.Append("(Context);"); - builder.AppendLine(); - builder.AppendLine(" }"); - builder.AppendLine("}"); - builder.AppendLine(); - builder.AppendLine(); + builder.AppendLine("(Context);"); + + if (obsolete != null) + { + builder.AppendLine("#pragma warning restore CS0618"); + } return builder.ToString(); } @@ -167,15 +146,14 @@ private static string GenerateCommonInitalCode(MethodInfo method, ref StringBuil var curPos = builder.Length; builder.Append("public "); builder.Append(GetReturnType(method)); - builder.Append(" "); + builder.Append(' '); builder.Append(method.Name); builder.AppendLine(); - hash = SHA256 - .ComputeHash(Encoding.UTF8.GetBytes(builder.ToString(curPos, builder.Length - curPos))) - .Aggregate(new StringBuilder(), - (sb, b) => sb.AppendFormat("{0:x2}", b), - sb => sb.ToString()); + hash = Convert.ToHexString( + SHA256 + .ComputeHash(Encoding.UTF8.GetBytes(builder.ToString(curPos, builder.Length - curPos)))); + return hash; } @@ -195,97 +173,59 @@ private static string GenerateCachedCode(MethodInfo method, out string hash) builder.Append(GetReturnType(method)); if (method.ReturnType.GetTypeInfo().IsValueType) { - builder.Append("?"); + builder.Append('?'); } builder.Append(" _"); builder.Append(method.Name); - builder.Append(";"); + builder.Append(';'); builder.AppendLine(); // Property if (obsolete != null) { - if (string.IsNullOrEmpty(obsolete.Message)) - { - builder.Append("[Obsolete]"); - } - else - { - builder.AppendFormat("[Obsolete(\"{0}\")]", obsolete.Message); - } - - builder.AppendLine(); + AddObsoleteAttribute(builder, obsolete); } hash = GenerateCommonInitalCode(method, ref builder); - builder.Append("{"); - builder.AppendLine(); - builder.AppendLine(" [System.Diagnostics.DebuggerStepThrough]"); - builder.AppendLine(" get"); - builder.Append(" {"); - builder.AppendLine(); - - // Property is obsolete? - if (obsolete != null) - { - var message = GetObsoleteMessage(method, obsolete); - builder.AppendLine(string.Format( - CultureInfo.InvariantCulture, - " Context.Log.Warning(\"Warning: {0}\");", message)); - } - - builder.AppendLine(string.Format( - CultureInfo.InvariantCulture, - " if (_{0}==null)", method.Name)); - - builder.Append(" {"); - builder.AppendLine(); if (obsolete != null) { builder.AppendLine("#pragma warning disable CS0618"); } - builder.AppendFormat(" _{0} = ", method.Name); + builder.AppendFormat(" => _{0} ??= ", method.Name); builder.Append(method.GetFullName()); - builder.Append("(Context);"); - builder.AppendLine(); + builder.AppendLine("(Context);"); if (obsolete != null) { builder.AppendLine("#pragma warning restore CS0618"); } - builder.Append(" }"); - builder.AppendLine(); - builder.AppendFormat(" return _{0}", method.Name); - if (method.ReturnType.GetTypeInfo().IsValueType) + return builder.ToString(); + } + + private static void AddObsoleteAttribute(StringBuilder builder, ObsoleteAttribute obsolete) + { + builder.Append("[Obsolete"); + + if (!string.IsNullOrEmpty(obsolete.Message)) { - builder.Append(".Value"); + builder.AppendFormat( + "(\"{0}\", {1})", + obsolete.Message, + obsolete.IsError ? "true" : "false"); } - builder.Append(";"); - builder.AppendLine(); - builder.Append(" }"); - builder.AppendLine(); - builder.Append("}"); - builder.AppendLine(); - builder.AppendLine(); - return builder.ToString(); + builder.AppendLine("]"); } private static string GetReturnType(MethodInfo method) { var isDynamic = method.ReturnTypeCustomAttributes.GetCustomAttributes(typeof(DynamicAttribute), true).Any(); - return isDynamic ? "dynamic" : method.ReturnType.GetFullName(); - } - - private static string GetObsoleteMessage(MethodInfo method, ObsoleteAttribute attribute) - { - const string format = "The alias {0} has been made obsolete. {1}"; - var message = string.Format( - CultureInfo.InvariantCulture, - format, method.Name, attribute.Message); - return message.Trim(); + var isNullable = method.ReturnTypeCustomAttributes.GetCustomAttributes(true).Any(attr => attr.GetType().FullName == "System.Runtime.CompilerServices.NullableAttribute"); + return string.Concat( + isDynamic ? "dynamic" : method.ReturnType.GetFullName(), + isNullable ? "?" : string.Empty); } } } \ No newline at end of file From d2b2cdc66c5ddc60207ee2297c5731b0c87d056c Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Sat, 18 Nov 2023 19:50:07 +0100 Subject: [PATCH 17/18] (GH-4268) Update GitReleaseManager.Tool to 0.16.0 * fixes #4268 --- build.cake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.cake b/build.cake index a74183d668..4871764dc1 100644 --- a/build.cake +++ b/build.cake @@ -3,7 +3,7 @@ // Install .NET Core Global tools. #tool "dotnet:https://api.nuget.org/v3/index.json?package=GitVersion.Tool&version=5.12.0" -#tool "dotnet:https://api.nuget.org/v3/index.json?package=GitReleaseManager.Tool&version=0.13.0" +#tool "dotnet:https://api.nuget.org/v3/index.json?package=GitReleaseManager.Tool&version=0.16.0" #tool "dotnet:https://api.nuget.org/v3/index.json?package=sign&version=0.9.1-beta.23530.1&prerelease" // Load other scripts. From 7e22cba8ff032cd68e155026b1b056f653ba8d93 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Sat, 18 Nov 2023 22:19:46 +0100 Subject: [PATCH 18/18] (build) Updated version and release notes --- ReleaseNotes.md | 11 +++++++++++ src/SolutionInfo.cs | 6 +++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 314cf10802..c9017d820a 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,3 +1,14 @@ +### New in 4.0.0 (Released 2023/11/18) + +* 4266 Update LatestPotentialBreakingChange to 4.0.0. +* 4132 Add File APIs for setting timestamps (creation time, last write time, last access time). +* 4250 Update System.Collections.Immutable to 8.0.0. +* 4260 Unzip alias should support overwrite files. +* 4251 Update System.Reflection.Metadata 8.0.0. +* 4249 Update Microsoft.Extensions.DependencyInjection to 8.0.0. +* 4197 Execution of Cake script fails if an addin defines an alias that uses nullable reference types in its signature. +* 4150 Cake script is contributing unactionable diagnostics in VS Code Problems pane. + ### New in 3.2.0 (Released 2023/11/10) * 4225 Add DotNetRemovePackage alias for dotnet remove package command. diff --git a/src/SolutionInfo.cs b/src/SolutionInfo.cs index aba1fbe686..20711806f7 100644 --- a/src/SolutionInfo.cs +++ b/src/SolutionInfo.cs @@ -10,7 +10,7 @@ using System.Reflection; [assembly: AssemblyProduct("Cake")] -[assembly: AssemblyVersion("3.2.0.0")] -[assembly: AssemblyFileVersion("3.2.0.0")] -[assembly: AssemblyInformationalVersion("3.2.0-beta.1+1.Branch.release-3.2.0.Sha.0ccf2b8235eea0282aac1f2690975e9d3dd4b71f")] +[assembly: AssemblyVersion("4.0.0.0")] +[assembly: AssemblyFileVersion("4.0.0.0")] +[assembly: AssemblyInformationalVersion("4.0.0-beta.1+0.Branch.release-4.0.0.Sha.b11eb5fc9f203608d32c280b5e2b914eea3df379")] [assembly: AssemblyCopyright("Copyright (c) .NET Foundation and Contributors")]