From 9275bbd5ab322b6ff081e7825e334a2c625366d7 Mon Sep 17 00:00:00 2001 From: Stuart Ferguson Date: Fri, 6 Jun 2025 20:38:45 +0100 Subject: [PATCH] Upgrade to .NET 9.0 and enhance GitHub Actions Updated GitHub Actions workflows to install .NET 9.0. Changed target framework from .NET 8.0 to .NET 9.0 in multiple project files. Updated package references to newer versions compatible with .NET 9.0, including `Lamar`, `MediatR`, and others. Modified Dockerfiles to use the .NET 9.0 SDK. Refactored test files for improved clarity and consistency. Enhanced error handling in test setup and teardown methods across feature files. --- .github/workflows/buildwindowsimage.yml | 5 ++ .github/workflows/createrelease.yml | 5 ++ .github/workflows/nightlybuild.yml | 5 ++ .github/workflows/pullrequest.yml | 5 ++ .github/workflows/pushtomaster.yml | 5 ++ ...ionProcessorACL.BusinessLogic.Tests.csproj | 12 ++-- ...ansactionProcessorACL.BusinessLogic.csproj | 6 +- ...ionProcessorACL.DataTransferObjects.csproj | 2 +- .../LogonTransaction.feature.cs | 64 +++++++++++------ .../Merchants/Merchants.feature.cs | 68 ++++++++++++------- .../Reconciliation/Reconciliation.feature.cs | 64 +++++++++++------ .../RedeemVoucher/RedeemVoucher.feature.cs | 64 +++++++++++------ .../SalesTransaction.feature.cs | 64 +++++++++++------ ...actionProcessorACL.IntegrationTests.csproj | 20 +++--- .../TransactionProcessorACL.Models.csproj | 2 +- .../TransactionProcessorACL.Testing.csproj | 2 +- .../TransactionProcessorACL.Tests.csproj | 10 +-- TransactionProcessorACL/Dockerfile | 2 +- TransactionProcessorACL/Dockerfilewindows | 2 +- .../TransactionProcessorACL.csproj | 44 ++++++------ 20 files changed, 288 insertions(+), 163 deletions(-) diff --git a/.github/workflows/buildwindowsimage.yml b/.github/workflows/buildwindowsimage.yml index 030a415..cda6084 100644 --- a/.github/workflows/buildwindowsimage.yml +++ b/.github/workflows/buildwindowsimage.yml @@ -15,6 +15,11 @@ jobs: steps: - uses: actions/checkout@v2.3.4 + - name: Install NET 9 + uses: actions/setup-dotnet@v4.0.1 + with: + dotnet-version: '9.0.x' + - name: Get the version id: get_version uses: battila7/get-version-action@v2 diff --git a/.github/workflows/createrelease.yml b/.github/workflows/createrelease.yml index 6ae1726..71f1681 100644 --- a/.github/workflows/createrelease.yml +++ b/.github/workflows/createrelease.yml @@ -15,6 +15,11 @@ jobs: steps: - uses: actions/checkout@v2.3.4 + - name: Install NET 9 + uses: actions/setup-dotnet@v4.0.1 + with: + dotnet-version: '9.0.x' + - name: Get the version id: get_version run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} diff --git a/.github/workflows/nightlybuild.yml b/.github/workflows/nightlybuild.yml index 3744c52..3fc64ce 100644 --- a/.github/workflows/nightlybuild.yml +++ b/.github/workflows/nightlybuild.yml @@ -16,6 +16,11 @@ jobs: steps: - uses: actions/checkout@v2.3.4 + - name: Install NET 9 + uses: actions/setup-dotnet@v4.0.1 + with: + dotnet-version: '9.0.x' + - name: Set Up Variables run: echo "action_url=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_ENV diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 813470e..cbf0297 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -16,6 +16,11 @@ jobs: steps: - uses: actions/checkout@v2.3.4 + - name: Install NET 9 + uses: actions/setup-dotnet@v4.0.1 + with: + dotnet-version: '9.0.x' + - name: Restore Nuget Packages run: dotnet restore TransactionProcessorACL.sln --source ${{ secrets.PUBLICFEEDURL }} --source ${{ secrets.PRIVATEFEED_URL }} diff --git a/.github/workflows/pushtomaster.yml b/.github/workflows/pushtomaster.yml index a49cb37..7f27641 100644 --- a/.github/workflows/pushtomaster.yml +++ b/.github/workflows/pushtomaster.yml @@ -18,6 +18,11 @@ jobs: - uses: actions/checkout@v2.3.4 with: fetch-depth: 0 + + - name: Install NET 9 + uses: actions/setup-dotnet@v4.0.1 + with: + dotnet-version: '9.0.x' - name: Restore Nuget Packages run: dotnet restore TransactionProcessorACL.sln --source ${{ secrets.PUBLICFEEDURL }} --source ${{ secrets.PRIVATEFEED_URL }} diff --git a/TransactionProcessorACL.BusinessLogic.Tests/TransactionProcessorACL.BusinessLogic.Tests.csproj b/TransactionProcessorACL.BusinessLogic.Tests/TransactionProcessorACL.BusinessLogic.Tests.csproj index 115f859..b478a52 100644 --- a/TransactionProcessorACL.BusinessLogic.Tests/TransactionProcessorACL.BusinessLogic.Tests.csproj +++ b/TransactionProcessorACL.BusinessLogic.Tests/TransactionProcessorACL.BusinessLogic.Tests.csproj @@ -1,22 +1,22 @@  - net8.0 + net9.0 None false - - - - + + + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/TransactionProcessorACL.BusinessLogic/TransactionProcessorACL.BusinessLogic.csproj b/TransactionProcessorACL.BusinessLogic/TransactionProcessorACL.BusinessLogic.csproj index cd92203..e57d447 100644 --- a/TransactionProcessorACL.BusinessLogic/TransactionProcessorACL.BusinessLogic.csproj +++ b/TransactionProcessorACL.BusinessLogic/TransactionProcessorACL.BusinessLogic.csproj @@ -1,13 +1,13 @@  - net8.0 + net9.0 - + - + diff --git a/TransactionProcessorACL.DataTransferObjects/TransactionProcessorACL.DataTransferObjects.csproj b/TransactionProcessorACL.DataTransferObjects/TransactionProcessorACL.DataTransferObjects.csproj index 93c8771..4625011 100644 --- a/TransactionProcessorACL.DataTransferObjects/TransactionProcessorACL.DataTransferObjects.csproj +++ b/TransactionProcessorACL.DataTransferObjects/TransactionProcessorACL.DataTransferObjects.csproj @@ -1,7 +1,7 @@  - net8.0;netstandard2.1 + net9.0 None diff --git a/TransactionProcessorACL.IntegrationTests/LogonTransaction/LogonTransaction.feature.cs b/TransactionProcessorACL.IntegrationTests/LogonTransaction/LogonTransaction.feature.cs index 2142f01..942c9b1 100644 --- a/TransactionProcessorACL.IntegrationTests/LogonTransaction/LogonTransaction.feature.cs +++ b/TransactionProcessorACL.IntegrationTests/LogonTransaction/LogonTransaction.feature.cs @@ -10,15 +10,13 @@ // ------------------------------------------------------------------------------ #region Designer generated code #pragma warning disable +using Reqnroll; namespace TransactionProcessorACL.IntegrationTests.LogonTransaction { - using Reqnroll; - using System; - using System.Linq; - [System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "2.0.0.0")] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "2.0.0.0")] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [NUnit.Framework.TestFixtureAttribute()] [NUnit.Framework.DescriptionAttribute("LogonTransaction")] [NUnit.Framework.FixtureLifeCycleAttribute(NUnit.Framework.LifeCycle.InstancePerTestCase)] @@ -33,41 +31,63 @@ public partial class LogonTransactionFeature "base", "shared"}; - private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "LogonTransaction", "LogonTransaction", null, global::Reqnroll.ProgrammingLanguage.CSharp, featureTags); + private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new global::System.Globalization.CultureInfo("en-US"), "LogonTransaction", "LogonTransaction", null, global::Reqnroll.ProgrammingLanguage.CSharp, featureTags); #line 1 "LogonTransaction.feature" #line hidden [NUnit.Framework.OneTimeSetUpAttribute()] - public static async System.Threading.Tasks.Task FeatureSetupAsync() + public static async global::System.Threading.Tasks.Task FeatureSetupAsync() { } [NUnit.Framework.OneTimeTearDownAttribute()] - public static async System.Threading.Tasks.Task FeatureTearDownAsync() + public static async global::System.Threading.Tasks.Task FeatureTearDownAsync() { } [NUnit.Framework.SetUpAttribute()] - public async System.Threading.Tasks.Task TestInitializeAsync() + public async global::System.Threading.Tasks.Task TestInitializeAsync() { testRunner = global::Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(featureHint: featureInfo); - if (((testRunner.FeatureContext != null) - && (testRunner.FeatureContext.FeatureInfo.Equals(featureInfo) == false))) + try { - await testRunner.OnFeatureEndAsync(); + if (((testRunner.FeatureContext != null) + && (testRunner.FeatureContext.FeatureInfo.Equals(featureInfo) == false))) + { + await testRunner.OnFeatureEndAsync(); + } } - if ((testRunner.FeatureContext == null)) + finally { - await testRunner.OnFeatureStartAsync(featureInfo); + if (((testRunner.FeatureContext != null) + && testRunner.FeatureContext.BeforeFeatureHookFailed)) + { + throw new global::Reqnroll.ReqnrollException("Scenario skipped because of previous before feature hook error"); + } + if ((testRunner.FeatureContext == null)) + { + await testRunner.OnFeatureStartAsync(featureInfo); + } } } [NUnit.Framework.TearDownAttribute()] - public async System.Threading.Tasks.Task TestTearDownAsync() + public async global::System.Threading.Tasks.Task TestTearDownAsync() { - await testRunner.OnScenarioEndAsync(); - global::Reqnroll.TestRunnerManager.ReleaseTestRunner(testRunner); + if ((testRunner == null)) + { + return; + } + try + { + await testRunner.OnScenarioEndAsync(); + } + finally + { + global::Reqnroll.TestRunnerManager.ReleaseTestRunner(testRunner); + testRunner = null; + } } public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo) @@ -76,17 +96,17 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo) testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); } - public async System.Threading.Tasks.Task ScenarioStartAsync() + public async global::System.Threading.Tasks.Task ScenarioStartAsync() { await testRunner.OnScenarioStartAsync(); } - public async System.Threading.Tasks.Task ScenarioCleanupAsync() + public async global::System.Threading.Tasks.Task ScenarioCleanupAsync() { await testRunner.CollectScenarioErrorsAsync(); } - public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() + public virtual async global::System.Threading.Tasks.Task FeatureBackgroundAsync() { #line 4 #line hidden @@ -313,11 +333,11 @@ await testRunner.GivenAsync("I have a token to access the estate management and [NUnit.Framework.TestAttribute()] [NUnit.Framework.DescriptionAttribute("Logon Transaction")] [NUnit.Framework.CategoryAttribute("PRTest")] - public async System.Threading.Tasks.Task LogonTransaction() + public async global::System.Threading.Tasks.Task LogonTransaction() { string[] tagsOfScenario = new string[] { "PRTest"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Logon Transaction", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 65 this.ScenarioInitialize(scenarioInfo); diff --git a/TransactionProcessorACL.IntegrationTests/Merchants/Merchants.feature.cs b/TransactionProcessorACL.IntegrationTests/Merchants/Merchants.feature.cs index d56702a..25745e0 100644 --- a/TransactionProcessorACL.IntegrationTests/Merchants/Merchants.feature.cs +++ b/TransactionProcessorACL.IntegrationTests/Merchants/Merchants.feature.cs @@ -10,15 +10,13 @@ // ------------------------------------------------------------------------------ #region Designer generated code #pragma warning disable +using Reqnroll; namespace TransactionProcessorACL.IntegrationTests.Merchants { - using Reqnroll; - using System; - using System.Linq; - [System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "2.0.0.0")] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "2.0.0.0")] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [NUnit.Framework.TestFixtureAttribute()] [NUnit.Framework.DescriptionAttribute("Merchants")] [NUnit.Framework.FixtureLifeCycleAttribute(NUnit.Framework.LifeCycle.InstancePerTestCase)] @@ -33,41 +31,63 @@ public partial class MerchantsFeature "base", "shared"}; - private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Merchants", "Merchants", null, global::Reqnroll.ProgrammingLanguage.CSharp, featureTags); + private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new global::System.Globalization.CultureInfo("en-US"), "Merchants", "Merchants", null, global::Reqnroll.ProgrammingLanguage.CSharp, featureTags); #line 1 "Merchants.feature" #line hidden [NUnit.Framework.OneTimeSetUpAttribute()] - public static async System.Threading.Tasks.Task FeatureSetupAsync() + public static async global::System.Threading.Tasks.Task FeatureSetupAsync() { } [NUnit.Framework.OneTimeTearDownAttribute()] - public static async System.Threading.Tasks.Task FeatureTearDownAsync() + public static async global::System.Threading.Tasks.Task FeatureTearDownAsync() { } [NUnit.Framework.SetUpAttribute()] - public async System.Threading.Tasks.Task TestInitializeAsync() + public async global::System.Threading.Tasks.Task TestInitializeAsync() { testRunner = global::Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(featureHint: featureInfo); - if (((testRunner.FeatureContext != null) - && (testRunner.FeatureContext.FeatureInfo.Equals(featureInfo) == false))) + try { - await testRunner.OnFeatureEndAsync(); + if (((testRunner.FeatureContext != null) + && (testRunner.FeatureContext.FeatureInfo.Equals(featureInfo) == false))) + { + await testRunner.OnFeatureEndAsync(); + } } - if ((testRunner.FeatureContext == null)) + finally { - await testRunner.OnFeatureStartAsync(featureInfo); + if (((testRunner.FeatureContext != null) + && testRunner.FeatureContext.BeforeFeatureHookFailed)) + { + throw new global::Reqnroll.ReqnrollException("Scenario skipped because of previous before feature hook error"); + } + if ((testRunner.FeatureContext == null)) + { + await testRunner.OnFeatureStartAsync(featureInfo); + } } } [NUnit.Framework.TearDownAttribute()] - public async System.Threading.Tasks.Task TestTearDownAsync() + public async global::System.Threading.Tasks.Task TestTearDownAsync() { - await testRunner.OnScenarioEndAsync(); - global::Reqnroll.TestRunnerManager.ReleaseTestRunner(testRunner); + if ((testRunner == null)) + { + return; + } + try + { + await testRunner.OnScenarioEndAsync(); + } + finally + { + global::Reqnroll.TestRunnerManager.ReleaseTestRunner(testRunner); + testRunner = null; + } } public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo) @@ -76,17 +96,17 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo) testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); } - public async System.Threading.Tasks.Task ScenarioStartAsync() + public async global::System.Threading.Tasks.Task ScenarioStartAsync() { await testRunner.OnScenarioStartAsync(); } - public async System.Threading.Tasks.Task ScenarioCleanupAsync() + public async global::System.Threading.Tasks.Task ScenarioCleanupAsync() { await testRunner.CollectScenarioErrorsAsync(); } - public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() + public virtual async global::System.Threading.Tasks.Task FeatureBackgroundAsync() { #line 4 #line hidden @@ -470,10 +490,10 @@ await testRunner.GivenAsync("I have a token to access the estate management and [NUnit.Framework.TestAttribute()] [NUnit.Framework.DescriptionAttribute("Get Merchant")] - public async System.Threading.Tasks.Task GetMerchant() + public async global::System.Threading.Tasks.Task GetMerchant() { string[] tagsOfScenario = ((string[])(null)); - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Get Merchant", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 100 this.ScenarioInitialize(scenarioInfo); @@ -519,10 +539,10 @@ public async System.Threading.Tasks.Task GetMerchant() [NUnit.Framework.TestAttribute()] [NUnit.Framework.DescriptionAttribute("Get Merchant Contracts")] - public async System.Threading.Tasks.Task GetMerchantContracts() + public async global::System.Threading.Tasks.Task GetMerchantContracts() { string[] tagsOfScenario = ((string[])(null)); - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Get Merchant Contracts", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 106 this.ScenarioInitialize(scenarioInfo); diff --git a/TransactionProcessorACL.IntegrationTests/Reconciliation/Reconciliation.feature.cs b/TransactionProcessorACL.IntegrationTests/Reconciliation/Reconciliation.feature.cs index 1f82c63..a63c0ed 100644 --- a/TransactionProcessorACL.IntegrationTests/Reconciliation/Reconciliation.feature.cs +++ b/TransactionProcessorACL.IntegrationTests/Reconciliation/Reconciliation.feature.cs @@ -10,15 +10,13 @@ // ------------------------------------------------------------------------------ #region Designer generated code #pragma warning disable +using Reqnroll; namespace TransactionProcessorACL.IntegrationTests.Reconciliation { - using Reqnroll; - using System; - using System.Linq; - [System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "2.0.0.0")] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "2.0.0.0")] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [NUnit.Framework.TestFixtureAttribute()] [NUnit.Framework.DescriptionAttribute("Reconciliation")] [NUnit.Framework.FixtureLifeCycleAttribute(NUnit.Framework.LifeCycle.InstancePerTestCase)] @@ -33,41 +31,63 @@ public partial class ReconciliationFeature "base", "shared"}; - private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Reconciliation", "Reconciliation", null, global::Reqnroll.ProgrammingLanguage.CSharp, featureTags); + private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new global::System.Globalization.CultureInfo("en-US"), "Reconciliation", "Reconciliation", null, global::Reqnroll.ProgrammingLanguage.CSharp, featureTags); #line 1 "Reconciliation.feature" #line hidden [NUnit.Framework.OneTimeSetUpAttribute()] - public static async System.Threading.Tasks.Task FeatureSetupAsync() + public static async global::System.Threading.Tasks.Task FeatureSetupAsync() { } [NUnit.Framework.OneTimeTearDownAttribute()] - public static async System.Threading.Tasks.Task FeatureTearDownAsync() + public static async global::System.Threading.Tasks.Task FeatureTearDownAsync() { } [NUnit.Framework.SetUpAttribute()] - public async System.Threading.Tasks.Task TestInitializeAsync() + public async global::System.Threading.Tasks.Task TestInitializeAsync() { testRunner = global::Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(featureHint: featureInfo); - if (((testRunner.FeatureContext != null) - && (testRunner.FeatureContext.FeatureInfo.Equals(featureInfo) == false))) + try { - await testRunner.OnFeatureEndAsync(); + if (((testRunner.FeatureContext != null) + && (testRunner.FeatureContext.FeatureInfo.Equals(featureInfo) == false))) + { + await testRunner.OnFeatureEndAsync(); + } } - if ((testRunner.FeatureContext == null)) + finally { - await testRunner.OnFeatureStartAsync(featureInfo); + if (((testRunner.FeatureContext != null) + && testRunner.FeatureContext.BeforeFeatureHookFailed)) + { + throw new global::Reqnroll.ReqnrollException("Scenario skipped because of previous before feature hook error"); + } + if ((testRunner.FeatureContext == null)) + { + await testRunner.OnFeatureStartAsync(featureInfo); + } } } [NUnit.Framework.TearDownAttribute()] - public async System.Threading.Tasks.Task TestTearDownAsync() + public async global::System.Threading.Tasks.Task TestTearDownAsync() { - await testRunner.OnScenarioEndAsync(); - global::Reqnroll.TestRunnerManager.ReleaseTestRunner(testRunner); + if ((testRunner == null)) + { + return; + } + try + { + await testRunner.OnScenarioEndAsync(); + } + finally + { + global::Reqnroll.TestRunnerManager.ReleaseTestRunner(testRunner); + testRunner = null; + } } public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo) @@ -76,17 +96,17 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo) testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); } - public async System.Threading.Tasks.Task ScenarioStartAsync() + public async global::System.Threading.Tasks.Task ScenarioStartAsync() { await testRunner.OnScenarioStartAsync(); } - public async System.Threading.Tasks.Task ScenarioCleanupAsync() + public async global::System.Threading.Tasks.Task ScenarioCleanupAsync() { await testRunner.CollectScenarioErrorsAsync(); } - public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() + public virtual async global::System.Threading.Tasks.Task FeatureBackgroundAsync() { #line 4 #line hidden @@ -447,11 +467,11 @@ await testRunner.GivenAsync("I have a token to access the estate management and [NUnit.Framework.TestAttribute()] [NUnit.Framework.DescriptionAttribute("Reconciliation Transaction")] [NUnit.Framework.CategoryAttribute("PRTest")] - public async System.Threading.Tasks.Task ReconciliationTransaction() + public async global::System.Threading.Tasks.Task ReconciliationTransaction() { string[] tagsOfScenario = new string[] { "PRTest"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Reconciliation Transaction", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 98 this.ScenarioInitialize(scenarioInfo); diff --git a/TransactionProcessorACL.IntegrationTests/RedeemVoucher/RedeemVoucher.feature.cs b/TransactionProcessorACL.IntegrationTests/RedeemVoucher/RedeemVoucher.feature.cs index e00b315..5a3ce4e 100644 --- a/TransactionProcessorACL.IntegrationTests/RedeemVoucher/RedeemVoucher.feature.cs +++ b/TransactionProcessorACL.IntegrationTests/RedeemVoucher/RedeemVoucher.feature.cs @@ -10,15 +10,13 @@ // ------------------------------------------------------------------------------ #region Designer generated code #pragma warning disable +using Reqnroll; namespace TransactionProcessorACL.IntegrationTests.RedeemVoucher { - using Reqnroll; - using System; - using System.Linq; - [System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "2.0.0.0")] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "2.0.0.0")] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [NUnit.Framework.TestFixtureAttribute()] [NUnit.Framework.DescriptionAttribute("RedeemVoucher")] [NUnit.Framework.FixtureLifeCycleAttribute(NUnit.Framework.LifeCycle.InstancePerTestCase)] @@ -33,41 +31,63 @@ public partial class RedeemVoucherFeature "base", "shared"}; - private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "RedeemVoucher", "RedeemVoucher", null, global::Reqnroll.ProgrammingLanguage.CSharp, featureTags); + private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new global::System.Globalization.CultureInfo("en-US"), "RedeemVoucher", "RedeemVoucher", null, global::Reqnroll.ProgrammingLanguage.CSharp, featureTags); #line 1 "RedeemVoucher.feature" #line hidden [NUnit.Framework.OneTimeSetUpAttribute()] - public static async System.Threading.Tasks.Task FeatureSetupAsync() + public static async global::System.Threading.Tasks.Task FeatureSetupAsync() { } [NUnit.Framework.OneTimeTearDownAttribute()] - public static async System.Threading.Tasks.Task FeatureTearDownAsync() + public static async global::System.Threading.Tasks.Task FeatureTearDownAsync() { } [NUnit.Framework.SetUpAttribute()] - public async System.Threading.Tasks.Task TestInitializeAsync() + public async global::System.Threading.Tasks.Task TestInitializeAsync() { testRunner = global::Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(featureHint: featureInfo); - if (((testRunner.FeatureContext != null) - && (testRunner.FeatureContext.FeatureInfo.Equals(featureInfo) == false))) + try { - await testRunner.OnFeatureEndAsync(); + if (((testRunner.FeatureContext != null) + && (testRunner.FeatureContext.FeatureInfo.Equals(featureInfo) == false))) + { + await testRunner.OnFeatureEndAsync(); + } } - if ((testRunner.FeatureContext == null)) + finally { - await testRunner.OnFeatureStartAsync(featureInfo); + if (((testRunner.FeatureContext != null) + && testRunner.FeatureContext.BeforeFeatureHookFailed)) + { + throw new global::Reqnroll.ReqnrollException("Scenario skipped because of previous before feature hook error"); + } + if ((testRunner.FeatureContext == null)) + { + await testRunner.OnFeatureStartAsync(featureInfo); + } } } [NUnit.Framework.TearDownAttribute()] - public async System.Threading.Tasks.Task TestTearDownAsync() + public async global::System.Threading.Tasks.Task TestTearDownAsync() { - await testRunner.OnScenarioEndAsync(); - global::Reqnroll.TestRunnerManager.ReleaseTestRunner(testRunner); + if ((testRunner == null)) + { + return; + } + try + { + await testRunner.OnScenarioEndAsync(); + } + finally + { + global::Reqnroll.TestRunnerManager.ReleaseTestRunner(testRunner); + testRunner = null; + } } public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo) @@ -76,17 +96,17 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo) testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); } - public async System.Threading.Tasks.Task ScenarioStartAsync() + public async global::System.Threading.Tasks.Task ScenarioStartAsync() { await testRunner.OnScenarioStartAsync(); } - public async System.Threading.Tasks.Task ScenarioCleanupAsync() + public async global::System.Threading.Tasks.Task ScenarioCleanupAsync() { await testRunner.CollectScenarioErrorsAsync(); } - public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() + public virtual async global::System.Threading.Tasks.Task FeatureBackgroundAsync() { #line 4 #line hidden @@ -518,11 +538,11 @@ await testRunner.GivenAsync("I have a token to access the estate management and [NUnit.Framework.TestAttribute()] [NUnit.Framework.DescriptionAttribute("Redeem Vouchers")] [NUnit.Framework.CategoryAttribute("PRTest")] - public async System.Threading.Tasks.Task RedeemVouchers() + public async global::System.Threading.Tasks.Task RedeemVouchers() { string[] tagsOfScenario = new string[] { "PRTest"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Redeem Vouchers", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 108 this.ScenarioInitialize(scenarioInfo); diff --git a/TransactionProcessorACL.IntegrationTests/SaleTransaction/SalesTransaction.feature.cs b/TransactionProcessorACL.IntegrationTests/SaleTransaction/SalesTransaction.feature.cs index 601a4a9..f2ba6e1 100644 --- a/TransactionProcessorACL.IntegrationTests/SaleTransaction/SalesTransaction.feature.cs +++ b/TransactionProcessorACL.IntegrationTests/SaleTransaction/SalesTransaction.feature.cs @@ -10,15 +10,13 @@ // ------------------------------------------------------------------------------ #region Designer generated code #pragma warning disable +using Reqnroll; namespace TransactionProcessorACL.IntegrationTests.SaleTransaction { - using Reqnroll; - using System; - using System.Linq; - [System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "2.0.0.0")] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "2.0.0.0")] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [NUnit.Framework.TestFixtureAttribute()] [NUnit.Framework.DescriptionAttribute("SalesTransaction")] [NUnit.Framework.FixtureLifeCycleAttribute(NUnit.Framework.LifeCycle.InstancePerTestCase)] @@ -33,41 +31,63 @@ public partial class SalesTransactionFeature "base", "shared"}; - private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "SaleTransaction", "SalesTransaction", null, global::Reqnroll.ProgrammingLanguage.CSharp, featureTags); + private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new global::System.Globalization.CultureInfo("en-US"), "SaleTransaction", "SalesTransaction", null, global::Reqnroll.ProgrammingLanguage.CSharp, featureTags); #line 1 "SalesTransaction.feature" #line hidden [NUnit.Framework.OneTimeSetUpAttribute()] - public static async System.Threading.Tasks.Task FeatureSetupAsync() + public static async global::System.Threading.Tasks.Task FeatureSetupAsync() { } [NUnit.Framework.OneTimeTearDownAttribute()] - public static async System.Threading.Tasks.Task FeatureTearDownAsync() + public static async global::System.Threading.Tasks.Task FeatureTearDownAsync() { } [NUnit.Framework.SetUpAttribute()] - public async System.Threading.Tasks.Task TestInitializeAsync() + public async global::System.Threading.Tasks.Task TestInitializeAsync() { testRunner = global::Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(featureHint: featureInfo); - if (((testRunner.FeatureContext != null) - && (testRunner.FeatureContext.FeatureInfo.Equals(featureInfo) == false))) + try { - await testRunner.OnFeatureEndAsync(); + if (((testRunner.FeatureContext != null) + && (testRunner.FeatureContext.FeatureInfo.Equals(featureInfo) == false))) + { + await testRunner.OnFeatureEndAsync(); + } } - if ((testRunner.FeatureContext == null)) + finally { - await testRunner.OnFeatureStartAsync(featureInfo); + if (((testRunner.FeatureContext != null) + && testRunner.FeatureContext.BeforeFeatureHookFailed)) + { + throw new global::Reqnroll.ReqnrollException("Scenario skipped because of previous before feature hook error"); + } + if ((testRunner.FeatureContext == null)) + { + await testRunner.OnFeatureStartAsync(featureInfo); + } } } [NUnit.Framework.TearDownAttribute()] - public async System.Threading.Tasks.Task TestTearDownAsync() + public async global::System.Threading.Tasks.Task TestTearDownAsync() { - await testRunner.OnScenarioEndAsync(); - global::Reqnroll.TestRunnerManager.ReleaseTestRunner(testRunner); + if ((testRunner == null)) + { + return; + } + try + { + await testRunner.OnScenarioEndAsync(); + } + finally + { + global::Reqnroll.TestRunnerManager.ReleaseTestRunner(testRunner); + testRunner = null; + } } public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo) @@ -76,17 +96,17 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo) testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); } - public async System.Threading.Tasks.Task ScenarioStartAsync() + public async global::System.Threading.Tasks.Task ScenarioStartAsync() { await testRunner.OnScenarioStartAsync(); } - public async System.Threading.Tasks.Task ScenarioCleanupAsync() + public async global::System.Threading.Tasks.Task ScenarioCleanupAsync() { await testRunner.CollectScenarioErrorsAsync(); } - public virtual async System.Threading.Tasks.Task FeatureBackgroundAsync() + public virtual async global::System.Threading.Tasks.Task FeatureBackgroundAsync() { #line 4 #line hidden @@ -527,11 +547,11 @@ await testRunner.GivenAsync("I have a token to access the estate management and [NUnit.Framework.TestAttribute()] [NUnit.Framework.DescriptionAttribute("Sale Transaction")] [NUnit.Framework.CategoryAttribute("PRTest")] - public async System.Threading.Tasks.Task SaleTransaction() + public async global::System.Threading.Tasks.Task SaleTransaction() { string[] tagsOfScenario = new string[] { "PRTest"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Sale Transaction", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 114 this.ScenarioInitialize(scenarioInfo); diff --git a/TransactionProcessorACL.IntegrationTests/TransactionProcessorACL.IntegrationTests.csproj b/TransactionProcessorACL.IntegrationTests/TransactionProcessorACL.IntegrationTests.csproj index 4db63de..cc8bfc9 100644 --- a/TransactionProcessorACL.IntegrationTests/TransactionProcessorACL.IntegrationTests.csproj +++ b/TransactionProcessorACL.IntegrationTests/TransactionProcessorACL.IntegrationTests.csproj @@ -1,27 +1,27 @@  - net8.0 + net9.0 Full false - + - - - - - + + + + + - - + + - + diff --git a/TransactionProcessorACL.Models/TransactionProcessorACL.Models.csproj b/TransactionProcessorACL.Models/TransactionProcessorACL.Models.csproj index 1406d20..eb06d46 100644 --- a/TransactionProcessorACL.Models/TransactionProcessorACL.Models.csproj +++ b/TransactionProcessorACL.Models/TransactionProcessorACL.Models.csproj @@ -1,7 +1,7 @@ - net8.0 + net9.0 None diff --git a/TransactionProcessorACL.Testing/TransactionProcessorACL.Testing.csproj b/TransactionProcessorACL.Testing/TransactionProcessorACL.Testing.csproj index 54f6bc9..052d3e2 100644 --- a/TransactionProcessorACL.Testing/TransactionProcessorACL.Testing.csproj +++ b/TransactionProcessorACL.Testing/TransactionProcessorACL.Testing.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 None diff --git a/TransactionProcessorACL.Tests/TransactionProcessorACL.Tests.csproj b/TransactionProcessorACL.Tests/TransactionProcessorACL.Tests.csproj index 9bf1ad4..c00c7af 100644 --- a/TransactionProcessorACL.Tests/TransactionProcessorACL.Tests.csproj +++ b/TransactionProcessorACL.Tests/TransactionProcessorACL.Tests.csproj @@ -1,21 +1,21 @@  - net8.0 + net9.0 None false - - - + + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/TransactionProcessorACL/Dockerfile b/TransactionProcessorACL/Dockerfile index fc978cf..620d6c4 100644 --- a/TransactionProcessorACL/Dockerfile +++ b/TransactionProcessorACL/Dockerfile @@ -1,7 +1,7 @@ FROM stuartferguson/txnprocbase:latest AS base WORKDIR /app -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build WORKDIR /src COPY ["TransactionProcessorACL/NuGet.Config", "."] COPY ["TransactionProcessorACL/TransactionProcessorACL.csproj", "TransactionProcessorACL/"] diff --git a/TransactionProcessorACL/Dockerfilewindows b/TransactionProcessorACL/Dockerfilewindows index d568b6f..33afa2e 100644 --- a/TransactionProcessorACL/Dockerfilewindows +++ b/TransactionProcessorACL/Dockerfilewindows @@ -2,7 +2,7 @@ FROM stuartferguson/txnprocbasewindows AS base USER ContainerAdministrator WORKDIR /app -FROM mcr.microsoft.com/dotnet/sdk:8.0-windowsservercore-ltsc2022 AS build +FROM mcr.microsoft.com/dotnet/sdk:9.0-windowsservercore-ltsc2022 AS build WORKDIR /src COPY ["TransactionProcessorACL/NuGet.Config", "."] COPY ["TransactionProcessorACL/TransactionProcessorACL.csproj", "TransactionProcessorACL/"] diff --git a/TransactionProcessorACL/TransactionProcessorACL.csproj b/TransactionProcessorACL/TransactionProcessorACL.csproj index 97bf2b1..3e62715 100644 --- a/TransactionProcessorACL/TransactionProcessorACL.csproj +++ b/TransactionProcessorACL/TransactionProcessorACL.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 Linux transactionprocessoracl:latest @@ -11,30 +11,30 @@ - - - - - - + + + + + + - - - - + + + + - + - - - - - - - - - - + + + + + + + + + +