From 9c20e016df8431c77e1f9235a7ed190b1a412d0e Mon Sep 17 00:00:00 2001 From: samatrhea Date: Sun, 14 Apr 2024 10:00:38 +0200 Subject: [PATCH] [Update] dependencies [Update] to net8 --- .github/workflows/CodeQuality.yml | 10 ++++++++-- .github/workflows/codeql-analysis.yml | 2 +- DEH-REQIF-APP/DEH-REQIF.Console.csproj | 16 ++++++++-------- .../DEH-REQIF.Console.Tests.csproj | 18 +++++++++--------- DEH-REQIF.Tests/DEH-REQIF.Tests.csproj | 18 +++++++++--------- ...alarParameterTypeMappingRuleTestFixture.cs | 4 +++- DEH-REQIF.Tests/ReqIFBuilderTestFixture.cs | 19 +++++++++++++++++-- DEH-REQIF.sln.DotSettings | 3 ++- DEH-REQIF/DEH-REQIF.csproj | 16 +++++++++------- DEH-REQIF/Services/SessionDataRetriever.cs | 4 +++- 10 files changed, 69 insertions(+), 41 deletions(-) diff --git a/.github/workflows/CodeQuality.yml b/.github/workflows/CodeQuality.yml index c3cc751..a148e05 100644 --- a/.github/workflows/CodeQuality.yml +++ b/.github/workflows/CodeQuality.yml @@ -13,10 +13,16 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + distribution: 'temurin' + java-version: '17' + overwrite-settings: false - name: Setup dotnet - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v2 with: - dotnet-version: '7.0.x' + dotnet-version: '8.0.x' - name: Restore dependencies run: dotnet restore diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 5e64243..6f0f2f5 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -29,7 +29,7 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Install dependencies run: dotnet restore - name: Build diff --git a/DEH-REQIF-APP/DEH-REQIF.Console.csproj b/DEH-REQIF-APP/DEH-REQIF.Console.csproj index d848368..a3cae62 100644 --- a/DEH-REQIF-APP/DEH-REQIF.Console.csproj +++ b/DEH-REQIF-APP/DEH-REQIF.Console.csproj @@ -2,12 +2,12 @@ Exe - net7.0 + net8.0 DEHReqIF.Console 0.2.0 A Commandline application used to convert an E-TM-10-25 data source into a ReqIF document. RHEA System S.A. - Copyright 2022-2023 RHEA System S.A. + Copyright 2022-2024 RHEA System S.A. Apache-2.0 https://github.com/RHEAGROUP/DEH-REQIF.git Git @@ -25,13 +25,13 @@ - - - - + + + + - - + + diff --git a/DEH-REQIF.Console.Tests/DEH-REQIF.Console.Tests.csproj b/DEH-REQIF.Console.Tests/DEH-REQIF.Console.Tests.csproj index 223d7f7..8f52e2b 100644 --- a/DEH-REQIF.Console.Tests/DEH-REQIF.Console.Tests.csproj +++ b/DEH-REQIF.Console.Tests/DEH-REQIF.Console.Tests.csproj @@ -1,10 +1,10 @@  - net7.0 + net8.0 Unit tests for the DEH-ReqIF Console application. RHEA System S.A. - Copyright 2022-2023 RHEA System S.A. + Copyright 2022-2024 RHEA System S.A. https://github.com/RHEAGROUP/DEH-REQIF.git Git DEHReqIF.Console.Tests @@ -13,20 +13,20 @@ - - - + + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/DEH-REQIF.Tests/DEH-REQIF.Tests.csproj b/DEH-REQIF.Tests/DEH-REQIF.Tests.csproj index 171c2a6..5711685 100644 --- a/DEH-REQIF.Tests/DEH-REQIF.Tests.csproj +++ b/DEH-REQIF.Tests/DEH-REQIF.Tests.csproj @@ -1,10 +1,10 @@  - net7.0 + net8.0 Unit tests for the DEH-ReqIF library. RHEA System S.A. - Copyright 2022-2023 RHEA System S.A. + Copyright 2022-2024 RHEA System S.A. https://github.com/RHEAGROUP/DEH-REQIF.git Git DEHReqIF.Tests @@ -13,20 +13,20 @@ - - - + + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/DEH-REQIF.Tests/MappingRules/ParameterTypes/ScalarParameterTypeMappingRuleTestFixture.cs b/DEH-REQIF.Tests/MappingRules/ParameterTypes/ScalarParameterTypeMappingRuleTestFixture.cs index 5664c46..3efd618 100644 --- a/DEH-REQIF.Tests/MappingRules/ParameterTypes/ScalarParameterTypeMappingRuleTestFixture.cs +++ b/DEH-REQIF.Tests/MappingRules/ParameterTypes/ScalarParameterTypeMappingRuleTestFixture.cs @@ -48,7 +48,9 @@ public class ScalarParameterTypeMappingRuleTestFixture [SetUp] public void SetUp() { - this.assembler = new Assembler(this.uri); + var messagebus = new CDPMessageBus(); + + this.assembler = new Assembler(this.uri, messagebus); this.scalarParameterTypeMappingRule = new ScalarParameterTypeMappingRule(); } diff --git a/DEH-REQIF.Tests/ReqIFBuilderTestFixture.cs b/DEH-REQIF.Tests/ReqIFBuilderTestFixture.cs index 7424d8b..95c2fd2 100644 --- a/DEH-REQIF.Tests/ReqIFBuilderTestFixture.cs +++ b/DEH-REQIF.Tests/ReqIFBuilderTestFixture.cs @@ -96,13 +96,28 @@ public async Task Setup() this.engineeringModelIid = Guid.NewGuid(); this.iterationIid = Guid.NewGuid(); - this.assembler = new Assembler(this.uri); + var messagebus = new CDPMessageBus(); + + this.assembler = new Assembler(this.uri, messagebus); this.CreateExportSettings(); await this.CreateTemplateReqIF(); this.PopulateRequirementsData(); } + [TearDown] + public void TearDown() + { + this.memoryTarget.Dispose(); + + this.iteration.Dispose(); + this.requirementsGroup1.Dispose(); + this.requirementsGroup2.Dispose(); + this.requirement0.Dispose(); + this.requirement1.Dispose(); + this.requirement2.Dispose(); + } + private void CreateExportSettings() { var referenceMap = new ExternalIdentifierMap(); @@ -415,7 +430,7 @@ public void Verify_that_alternative_id_tags_are_added() stream.Position = 0; var reqIfXml = new StreamReader(stream).ReadToEnd(); - Assert.IsTrue(reqIfXml.ToLower().Contains("Copy Field, Property, Event, Method ------------------------------------------------------------------------------------------------- - <copyright file="$FILENAME$" company="RHEA System S.A."> + <copyright file="${File.FileName}" company="RHEA System S.A."> Copyright 2022 RHEA System S.A. @@ -22,4 +22,5 @@ ------------------------------------------------------------------------------------------------- <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> + True True \ No newline at end of file diff --git a/DEH-REQIF/DEH-REQIF.csproj b/DEH-REQIF/DEH-REQIF.csproj index df8b0c4..7ae6147 100644 --- a/DEH-REQIF/DEH-REQIF.csproj +++ b/DEH-REQIF/DEH-REQIF.csproj @@ -7,13 +7,15 @@ A .NET library to conver ECSS-E-TM-10-25 requirements to an OMG ReqIF file. DEH-ReqIF RHEA System S.A. - Copyright 2022-2023 RHEA System S.A. + Copyright 2022-2024 RHEA System S.A. Apache-2.0 https://github.com/RHEAGROUP/DEH-REQIF.git Git - ReqIF ECSS-E-TM-10-25 COMET + ReqIF ECSS-E-TM-10-25 CDP4-COMET Sam Gerené false + true + true [Initial Version] @@ -27,11 +29,11 @@ - - - - - + + + + + \ No newline at end of file diff --git a/DEH-REQIF/Services/SessionDataRetriever.cs b/DEH-REQIF/Services/SessionDataRetriever.cs index cb07357..fdcc91c 100644 --- a/DEH-REQIF/Services/SessionDataRetriever.cs +++ b/DEH-REQIF/Services/SessionDataRetriever.cs @@ -58,7 +58,9 @@ public async Task OpenSessionAndRetrieveData(string userName, string p var dal = new CDP4ServicesDal.CdpServicesDal(); var credentials = new Credentials(userName, password, new Uri(dataSource)); - var session = new Session(dal, credentials); + var messagebus = new CDPMessageBus(); + + var session = new Session(dal, credentials, messagebus); await session.Open(false); var siteDirectory = session.RetrieveSiteDirectory();