From 867d680b7fd32e346db757f2c5d24cbb92cbffb3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Nov 2021 15:22:18 +0000 Subject: [PATCH 1/6] Bump mockito-junit-jupiter from 4.0.0 to 4.1.0 Bumps [mockito-junit-jupiter](https://github.com/mockito/mockito) from 4.0.0 to 4.1.0. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v4.0.0...v4.1.0) --- updated-dependencies: - dependency-name: org.mockito:mockito-junit-jupiter dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0a52ba7..c367720 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ SPDX-License-Identifier: Apache-2.0 2.13.0 2.3.3 5.8.1 - 4.0.0 + 4.1.0 0.9.1 From 906877b99d6bc20375afe6e29fa5e965649fd967 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Nov 2021 15:22:46 +0000 Subject: [PATCH 2/6] Bump actions/cache from 2.1.6 to 2.1.7 Bumps [actions/cache](https://github.com/actions/cache) from 2.1.6 to 2.1.7. - [Release notes](https://github.com/actions/cache/releases) - [Commits](https://github.com/actions/cache/compare/v2.1.6...v2.1.7) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/sonarcloud-analysis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sonarcloud-analysis.yml b/.github/workflows/sonarcloud-analysis.yml index f56affe..9338020 100644 --- a/.github/workflows/sonarcloud-analysis.yml +++ b/.github/workflows/sonarcloud-analysis.yml @@ -20,13 +20,13 @@ jobs: distribution: 'zulu' java-version: '11' - name: Cache SonarCloud packages - uses: actions/cache@v2.1.6 + uses: actions/cache@v2.1.7 with: path: ~/.sonar/cache key: ${{ runner.os }}-sonar restore-keys: ${{ runner.os }}-sonar - name: Cache Maven packages - uses: actions/cache@v2.1.6 + uses: actions/cache@v2.1.7 with: path: ~/.m2 key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} From eb982a99995e946af5ffa73b6e65e8f0d637d960 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Nov 2021 15:16:21 +0000 Subject: [PATCH 3/6] Bump junit.jupiter.version from 5.8.1 to 5.8.2 Bumps `junit.jupiter.version` from 5.8.1 to 5.8.2. Updates `junit-jupiter-api` from 5.8.1 to 5.8.2 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.8.1...r5.8.2) Updates `junit-jupiter-engine` from 5.8.1 to 5.8.2 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.8.1...r5.8.2) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-api dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.junit.jupiter:junit-jupiter-engine dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c367720..3a353d1 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ SPDX-License-Identifier: Apache-2.0 1.7.32 2.13.0 2.3.3 - 5.8.1 + 5.8.2 4.1.0 0.9.1 From 3a8806529f83ea637a3f6f9ac250ca424b933d33 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Nov 2021 15:17:29 +0000 Subject: [PATCH 4/6] Bump actions/setup-java from 2.3.1 to 2.4.0 Bumps [actions/setup-java](https://github.com/actions/setup-java) from 2.3.1 to 2.4.0. - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](https://github.com/actions/setup-java/compare/v2.3.1...v2.4.0) --- updated-dependencies: - dependency-name: actions/setup-java dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/build-project.yml | 2 +- .github/workflows/release-project.yml | 2 +- .github/workflows/sonarcloud-analysis.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-project.yml b/.github/workflows/build-project.yml index 1bdae63..9f64b79 100644 --- a/.github/workflows/build-project.yml +++ b/.github/workflows/build-project.yml @@ -15,7 +15,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Set up JDK 1.11 - uses: actions/setup-java@v2.3.1 + uses: actions/setup-java@v2.4.0 with: distribution: 'zulu' java-version: '11' diff --git a/.github/workflows/release-project.yml b/.github/workflows/release-project.yml index bab7b66..5be2d56 100644 --- a/.github/workflows/release-project.yml +++ b/.github/workflows/release-project.yml @@ -22,7 +22,7 @@ jobs: # Extra the tagname form the git reference, value of GITHUB_REF will be something like refs/tags/. run: echo "##[set-output name=tagname;]$(echo ${GITHUB_REF##*/})" - name: Set up JDK 1.11 - uses: actions/setup-java@v2.3.1 + uses: actions/setup-java@v2.4.0 with: distribution: 'zulu' java-version: '11' diff --git a/.github/workflows/sonarcloud-analysis.yml b/.github/workflows/sonarcloud-analysis.yml index 9338020..6a5956a 100644 --- a/.github/workflows/sonarcloud-analysis.yml +++ b/.github/workflows/sonarcloud-analysis.yml @@ -15,7 +15,7 @@ jobs: with: fetch-depth: 0 - name: Set up JDK 1.11 - uses: actions/setup-java@v2.3.1 + uses: actions/setup-java@v2.4.0 with: distribution: 'zulu' java-version: '11' From b1beff4aea1847138771b90b6cf8ee888bc0df89 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 3 Dec 2021 15:18:22 +0000 Subject: [PATCH 5/6] Bump resteasy-core from 5.0.0.Final to 5.0.1.Final Bumps [resteasy-core](https://github.com/resteasy/Resteasy) from 5.0.0.Final to 5.0.1.Final. - [Release notes](https://github.com/resteasy/Resteasy/releases) - [Commits](https://github.com/resteasy/Resteasy/compare/5.0.0.Final...5.0.1.Final) --- updated-dependencies: - dependency-name: org.jboss.resteasy:resteasy-core dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3a353d1..ba0b94a 100644 --- a/pom.xml +++ b/pom.xml @@ -119,7 +119,7 @@ SPDX-License-Identifier: Apache-2.0 org.jboss.resteasy resteasy-core - 5.0.0.Final + 5.0.1.Final test From b23540486c90ab5a8417088821c712d35a5703bb Mon Sep 17 00:00:00 2001 From: Dennis Labordus Date: Tue, 14 Dec 2021 11:31:50 +0100 Subject: [PATCH 6/6] Added new STD Type + Refactoring. Signed-off-by: Dennis Labordus --- .github/workflows/build-project.yml | 35 +++-- .github/workflows/sonarcloud-analysis.yml | 9 +- scl-extension/pom.xml | 4 + .../src/main/bindings/scl-extensions.xjb | 15 ++ .../scl/extensions/model/SclFileType.java | 30 ++++ .../src/main/resources/xsd/SCL_CoMPAS.xsd | 137 +++++++++--------- .../extensions/model/AbstractEnumTest.java | 26 ++++ .../scl/extensions/model/SclFileTypeTest.java | 22 +++ .../commons/CompasExtensionsManager.java | 6 +- .../commons/CompasExtensionsManagerTest.java | 6 +- .../commons/CompasExtensionsManager.java | 6 +- .../commons/CompasExtensionsManagerTest.java | 6 +- .../commons/CompasExtensionsManager.java | 6 +- .../commons/CompasExtensionsManagerTest.java | 6 +- 14 files changed, 216 insertions(+), 98 deletions(-) create mode 100644 scl-extension/src/main/bindings/scl-extensions.xjb create mode 100644 scl-extension/src/main/java/org/lfenergy/compas/scl/extensions/model/SclFileType.java create mode 100644 scl-extension/src/test/java/org/lfenergy/compas/scl/extensions/model/AbstractEnumTest.java create mode 100644 scl-extension/src/test/java/org/lfenergy/compas/scl/extensions/model/SclFileTypeTest.java diff --git a/.github/workflows/build-project.yml b/.github/workflows/build-project.yml index 9f64b79..afa43cc 100644 --- a/.github/workflows/build-project.yml +++ b/.github/workflows/build-project.yml @@ -4,7 +4,14 @@ name: Build Project -on: push +on: + push: + branches: + - '**' + pull_request: + branches: + - 'main' + - 'develop' jobs: build: @@ -13,16 +20,16 @@ jobs: timeout-minutes: 15 steps: - - uses: actions/checkout@v2 - - name: Set up JDK 1.11 - uses: actions/setup-java@v2.4.0 - with: - distribution: 'zulu' - java-version: '11' - - name: Create custom Maven Settings.xml - uses: whelk-io/maven-settings-xml-action@v20 - with: - output_file: custom_maven_settings.xml - servers: '[{ "id": "github-packages-compas", "username": "OWNER", "password": "${{ secrets.GITHUB_TOKEN }}" }]' - - name: Build with Maven - run: ./mvnw -s custom_maven_settings.xml -B clean verify + - uses: actions/checkout@v2 + - name: Set up JDK 1.11 + uses: actions/setup-java@v2.4.0 + with: + distribution: 'zulu' + java-version: '11' + - name: Create custom Maven Settings.xml + uses: whelk-io/maven-settings-xml-action@v20 + with: + output_file: custom_maven_settings.xml + servers: '[{ "id": "github-packages-compas", "username": "OWNER", "password": "${{ secrets.GITHUB_TOKEN }}" }]' + - name: Build with Maven + run: ./mvnw -s custom_maven_settings.xml -B clean verify diff --git a/.github/workflows/sonarcloud-analysis.yml b/.github/workflows/sonarcloud-analysis.yml index 6a5956a..b5f589a 100644 --- a/.github/workflows/sonarcloud-analysis.yml +++ b/.github/workflows/sonarcloud-analysis.yml @@ -4,7 +4,14 @@ name: SonarCloud Analysis -on: push +on: + push: + branches: + - '**' + pull_request: + branches: + - 'main' + - 'develop' jobs: build: diff --git a/scl-extension/pom.xml b/scl-extension/pom.xml index fe53d72..ece5e67 100644 --- a/scl-extension/pom.xml +++ b/scl-extension/pom.xml @@ -57,6 +57,10 @@ SPDX-License-Identifier: Apache-2.0 src/main/resources/xsd org.lfenergy.compas.scl.extensions.model + ${project.basedir}/src/main/bindings + + *.xjb + diff --git a/scl-extension/src/main/bindings/scl-extensions.xjb b/scl-extension/src/main/bindings/scl-extensions.xjb new file mode 100644 index 0000000..c19ff84 --- /dev/null +++ b/scl-extension/src/main/bindings/scl-extensions.xjb @@ -0,0 +1,15 @@ + + + + + + + + + \ No newline at end of file diff --git a/scl-extension/src/main/java/org/lfenergy/compas/scl/extensions/model/SclFileType.java b/scl-extension/src/main/java/org/lfenergy/compas/scl/extensions/model/SclFileType.java new file mode 100644 index 0000000..220140d --- /dev/null +++ b/scl-extension/src/main/java/org/lfenergy/compas/scl/extensions/model/SclFileType.java @@ -0,0 +1,30 @@ +// SPDX-FileCopyrightText: 2021 Alliander N.V. +// +// SPDX-License-Identifier: Apache-2.0 +package org.lfenergy.compas.scl.extensions.model; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlType; + +@XmlType(name = "tSclFileType", namespace = "https://www.lfenergy.org/compas/extension/v1") +@XmlEnum +public enum SclFileType { + SSD("Substation Specification Description"), + IID("IED Instance Description"), + ICD("IED Capability Description"), + SCD("Substation Configuration Description"), + CID("Configured IED Description"), + SED("System Exchange Description"), + ISD("IED Specification Description"), + STD("System Template Definition"); + + private final String description; + + SclFileType(String description) { + this.description = description; + } + + public String getDescription() { + return description; + } +} diff --git a/scl-extension/src/main/resources/xsd/SCL_CoMPAS.xsd b/scl-extension/src/main/resources/xsd/SCL_CoMPAS.xsd index 40ba244..6b20188 100644 --- a/scl-extension/src/main/resources/xsd/SCL_CoMPAS.xsd +++ b/scl-extension/src/main/resources/xsd/SCL_CoMPAS.xsd @@ -4,69 +4,76 @@ SPDX-FileCopyrightText: 2021 Alliander N.V. SPDX-License-Identifier: Apache-2.0 --> - - - - COPYRIGHT (c) 2021 Alliander N.V. - - - Version 1.0 Release 2021/06/16 - - - - - - Name of the SCL configuration, extension excluded - - - - - - - - File type of the SCL configuration file - - - - - Substation Specification Description - - - - - IED Instance Description - - - - - IED Capability Description - - - - - Substation Configuration Description - - - - - Configured IED Description - - - - - System Exchange Description - - - - - IED Specification Description - - - - - + + + + COPYRIGHT (c) 2021 Alliander N.V. + + + Version 1.0 Release 2021/06/16 + + + + + + Name of the SCL configuration, extension excluded + + + + + + + + File type of the SCL configuration file + + + + + Substation Specification Description + + + + + IED Instance Description + + + + + IED Capability Description + + + + + Substation Configuration Description + + + + + Configured IED Description + + + + + System Exchange Description + + + + + IED Specification Description + + + + + System Template Definition + + + + + \ No newline at end of file diff --git a/scl-extension/src/test/java/org/lfenergy/compas/scl/extensions/model/AbstractEnumTest.java b/scl-extension/src/test/java/org/lfenergy/compas/scl/extensions/model/AbstractEnumTest.java new file mode 100644 index 0000000..6828de3 --- /dev/null +++ b/scl-extension/src/test/java/org/lfenergy/compas/scl/extensions/model/AbstractEnumTest.java @@ -0,0 +1,26 @@ +// SPDX-FileCopyrightText: 2021 Alliander N.V. +// +// SPDX-License-Identifier: Apache-2.0 +package org.lfenergy.compas.scl.extensions.model; + +import org.junit.jupiter.api.Test; + +import java.lang.reflect.InvocationTargetException; + +import static org.junit.jupiter.api.Assertions.assertNotNull; + +abstract class AbstractEnumTest { + @Test + void testEnumCodeCoverage() { + Class> enumClass = getEnumClass(); + try { + for (var o : (Enum[]) enumClass.getMethod("values").invoke(null)) { + assertNotNull(enumClass.getMethod("valueOf", String.class).invoke(null, o.name())); + } + } catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException exp) { + throw new RuntimeException(exp); + } + } + + protected abstract Class> getEnumClass(); +} diff --git a/scl-extension/src/test/java/org/lfenergy/compas/scl/extensions/model/SclFileTypeTest.java b/scl-extension/src/test/java/org/lfenergy/compas/scl/extensions/model/SclFileTypeTest.java new file mode 100644 index 0000000..e811b8c --- /dev/null +++ b/scl-extension/src/test/java/org/lfenergy/compas/scl/extensions/model/SclFileTypeTest.java @@ -0,0 +1,22 @@ +// SPDX-FileCopyrightText: 2021 Alliander N.V. +// +// SPDX-License-Identifier: Apache-2.0 +package org.lfenergy.compas.scl.extensions.model; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertNotNull; + +class SclFileTypeTest extends AbstractEnumTest { + @Override + protected Class> getEnumClass() { + return SclFileType.class; + } + + @Test + void getDescription_WhenCalledForEveryType_ThenEveryTypeHasADescription() { + for (var type : SclFileType.values()) { + assertNotNull(type.getDescription()); + } + } +} \ No newline at end of file diff --git a/scl2003/src/main/java/org/lfenergy/compas/scl2003/commons/CompasExtensionsManager.java b/scl2003/src/main/java/org/lfenergy/compas/scl2003/commons/CompasExtensionsManager.java index 01db39f..f70b54d 100644 --- a/scl2003/src/main/java/org/lfenergy/compas/scl2003/commons/CompasExtensionsManager.java +++ b/scl2003/src/main/java/org/lfenergy/compas/scl2003/commons/CompasExtensionsManager.java @@ -5,7 +5,7 @@ import org.lfenergy.compas.scl.extensions.commons.AbstractCompasExtensionsManager; import org.lfenergy.compas.scl.extensions.commons.CompasExtensionsField; -import org.lfenergy.compas.scl.extensions.model.TSclFileType; +import org.lfenergy.compas.scl.extensions.model.SclFileType; import org.lfenergy.compas.scl2003.model.SCL; import org.lfenergy.compas.scl2003.model.TPrivate; @@ -31,8 +31,8 @@ public Optional getCompasSclName(TPrivate compasPrivate) { return getCompasValue(compasPrivate, SCL_NAME_EXTENSION, String.class); } - public Optional getCompasSclFileType(TPrivate compasPrivate) { - return getCompasValue(compasPrivate, SCL_FILETYPE_EXTENSION, TSclFileType.class); + public Optional getCompasSclFileType(TPrivate compasPrivate) { + return getCompasValue(compasPrivate, SCL_FILETYPE_EXTENSION, SclFileType.class); } private Optional getCompasValue(TPrivate compasPrivate, CompasExtensionsField field, Class clazz) { diff --git a/scl2003/src/test/java/org/lfenergy/compas/scl2003/commons/CompasExtensionsManagerTest.java b/scl2003/src/test/java/org/lfenergy/compas/scl2003/commons/CompasExtensionsManagerTest.java index 1683d5d..5abf9f2 100644 --- a/scl2003/src/test/java/org/lfenergy/compas/scl2003/commons/CompasExtensionsManagerTest.java +++ b/scl2003/src/test/java/org/lfenergy/compas/scl2003/commons/CompasExtensionsManagerTest.java @@ -4,7 +4,7 @@ package org.lfenergy.compas.scl2003.commons; import org.junit.jupiter.api.Test; -import org.lfenergy.compas.scl.extensions.model.TSclFileType; +import org.lfenergy.compas.scl.extensions.model.SclFileType; import static org.junit.jupiter.api.Assertions.*; import static org.lfenergy.compas.scl.extensions.commons.CompasExtensionsConstants.COMPAS_SCL_EXTENSION_TYPE; @@ -95,7 +95,7 @@ void getCompasElement_WhenCalledWithFileType_ThenFileTypeReturned() { var compasElement = manager.getCompasElement(tPrivate, SCL_FILETYPE_EXTENSION); assertTrue(compasElement.isPresent()); - assertEquals(TSclFileType.CID, compasElement.get().getValue()); + assertEquals(SclFileType.CID, compasElement.get().getValue()); }, () -> fail(COMPAS_PRIVATE_NOT_FOUND)); } @@ -147,7 +147,7 @@ void getCompasSclFileType_WhenCalledWithSclType_ThenSclTypeReturned() { var sclFileType = manager.getCompasSclFileType(tPrivate); assertTrue(sclFileType.isPresent()); - assertEquals(TSclFileType.CID, sclFileType.get()); + assertEquals(SclFileType.CID, sclFileType.get()); }, () -> fail(COMPAS_PRIVATE_NOT_FOUND)); } diff --git a/scl2007b/src/main/java/org/lfenergy/compas/scl2007b/commons/CompasExtensionsManager.java b/scl2007b/src/main/java/org/lfenergy/compas/scl2007b/commons/CompasExtensionsManager.java index 0ca25a0..b00e0d1 100644 --- a/scl2007b/src/main/java/org/lfenergy/compas/scl2007b/commons/CompasExtensionsManager.java +++ b/scl2007b/src/main/java/org/lfenergy/compas/scl2007b/commons/CompasExtensionsManager.java @@ -5,7 +5,7 @@ import org.lfenergy.compas.scl.extensions.commons.AbstractCompasExtensionsManager; import org.lfenergy.compas.scl.extensions.commons.CompasExtensionsField; -import org.lfenergy.compas.scl.extensions.model.TSclFileType; +import org.lfenergy.compas.scl.extensions.model.SclFileType; import org.lfenergy.compas.scl2007b.model.SCL; import org.lfenergy.compas.scl2007b.model.TPrivate; @@ -38,8 +38,8 @@ public Optional getCompasSclName(TPrivate compasPrivate) { return getCompasValue(compasPrivate, SCL_NAME_EXTENSION, String.class); } - public Optional getCompasSclFileType(TPrivate compasPrivate) { - return getCompasValue(compasPrivate, SCL_FILETYPE_EXTENSION, TSclFileType.class); + public Optional getCompasSclFileType(TPrivate compasPrivate) { + return getCompasValue(compasPrivate, SCL_FILETYPE_EXTENSION, SclFileType.class); } public TPrivate createCompasPrivate() { diff --git a/scl2007b/src/test/java/org/lfenergy/compas/scl2007b/commons/CompasExtensionsManagerTest.java b/scl2007b/src/test/java/org/lfenergy/compas/scl2007b/commons/CompasExtensionsManagerTest.java index 9f91364..b1d75b8 100644 --- a/scl2007b/src/test/java/org/lfenergy/compas/scl2007b/commons/CompasExtensionsManagerTest.java +++ b/scl2007b/src/test/java/org/lfenergy/compas/scl2007b/commons/CompasExtensionsManagerTest.java @@ -4,7 +4,7 @@ package org.lfenergy.compas.scl2007b.commons; import org.junit.jupiter.api.Test; -import org.lfenergy.compas.scl.extensions.model.TSclFileType; +import org.lfenergy.compas.scl.extensions.model.SclFileType; import static org.junit.jupiter.api.Assertions.*; import static org.lfenergy.compas.scl.extensions.commons.CompasExtensionsConstants.COMPAS_SCL_EXTENSION_TYPE; @@ -95,7 +95,7 @@ void getCompasElement_WhenCalledWithFileType_ThenFileTypeReturned() { var compasElement = manager.getCompasElement(tPrivate, SCL_FILETYPE_EXTENSION); assertTrue(compasElement.isPresent()); - assertEquals(TSclFileType.CID, compasElement.get().getValue()); + assertEquals(SclFileType.CID, compasElement.get().getValue()); }, () -> fail(COMPAS_PRIVATE_NOT_FOUND)); } @@ -147,7 +147,7 @@ void getCompasSclFileType_WhenCalledWithSclType_ThenSclTypeReturned() { var sclFileType = manager.getCompasSclFileType(tPrivate); assertTrue(sclFileType.isPresent()); - assertEquals(TSclFileType.CID, sclFileType.get()); + assertEquals(SclFileType.CID, sclFileType.get()); }, () -> fail(COMPAS_PRIVATE_NOT_FOUND)); } diff --git a/scl2007b4/src/main/java/org/lfenergy/compas/scl2007b4/commons/CompasExtensionsManager.java b/scl2007b4/src/main/java/org/lfenergy/compas/scl2007b4/commons/CompasExtensionsManager.java index 4a22e28..23fb204 100644 --- a/scl2007b4/src/main/java/org/lfenergy/compas/scl2007b4/commons/CompasExtensionsManager.java +++ b/scl2007b4/src/main/java/org/lfenergy/compas/scl2007b4/commons/CompasExtensionsManager.java @@ -5,7 +5,7 @@ import org.lfenergy.compas.scl.extensions.commons.AbstractCompasExtensionsManager; import org.lfenergy.compas.scl.extensions.commons.CompasExtensionsField; -import org.lfenergy.compas.scl.extensions.model.TSclFileType; +import org.lfenergy.compas.scl.extensions.model.SclFileType; import org.lfenergy.compas.scl2007b4.model.SCL; import org.lfenergy.compas.scl2007b4.model.TPrivate; @@ -27,8 +27,8 @@ public Optional getCompasPrivate(SCL scl) { return Optional.empty(); } - public Optional getCompasSclFileType(TPrivate compasPrivate) { - return getCompasValue(compasPrivate, SCL_FILETYPE_EXTENSION, TSclFileType.class); + public Optional getCompasSclFileType(TPrivate compasPrivate) { + return getCompasValue(compasPrivate, SCL_FILETYPE_EXTENSION, SclFileType.class); } public Optional getCompasSclName(TPrivate compasPrivate) { diff --git a/scl2007b4/src/test/java/org/lfenergy/compas/scl2007b4/commons/CompasExtensionsManagerTest.java b/scl2007b4/src/test/java/org/lfenergy/compas/scl2007b4/commons/CompasExtensionsManagerTest.java index 8e16c38..28f9a04 100644 --- a/scl2007b4/src/test/java/org/lfenergy/compas/scl2007b4/commons/CompasExtensionsManagerTest.java +++ b/scl2007b4/src/test/java/org/lfenergy/compas/scl2007b4/commons/CompasExtensionsManagerTest.java @@ -4,7 +4,7 @@ package org.lfenergy.compas.scl2007b4.commons; import org.junit.jupiter.api.Test; -import org.lfenergy.compas.scl.extensions.model.TSclFileType; +import org.lfenergy.compas.scl.extensions.model.SclFileType; import static org.junit.jupiter.api.Assertions.*; import static org.lfenergy.compas.scl.extensions.commons.CompasExtensionsConstants.COMPAS_SCL_EXTENSION_TYPE; @@ -95,7 +95,7 @@ void getCompasElement_WhenCalledWithFileType_ThenFileTypeReturned() { var compasElement = manager.getCompasElement(tPrivate, SCL_FILETYPE_EXTENSION); assertTrue(compasElement.isPresent()); - assertEquals(TSclFileType.CID, compasElement.get().getValue()); + assertEquals(SclFileType.CID, compasElement.get().getValue()); }, () -> fail(COMPAS_PRIVATE_NOT_FOUND)); } @@ -147,7 +147,7 @@ void getCompasSclFileType_WhenCalledWithSclType_ThenSclTypeReturned() { var sclFileType = manager.getCompasSclFileType(tPrivate); assertTrue(sclFileType.isPresent()); - assertEquals(TSclFileType.CID, sclFileType.get()); + assertEquals(SclFileType.CID, sclFileType.get()); }, () -> fail(COMPAS_PRIVATE_NOT_FOUND)); }