From a7ab9d2515f7bbd2836cb41685c2b6bfaee96676 Mon Sep 17 00:00:00 2001 From: Stuart Ferguson Date: Thu, 21 Jan 2021 08:02:28 +0000 Subject: [PATCH] Net 5 Upgrade complete --- ...gement - Backup.BusinessLogic.Tests.csproj | 34 ++++++++++ ...stateManagement.BusinessLogic.Tests.csproj | 14 ++-- .../ModelFactoryTests.cs | 7 +- .../EstateManagement.BusinessLogic.csproj | 8 +-- .../EstateManagement.Client.csproj | 4 +- ...ateManagement.Contract.DomainEvents.csproj | 4 +- ...eManagement.ContractAggregate.Tests.csproj | 10 +-- .../EstateManagement.ContractAggregate.csproj | 6 +- ...stateManagement.DataTransferObjects.csproj | 4 +- ...stateManagement.Estate.DomainEvents.csproj | 4 +- ...ateManagement.EstateAggregate.Tests.csproj | 12 ++-- .../EstateManagement.EstateAggregate.csproj | 6 +- .../Common/DockerHelper.cs | 4 +- .../Contract/Contract.feature.cs | 10 +-- .../Estate/Estate.feature.cs | 10 +-- ...ement - Backup (1).IntegrationTests.csproj | 68 +++++++++++++++++++ ...anagement - Backup.IntegrationTests.csproj | 68 +++++++++++++++++++ .../EstateManagement.IntegrationTests.csproj | 34 +++++----- .../Merchant/Merchant.feature.cs | 10 +-- ...ateManagement.Merchant.DomainEvents.csproj | 4 +- ...eManagement.MerchantAggregate.Tests.csproj | 10 +-- .../EstateManagement.MerchantAggregate.csproj | 4 +- .../EstateManagement.Models.csproj | 4 +- .../EstateManagement.Repository.Tests.csproj | 16 ++--- .../EstateManagementRepositoryTests.cs | 32 +++++---- .../EstateManagement.Repository.csproj | 4 +- .../EstateManagementRepository.cs | 13 ++-- .../EstateManagement.Testing.csproj | 4 +- EstateManagement.Testing/TestData.cs | 9 +-- .../EstateManagement.Tests.csproj | 14 ++-- EstateManagement/Dockerfile | 4 +- EstateManagement/Dockerfilewindows | 4 +- .../EstateManagement - Backup (1).csproj | 50 ++++++++++++++ .../EstateManagement - Backup.csproj | 50 ++++++++++++++ EstateManagement/EstateManagement.csproj | 47 +++++++------ 35 files changed, 436 insertions(+), 150 deletions(-) create mode 100644 EstateManagement.BusinessLogic.Tests/EstateManagement - Backup.BusinessLogic.Tests.csproj create mode 100644 EstateManagement.IntegrationTests/EstateManagement - Backup (1).IntegrationTests.csproj create mode 100644 EstateManagement.IntegrationTests/EstateManagement - Backup.IntegrationTests.csproj create mode 100644 EstateManagement/EstateManagement - Backup (1).csproj create mode 100644 EstateManagement/EstateManagement - Backup.csproj diff --git a/EstateManagement.BusinessLogic.Tests/EstateManagement - Backup.BusinessLogic.Tests.csproj b/EstateManagement.BusinessLogic.Tests/EstateManagement - Backup.BusinessLogic.Tests.csproj new file mode 100644 index 00000000..ba56cc60 --- /dev/null +++ b/EstateManagement.BusinessLogic.Tests/EstateManagement - Backup.BusinessLogic.Tests.csproj @@ -0,0 +1,34 @@ + + + + net5.0 + None + false + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + diff --git a/EstateManagement.BusinessLogic.Tests/EstateManagement.BusinessLogic.Tests.csproj b/EstateManagement.BusinessLogic.Tests/EstateManagement.BusinessLogic.Tests.csproj index 010dc546..ea4de8bc 100644 --- a/EstateManagement.BusinessLogic.Tests/EstateManagement.BusinessLogic.Tests.csproj +++ b/EstateManagement.BusinessLogic.Tests/EstateManagement.BusinessLogic.Tests.csproj @@ -1,22 +1,22 @@  - netcoreapp3.1 + net5.0 None false - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - + + + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/EstateManagement.BusinessLogic.Tests/ModelFactoryTests.cs b/EstateManagement.BusinessLogic.Tests/ModelFactoryTests.cs index cf768eba..9d4aedff 100644 --- a/EstateManagement.BusinessLogic.Tests/ModelFactoryTests.cs +++ b/EstateManagement.BusinessLogic.Tests/ModelFactoryTests.cs @@ -10,6 +10,7 @@ using ContractEntity = EstateReporting.Database.Entities.Contract; using ContractProductEntity = EstateReporting.Database.Entities.ContractProduct; using ContractProductTransactionFeeEntity = EstateReporting.Database.Entities.ContractProductTransactionFee; +using ContractProductTransactionFeeModel = EstateManagement.Models.Contract.TransactionFee; using MerchantEntity = EstateReporting.Database.Entities.Merchant; using MerchantAddressEntity = EstateReporting.Database.Entities.MerchantAddress; @@ -602,12 +603,12 @@ public void ContractEntities_ContractProductTransactionFee_ConvertFrom_Transacti }; ModelFactory modelFactory = new ModelFactory(); - List transactionFeesModelList = modelFactory.ConvertFrom(contractProductsTransactionFees); + List transactionFeesModelList = modelFactory.ConvertFrom(contractProductsTransactionFees); transactionFeesModelList.ShouldNotBeNull(); transactionFeesModelList.ShouldHaveSingleItem(); - TransactionFee contractProductTransactionFee = transactionFeesModelList.Single(); + ContractProductTransactionFeeModel contractProductTransactionFee = transactionFeesModelList.Single(); ContractProductTransactionFee expectedContractProductTransactionFee = contractProductsTransactionFees.Single(); contractProductTransactionFee.TransactionFeeId.ShouldBe(expectedContractProductTransactionFee.TransactionFeeId); contractProductTransactionFee.Description.ShouldBe(expectedContractProductTransactionFee.Description); @@ -649,7 +650,7 @@ public void ContractEntities_ConvertFrom_ContractConverted() contractProduct.TransactionFees.ShouldNotBeNull(); contractProduct.TransactionFees.ShouldHaveSingleItem(); - TransactionFee contractProductTransactionFee = contractProduct.TransactionFees.Single(); + ContractProductTransactionFeeModel contractProductTransactionFee = contractProduct.TransactionFees.Single(); ContractProductTransactionFee expectedContractProductTransactionFee = contractProductsTransactionFees.Single(); contractProductTransactionFee.TransactionFeeId.ShouldBe(expectedContractProductTransactionFee.TransactionFeeId); contractProductTransactionFee.Description.ShouldBe(expectedContractProductTransactionFee.Description); diff --git a/EstateManagement.BusinessLogic/EstateManagement.BusinessLogic.csproj b/EstateManagement.BusinessLogic/EstateManagement.BusinessLogic.csproj index 997fa9a5..b64e60dd 100644 --- a/EstateManagement.BusinessLogic/EstateManagement.BusinessLogic.csproj +++ b/EstateManagement.BusinessLogic/EstateManagement.BusinessLogic.csproj @@ -1,13 +1,13 @@  - netcoreapp3.1 + net5.0 - - - + + + diff --git a/EstateManagement.Client/EstateManagement.Client.csproj b/EstateManagement.Client/EstateManagement.Client.csproj index eeb4d6f8..b7c54aa1 100644 --- a/EstateManagement.Client/EstateManagement.Client.csproj +++ b/EstateManagement.Client/EstateManagement.Client.csproj @@ -1,13 +1,13 @@  - netstandard2.0 + net5.0 $(TargetsForTfmSpecificBuildOutput);IncludeP2PAssets true - + diff --git a/EstateManagement.Contract.DomainEvents/EstateManagement.Contract.DomainEvents.csproj b/EstateManagement.Contract.DomainEvents/EstateManagement.Contract.DomainEvents.csproj index 9235b905..26a84e8c 100644 --- a/EstateManagement.Contract.DomainEvents/EstateManagement.Contract.DomainEvents.csproj +++ b/EstateManagement.Contract.DomainEvents/EstateManagement.Contract.DomainEvents.csproj @@ -1,11 +1,11 @@ - netstandard2.1 + net5.0 - + diff --git a/EstateManagement.ContractAggregate.Tests/EstateManagement.ContractAggregate.Tests.csproj b/EstateManagement.ContractAggregate.Tests/EstateManagement.ContractAggregate.Tests.csproj index 97cd8a48..03118b11 100644 --- a/EstateManagement.ContractAggregate.Tests/EstateManagement.ContractAggregate.Tests.csproj +++ b/EstateManagement.ContractAggregate.Tests/EstateManagement.ContractAggregate.Tests.csproj @@ -1,20 +1,20 @@ - netcoreapp3.1 + net5.0 None false - - + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/EstateManagement.ContractAggregate/EstateManagement.ContractAggregate.csproj b/EstateManagement.ContractAggregate/EstateManagement.ContractAggregate.csproj index 2d00bffa..5da795c9 100644 --- a/EstateManagement.ContractAggregate/EstateManagement.ContractAggregate.csproj +++ b/EstateManagement.ContractAggregate/EstateManagement.ContractAggregate.csproj @@ -1,12 +1,12 @@ - netcoreapp3.1 + net5.0 - - + + diff --git a/EstateManagement.DataTransferObjects/EstateManagement.DataTransferObjects.csproj b/EstateManagement.DataTransferObjects/EstateManagement.DataTransferObjects.csproj index 04afea60..65bed7c7 100644 --- a/EstateManagement.DataTransferObjects/EstateManagement.DataTransferObjects.csproj +++ b/EstateManagement.DataTransferObjects/EstateManagement.DataTransferObjects.csproj @@ -1,13 +1,13 @@  - netstandard2.0 + net5.0 None - + diff --git a/EstateManagement.Estate.DomainEvents/EstateManagement.Estate.DomainEvents.csproj b/EstateManagement.Estate.DomainEvents/EstateManagement.Estate.DomainEvents.csproj index eab69395..52baaefa 100644 --- a/EstateManagement.Estate.DomainEvents/EstateManagement.Estate.DomainEvents.csproj +++ b/EstateManagement.Estate.DomainEvents/EstateManagement.Estate.DomainEvents.csproj @@ -1,10 +1,10 @@  - netstandard2.1 + net5.0 - + diff --git a/EstateManagement.EstateAggregate.Tests/EstateManagement.EstateAggregate.Tests.csproj b/EstateManagement.EstateAggregate.Tests/EstateManagement.EstateAggregate.Tests.csproj index 64ed6efa..b1029508 100644 --- a/EstateManagement.EstateAggregate.Tests/EstateManagement.EstateAggregate.Tests.csproj +++ b/EstateManagement.EstateAggregate.Tests/EstateManagement.EstateAggregate.Tests.csproj @@ -1,21 +1,21 @@  - netcoreapp3.1 + net5.0 None false - - - + + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/EstateManagement.EstateAggregate/EstateManagement.EstateAggregate.csproj b/EstateManagement.EstateAggregate/EstateManagement.EstateAggregate.csproj index f5aab9ab..bd834057 100644 --- a/EstateManagement.EstateAggregate/EstateManagement.EstateAggregate.csproj +++ b/EstateManagement.EstateAggregate/EstateManagement.EstateAggregate.csproj @@ -1,12 +1,12 @@  - netcoreapp3.1 + net5.0 - - + + diff --git a/EstateManagement.IntegrationTests/Common/DockerHelper.cs b/EstateManagement.IntegrationTests/Common/DockerHelper.cs index c5703427..c25dcfb5 100644 --- a/EstateManagement.IntegrationTests/Common/DockerHelper.cs +++ b/EstateManagement.IntegrationTests/Common/DockerHelper.cs @@ -241,7 +241,7 @@ public override async Task StopContainersForScenarioRun() await RemoveEstateReadModel().ConfigureAwait(false); - if (EnumerableExtensions.Any(this.Containers)) + if (this.Containers.Any()) { foreach (IContainerService containerService in this.Containers) { @@ -251,7 +251,7 @@ public override async Task StopContainersForScenarioRun() } } - if (EnumerableExtensions.Any(this.TestNetworks)) + if (this.TestNetworks.Any()) { foreach (INetworkService networkService in this.TestNetworks) { diff --git a/EstateManagement.IntegrationTests/Contract/Contract.feature.cs b/EstateManagement.IntegrationTests/Contract/Contract.feature.cs index a4403e7f..786b5fe4 100644 --- a/EstateManagement.IntegrationTests/Contract/Contract.feature.cs +++ b/EstateManagement.IntegrationTests/Contract/Contract.feature.cs @@ -1,8 +1,8 @@ // ------------------------------------------------------------------------------ // // This code was generated by SpecFlow (https://www.specflow.org/). -// SpecFlow Version:3.3.0.0 -// SpecFlow Generator Version:3.1.0.0 +// SpecFlow Version:3.5.0.0 +// SpecFlow Generator Version:3.5.0.0 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -17,7 +17,7 @@ namespace EstateManagement.IntegrationTests.Contract using System.Linq; - [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.3.0.0")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.5.0.0")] [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [Xunit.TraitAttribute("Category", "base")] [Xunit.TraitAttribute("Category", "shared")] @@ -44,7 +44,7 @@ public ContractFeature(ContractFeature.FixtureData fixtureData, EstateManagement public static void FeatureSetup() { testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Contract", null, ProgrammingLanguage.CSharp, new string[] { + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Contract", "Contract", null, ProgrammingLanguage.CSharp, new string[] { "base", "shared"}); testRunner.OnFeatureStart(featureInfo); @@ -906,7 +906,7 @@ public virtual void GetEstateContracts() this.ScenarioCleanup(); } - [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.3.0.0")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.5.0.0")] [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class FixtureData : System.IDisposable { diff --git a/EstateManagement.IntegrationTests/Estate/Estate.feature.cs b/EstateManagement.IntegrationTests/Estate/Estate.feature.cs index 00e9fe0e..8cf4b8f9 100644 --- a/EstateManagement.IntegrationTests/Estate/Estate.feature.cs +++ b/EstateManagement.IntegrationTests/Estate/Estate.feature.cs @@ -1,8 +1,8 @@ // ------------------------------------------------------------------------------ // // This code was generated by SpecFlow (https://www.specflow.org/). -// SpecFlow Version:3.3.0.0 -// SpecFlow Generator Version:3.1.0.0 +// SpecFlow Version:3.5.0.0 +// SpecFlow Generator Version:3.5.0.0 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -17,7 +17,7 @@ namespace EstateManagement.IntegrationTests.Estate using System.Linq; - [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.3.0.0")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.5.0.0")] [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [Xunit.TraitAttribute("Category", "base")] [Xunit.TraitAttribute("Category", "shared")] @@ -44,7 +44,7 @@ public EstateFeature(EstateFeature.FixtureData fixtureData, EstateManagement_Int public static void FeatureSetup() { testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Estate", null, ProgrammingLanguage.CSharp, new string[] { + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Estate", "Estate", null, ProgrammingLanguage.CSharp, new string[] { "base", "shared"}); testRunner.OnFeatureStart(featureInfo); @@ -640,7 +640,7 @@ public virtual void GetInvalidEstate_EstateUser() this.ScenarioCleanup(); } - [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.3.0.0")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.5.0.0")] [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class FixtureData : System.IDisposable { diff --git a/EstateManagement.IntegrationTests/EstateManagement - Backup (1).IntegrationTests.csproj b/EstateManagement.IntegrationTests/EstateManagement - Backup (1).IntegrationTests.csproj new file mode 100644 index 00000000..42d1a820 --- /dev/null +++ b/EstateManagement.IntegrationTests/EstateManagement - Backup (1).IntegrationTests.csproj @@ -0,0 +1,68 @@ + + + + net5.0 + + false + + + + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + True + + + + + + Always + + + Never + + + + + + SpecFlowSingleFileGenerator + Contract.feature.cs + + + SpecFlowSingleFileGenerator + Merchant.feature.cs + + + + + diff --git a/EstateManagement.IntegrationTests/EstateManagement - Backup.IntegrationTests.csproj b/EstateManagement.IntegrationTests/EstateManagement - Backup.IntegrationTests.csproj new file mode 100644 index 00000000..a1984b3d --- /dev/null +++ b/EstateManagement.IntegrationTests/EstateManagement - Backup.IntegrationTests.csproj @@ -0,0 +1,68 @@ + + + + net5.0 + + false + + + + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + True + + + + + + Always + + + Never + + + + + + SpecFlowSingleFileGenerator + Contract.feature.cs + + + SpecFlowSingleFileGenerator + Merchant.feature.cs + + + + + diff --git a/EstateManagement.IntegrationTests/EstateManagement.IntegrationTests.csproj b/EstateManagement.IntegrationTests/EstateManagement.IntegrationTests.csproj index 2c0c345a..69339158 100644 --- a/EstateManagement.IntegrationTests/EstateManagement.IntegrationTests.csproj +++ b/EstateManagement.IntegrationTests/EstateManagement.IntegrationTests.csproj @@ -1,33 +1,33 @@  - netcoreapp3.1 + net5.0 false - + - - - - - - - - - - - - - + + + + + + + + + + + + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/EstateManagement.IntegrationTests/Merchant/Merchant.feature.cs b/EstateManagement.IntegrationTests/Merchant/Merchant.feature.cs index 6e0bda8d..5bcc42ff 100644 --- a/EstateManagement.IntegrationTests/Merchant/Merchant.feature.cs +++ b/EstateManagement.IntegrationTests/Merchant/Merchant.feature.cs @@ -1,8 +1,8 @@ // ------------------------------------------------------------------------------ // // This code was generated by SpecFlow (https://www.specflow.org/). -// SpecFlow Version:3.3.0.0 -// SpecFlow Generator Version:3.1.0.0 +// SpecFlow Version:3.5.0.0 +// SpecFlow Generator Version:3.5.0.0 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -17,7 +17,7 @@ namespace EstateManagement.IntegrationTests.Merchant using System.Linq; - [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.3.0.0")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.5.0.0")] [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [Xunit.TraitAttribute("Category", "base")] [Xunit.TraitAttribute("Category", "shared")] @@ -44,7 +44,7 @@ public MerchantFeature(MerchantFeature.FixtureData fixtureData, EstateManagement public static void FeatureSetup() { testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Merchant", null, ProgrammingLanguage.CSharp, new string[] { + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Merchant", "Merchant", null, ProgrammingLanguage.CSharp, new string[] { "base", "shared"}); testRunner.OnFeatureStart(featureInfo); @@ -1350,7 +1350,7 @@ public virtual void GetMerchantsForEstate_EstateLogin() this.ScenarioCleanup(); } - [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.3.0.0")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.5.0.0")] [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class FixtureData : System.IDisposable { diff --git a/EstateManagement.Merchant.DomainEvents/EstateManagement.Merchant.DomainEvents.csproj b/EstateManagement.Merchant.DomainEvents/EstateManagement.Merchant.DomainEvents.csproj index 482003eb..8fe400e5 100644 --- a/EstateManagement.Merchant.DomainEvents/EstateManagement.Merchant.DomainEvents.csproj +++ b/EstateManagement.Merchant.DomainEvents/EstateManagement.Merchant.DomainEvents.csproj @@ -1,11 +1,11 @@  - netstandard2.1 + net5.0 - + diff --git a/EstateManagement.MerchantAggregate.Tests/EstateManagement.MerchantAggregate.Tests.csproj b/EstateManagement.MerchantAggregate.Tests/EstateManagement.MerchantAggregate.Tests.csproj index 99e47849..47bd05d9 100644 --- a/EstateManagement.MerchantAggregate.Tests/EstateManagement.MerchantAggregate.Tests.csproj +++ b/EstateManagement.MerchantAggregate.Tests/EstateManagement.MerchantAggregate.Tests.csproj @@ -1,20 +1,20 @@  - netcoreapp3.1 + net5.0 None false - - + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/EstateManagement.MerchantAggregate/EstateManagement.MerchantAggregate.csproj b/EstateManagement.MerchantAggregate/EstateManagement.MerchantAggregate.csproj index ac881607..e35204e0 100644 --- a/EstateManagement.MerchantAggregate/EstateManagement.MerchantAggregate.csproj +++ b/EstateManagement.MerchantAggregate/EstateManagement.MerchantAggregate.csproj @@ -1,11 +1,11 @@  - netcoreapp3.1 + net5.0 - + diff --git a/EstateManagement.Models/EstateManagement.Models.csproj b/EstateManagement.Models/EstateManagement.Models.csproj index 76cd3195..59cf3b45 100644 --- a/EstateManagement.Models/EstateManagement.Models.csproj +++ b/EstateManagement.Models/EstateManagement.Models.csproj @@ -1,11 +1,11 @@ - netcoreapp3.1 + net5.0 - + diff --git a/EstateManagement.Repository.Tests/EstateManagement.Repository.Tests.csproj b/EstateManagement.Repository.Tests/EstateManagement.Repository.Tests.csproj index 597d94d8..fec94985 100644 --- a/EstateManagement.Repository.Tests/EstateManagement.Repository.Tests.csproj +++ b/EstateManagement.Repository.Tests/EstateManagement.Repository.Tests.csproj @@ -1,24 +1,24 @@ - netcoreapp3.1 + net5.0 None false - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/EstateManagement.Repository.Tests/EstateManagementRepositoryTests.cs b/EstateManagement.Repository.Tests/EstateManagementRepositoryTests.cs index ecb22044..4372a63e 100644 --- a/EstateManagement.Repository.Tests/EstateManagementRepositoryTests.cs +++ b/EstateManagement.Repository.Tests/EstateManagementRepositoryTests.cs @@ -21,6 +21,7 @@ namespace EstateManagement.Repository.Tests using Xunit; using Contract = EstateReporting.Database.Entities.Contract; using Merchant = Models.Merchant.Merchant; + using ContractProductTransactionFeeModel = Models.Contract.TransactionFee; public class EstateManagementRepositoryTests { @@ -29,10 +30,15 @@ public EstateManagementRepositoryTests() Logger.Initialise(NullLogger.Instance); } + private Mock> GetMockDbContextFactory() + { + return new Mock>(); + } + [Fact] public void EstateManagementRepository_CanBeCreated_IsCreated() { - Mock> dbContextFactory = new Mock>(); + var dbContextFactory = this.GetMockDbContextFactory(); Mock modelFactory = new Mock(); EstateManagementRepository estateManagementRepository = new EstateManagementRepository(dbContextFactory.Object, modelFactory.Object); @@ -49,7 +55,7 @@ public async Task EstateManagementRepository_GetEstate_EstateRetrieved(TestDatab context.EstateSecurityUsers.Add(TestData.EstateSecurityUserEntity); await context.SaveChangesAsync(); - Mock> dbContextFactory = new Mock>(); + var dbContextFactory = this.GetMockDbContextFactory(); Mock modelFactory = new Mock(); dbContextFactory.Setup(d => d.GetContext(It.IsAny(), It.IsAny())).ReturnsAsync(context); @@ -67,7 +73,7 @@ public async Task EstateManagementRepository_GetEstate_EstateNotFound_ErrorThrow { EstateReportingContext context = await EstateManagementRepositoryTests.GetContext(Guid.NewGuid().ToString("N"), testDatabaseType); - Mock> dbContextFactory = new Mock>(); + var dbContextFactory = this.GetMockDbContextFactory(); Mock modelFactory = new Mock(); dbContextFactory.Setup(d => d.GetContext(It.IsAny(), It.IsAny())).ReturnsAsync(context); @@ -95,7 +101,7 @@ public async Task EstateManagementRepository_GetMerchants_MerchantRetrieved(Test await context.SaveChangesAsync(); - Mock> dbContextFactory = new Mock>(); + var dbContextFactory = this.GetMockDbContextFactory(); Mock modelFactory = new Mock(); dbContextFactory.Setup(d => d.GetContext(It.IsAny(), It.IsAny())).ReturnsAsync(context); @@ -120,7 +126,7 @@ public async Task EstateManagementRepository_GetMerchants_NoMerchantsFound_NullM { EstateReportingContext context = await EstateManagementRepositoryTests.GetContext(Guid.NewGuid().ToString("N"), testDatabaseType); - Mock> dbContextFactory = new Mock>(); + var dbContextFactory = this.GetMockDbContextFactory(); Mock modelFactory = new Mock(); dbContextFactory.Setup(d => d.GetContext(It.IsAny(), It.IsAny())).ReturnsAsync(context); @@ -147,7 +153,7 @@ public async Task EstateManagementRepository_GetContract_ContractRetrieved(TestD context.ContractProductTransactionFees.Add(TestData.ContractProductTransactionFeeEntity); await context.SaveChangesAsync(); - Mock> dbContextFactory = new Mock>(); + var dbContextFactory = this.GetMockDbContextFactory(); Mock modelFactory = new Mock(); dbContextFactory.Setup(d => d.GetContext(It.IsAny(), It.IsAny())).ReturnsAsync(context); @@ -169,7 +175,7 @@ public async Task EstateManagementRepository_GetContract_IncludeProducts_Contrac context.ContractProductTransactionFees.Add(TestData.ContractProductTransactionFeeEntity); await context.SaveChangesAsync(); - Mock> dbContextFactory = new Mock>(); + var dbContextFactory = this.GetMockDbContextFactory(); Mock modelFactory = new Mock(); dbContextFactory.Setup(d => d.GetContext(It.IsAny(), It.IsAny())).ReturnsAsync(context); @@ -191,7 +197,7 @@ public async Task EstateManagementRepository_GetContract_IncludeProductsWithFees context.ContractProductTransactionFees.Add(TestData.ContractProductTransactionFeeEntity); await context.SaveChangesAsync(); - Mock> dbContextFactory = new Mock>(); + var dbContextFactory = this.GetMockDbContextFactory(); Mock modelFactory = new Mock(); dbContextFactory.Setup(d => d.GetContext(It.IsAny(), It.IsAny())).ReturnsAsync(context); @@ -209,7 +215,7 @@ public async Task EstateManagementRepository_GetContract_ContractNotFound_ErrorT { EstateReportingContext context = await EstateManagementRepositoryTests.GetContext(Guid.NewGuid().ToString("N"), testDatabaseType); - Mock> dbContextFactory = new Mock>(); + var dbContextFactory = this.GetMockDbContextFactory(); Mock modelFactory = new Mock(); dbContextFactory.Setup(d => d.GetContext(It.IsAny(), It.IsAny())).ReturnsAsync(context); @@ -230,14 +236,14 @@ public async Task EstateManagementRepository_GetTransactionFeesForProduct_Transa context.ContractProductTransactionFees.Add(TestData.ContractProductTransactionFeeEntity); await context.SaveChangesAsync(); - Mock> dbContextFactory = new Mock>(); + var dbContextFactory = this.GetMockDbContextFactory(); Mock modelFactory = new Mock(); dbContextFactory.Setup(d => d.GetContext(It.IsAny(), It.IsAny())).ReturnsAsync(context); modelFactory.Setup(m => m.ConvertFrom(It.IsAny>())).Returns(TestData.ProductTransactionFees); EstateManagementRepository estateManagementRepository = new EstateManagementRepository(dbContextFactory.Object, modelFactory.Object); - List transactionFeesModel = await estateManagementRepository.GetTransactionFeesForProduct(TestData.EstateId, TestData.MerchantId, TestData.ContractId, TestData.ProductId, CancellationToken.None); + List transactionFeesModel = await estateManagementRepository.GetTransactionFeesForProduct(TestData.EstateId, TestData.MerchantId, TestData.ContractId, TestData.ProductId, CancellationToken.None); transactionFeesModel.ShouldNotBeNull(); transactionFeesModel.ShouldHaveSingleItem(); @@ -258,7 +264,7 @@ public async Task EstateManagementRepository_GetMerchantContracts_MerchantContra await context.ContractProducts.AddAsync(TestData.ContractProductEntity3, CancellationToken.None); await context.SaveChangesAsync(); - Mock> dbContextFactory = new Mock>(); + var dbContextFactory = this.GetMockDbContextFactory(); Mock modelFactory = new Mock(); dbContextFactory.Setup(d => d.GetContext(It.IsAny(), It.IsAny())).ReturnsAsync(context); @@ -285,7 +291,7 @@ public async Task EstateManagementRepository_GetContracts_ContractsRetrieved(Tes context.EstateOperators.Add(TestData.EstateOperatorEntity); await context.SaveChangesAsync(); - Mock> dbContextFactory = new Mock>(); + var dbContextFactory = this.GetMockDbContextFactory(); Mock modelFactory = new Mock(); dbContextFactory.Setup(d => d.GetContext(It.IsAny(), It.IsAny())).ReturnsAsync(context); diff --git a/EstateManagement.Repository/EstateManagement.Repository.csproj b/EstateManagement.Repository/EstateManagement.Repository.csproj index 32b59b57..57bd80dd 100644 --- a/EstateManagement.Repository/EstateManagement.Repository.csproj +++ b/EstateManagement.Repository/EstateManagement.Repository.csproj @@ -1,11 +1,11 @@ - netcoreapp3.1 + net5.0 - + diff --git a/EstateManagement.Repository/EstateManagementRepository.cs b/EstateManagement.Repository/EstateManagementRepository.cs index 8a48e3c9..475132ad 100644 --- a/EstateManagement.Repository/EstateManagementRepository.cs +++ b/EstateManagement.Repository/EstateManagementRepository.cs @@ -15,6 +15,7 @@ using Shared.EntityFramework; using Shared.Exceptions; using Contract = EstateReporting.Database.Entities.Contract; + using TransactionFeeModel = Models.Contract.TransactionFee; using EstateModel = Models.Estate.Estate; using MerchantModel = Models.Merchant.Merchant; using ContractModel = Models.Contract.Contract; @@ -307,11 +308,11 @@ public async Task> GetMerchants(Guid estateId, /// The product identifier. /// The cancellation token. /// - public async Task> GetTransactionFeesForProduct(Guid estateId, - Guid merchantId, - Guid contractId, - Guid productId, - CancellationToken cancellationToken) + public async Task> GetTransactionFeesForProduct(Guid estateId, + Guid merchantId, + Guid contractId, + Guid productId, + CancellationToken cancellationToken) { EstateReportingContext context = await this.ContextFactory.GetContext(estateId, cancellationToken); @@ -321,7 +322,7 @@ public async Task> GetTransactionFeesForProduct(Guid estate && c.IsEnabled == true) .ToListAsync(cancellationToken); - List transactionFeeModels = this.ModelFactory.ConvertFrom(transactionFees); + List transactionFeeModels = this.ModelFactory.ConvertFrom(transactionFees); return transactionFeeModels; } diff --git a/EstateManagement.Testing/EstateManagement.Testing.csproj b/EstateManagement.Testing/EstateManagement.Testing.csproj index eea6f49a..081bd0e6 100644 --- a/EstateManagement.Testing/EstateManagement.Testing.csproj +++ b/EstateManagement.Testing/EstateManagement.Testing.csproj @@ -1,12 +1,12 @@  - netcoreapp3.1 + net5.0 None - + diff --git a/EstateManagement.Testing/TestData.cs b/EstateManagement.Testing/TestData.cs index 90a3a312..2c78df11 100644 --- a/EstateManagement.Testing/TestData.cs +++ b/EstateManagement.Testing/TestData.cs @@ -21,6 +21,7 @@ using Merchant = Models.Merchant.Merchant; using Operator = Models.Estate.Operator; using SecurityUser = Models.SecurityUser; + using TransactionFeeModel = Models.Contract.TransactionFee; public class TestData { @@ -744,9 +745,9 @@ public static ContractAggregate CreatedContractAggregateWithAProductAndTransacti ProductId = TestData.ProductId, DisplayText = TestData.ProductDisplayText, Name = TestData.ProductName, - TransactionFees = new List + TransactionFees = new List { - new TransactionFee + new TransactionFeeModel { TransactionFeeId = TestData.TransactionFeeId, Description = TestData.TransactionFeeDescription, @@ -815,9 +816,9 @@ public static ContractAggregate CreatedContractAggregateWithAProductAndTransacti CalculationType = 0 }; - public static List ProductTransactionFees = new List + public static List ProductTransactionFees = new List { - new TransactionFee + new TransactionFeeModel { TransactionFeeId = TestData.TransactionFeeId, Description = TestData.TransactionFeeDescription, diff --git a/EstateManagement.Tests/EstateManagement.Tests.csproj b/EstateManagement.Tests/EstateManagement.Tests.csproj index 14a33bd8..fe6a7807 100644 --- a/EstateManagement.Tests/EstateManagement.Tests.csproj +++ b/EstateManagement.Tests/EstateManagement.Tests.csproj @@ -1,22 +1,22 @@  - netcoreapp3.1 + net5.0 None false - - - - + + + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/EstateManagement/Dockerfile b/EstateManagement/Dockerfile index b58e701f..816ef7ee 100644 --- a/EstateManagement/Dockerfile +++ b/EstateManagement/Dockerfile @@ -1,7 +1,7 @@ -FROM mcr.microsoft.com/dotnet/core/aspnet:3.1.2-bionic AS base +FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base WORKDIR /app -FROM mcr.microsoft.com/dotnet/core/sdk:3.1.102-bionic AS build +FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build WORKDIR /src COPY ["EstateManagement/NuGet.Config", "."] COPY ["EstateManagement/EstateManagement.csproj", "EstateManagment/"] diff --git a/EstateManagement/Dockerfilewindows b/EstateManagement/Dockerfilewindows index 6079b35c..d2b19845 100644 --- a/EstateManagement/Dockerfilewindows +++ b/EstateManagement/Dockerfilewindows @@ -1,7 +1,7 @@ -FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 AS base +FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base WORKDIR /app -FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build +FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build WORKDIR /src COPY ["EstateManagement/NuGet.Config", "."] COPY ["EstateManagement/EstateManagement.csproj", "EstateManagment/"] diff --git a/EstateManagement/EstateManagement - Backup (1).csproj b/EstateManagement/EstateManagement - Backup (1).csproj new file mode 100644 index 00000000..2e7595a9 --- /dev/null +++ b/EstateManagement/EstateManagement - Backup (1).csproj @@ -0,0 +1,50 @@ + + + + net5.0 + Linux + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + + + + + + + + Always + + + Always + + + + diff --git a/EstateManagement/EstateManagement - Backup.csproj b/EstateManagement/EstateManagement - Backup.csproj new file mode 100644 index 00000000..5b59f428 --- /dev/null +++ b/EstateManagement/EstateManagement - Backup.csproj @@ -0,0 +1,50 @@ + + + + net5.0 + Linux + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + + + + + + + + Always + + + Always + + + + diff --git a/EstateManagement/EstateManagement.csproj b/EstateManagement/EstateManagement.csproj index 80380d47..c58b89ae 100644 --- a/EstateManagement/EstateManagement.csproj +++ b/EstateManagement/EstateManagement.csproj @@ -1,36 +1,37 @@  - netcoreapp3.1 + net5.0 Linux - - - - - + + + + + - - - - + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + - - - - - - - - + + + + + + + + @@ -47,4 +48,10 @@ + + + dockerfile + + +