Skip to content

Commit 0432fe5

Browse files
committed
Fix tests and test model URNs
1 parent 68f6b01 commit 0432fe5

File tree

469 files changed

+657
-655
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

469 files changed

+657
-655
lines changed

core/esmf-aspect-meta-model-java/buildSrc/main/groovy/unit2java.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public class Units {
7979
8080
private static AspectModelUrn urn( final KnownVersion version, final String name ) {
8181
return AspectModelUrn.fromUrn(
82-
String.format( "urn:samm:org.eclipse.samm:unit:%s#%s", version.toVersionString(), name ) );
82+
String.format( "urn:samm:org.eclipse.esmf.samm:unit:%s#%s", version.toVersionString(), name ) );
8383
}
8484
8585
${initMethods.join("\n")}
@@ -241,7 +241,7 @@ public enum QuantityKinds implements QuantityKind {
241241
242242
@Override
243243
public Optional<AspectModelUrn> getAspectModelUrn() {
244-
return Optional.of( AspectModelUrn.fromUrn( String.format( "urn:samm:org.eclipse.samm:unit:%s#%s", LATEST.toVersionString(), this.name ) ) );
244+
return Optional.of( AspectModelUrn.fromUrn( String.format( "urn:samm:org.eclipse.esmf.samm:unit:%s#%s", LATEST.toVersionString(), this.name ) ) );
245245
}
246246
247247
@Override

core/esmf-aspect-meta-model-java/buildSrc/main/resources/quantitykinds.sparql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
#
1010
# SPDX-License-Identifier: MPL-2.0
1111

12-
prefix samm: <urn:samm:org.eclipse.samm:meta-model:1.0.0#>
13-
prefix unit: <urn:samm:org.eclipse.samm:unit:1.0.0#>
12+
prefix samm: <urn:samm:org.eclipse.esmf.samm:meta-model:1.0.0#>
13+
prefix unit: <urn:samm:org.eclipse.esmf.samm:unit:1.0.0#>
1414

1515
select distinct ?quantityKindName ?label
1616
where {

core/esmf-aspect-meta-model-java/buildSrc/main/resources/units.sparql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
1313
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
14-
prefix samm: <urn:samm:org.eclipse.samm:meta-model:1.0.0#>
15-
prefix unit: <urn:samm:org.eclipse.samm:unit:1.0.0#>
14+
prefix samm: <urn:samm:org.eclipse.esmf.samm:meta-model:1.0.0#>
15+
prefix unit: <urn:samm:org.eclipse.esmf.samm:unit:1.0.0#>
1616

1717
select distinct ?unitName ?label ?symbol ?code ?referenceUnitName ?conversionFactor ?quantityKinds
1818
where {

core/esmf-aspect-meta-model-resolver/pom.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@
144144

145145
<!-- Download updated meta model shape files -->
146146
<!-- This refers to the state of the shape files after merging of https://github.com/eclipse-esmf/esmf-semantic-aspect-meta-model/pull/176 -->
147+
<!-- TODO: Enable this section once https://github.com/eclipse-esmf/esmf-semantic-aspect-meta-model/pull/186 has been merged -->
148+
<!--
147149
<plugin>
148150
<groupId>com.googlecode.maven-download-plugin</groupId>
149151
<artifactId>download-maven-plugin</artifactId>
@@ -219,6 +221,7 @@
219221
</execution>
220222
</executions>
221223
</plugin>
224+
-->
222225

223226
</plugins>
224227
</build>

core/esmf-aspect-meta-model-resolver/src/test/resources/samm_1_0_0/valid_aspect.ttl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#
1010
# SPDX-License-Identifier: MPL-2.0
1111

12-
@prefix : <urn:samm:org.eclipse.esmf.samm.test:1.0.0#> .
12+
@prefix : <urn:samm:org.eclipse.esmf.test:1.0.0#> .
1313
@prefix samm: <urn:samm:org.eclipse.esmf.samm:meta-model:1.0.0#> .
1414

1515
:TestAspect a samm:Aspect ;

core/esmf-aspect-meta-model-resolver/src/test/resources/samm_1_0_0/valid_entity.ttl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#
1010
# SPDX-License-Identifier: MPL-2.0
1111

12-
@prefix : <urn:samm:org.eclipse.esmf.samm.test:1.0.0#> .
12+
@prefix : <urn:samm:org.eclipse.esmf.test:1.0.0#> .
1313
@prefix samm: <urn:samm:org.eclipse.esmf.samm:meta-model:1.0.0#> .
1414

1515
:TestEntity a samm:Entity ;

core/esmf-aspect-meta-model-resolver/src/test/resources/samm_2_0_0/valid_aspect.ttl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#
1010
# SPDX-License-Identifier: MPL-2.0
1111

12-
@prefix : <urn:samm:org.eclipse.esmf.samm.test:1.0.0#> .
12+
@prefix : <urn:samm:org.eclipse.esmf.test:1.0.0#> .
1313
@prefix samm: <urn:samm:org.eclipse.esmf.samm:meta-model:2.0.0#> .
1414

1515
:TestAspect a samm:Aspect ;

core/esmf-aspect-meta-model-resolver/src/test/resources/samm_2_0_0/valid_entity.ttl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#
1010
# SPDX-License-Identifier: MPL-2.0
1111

12-
@prefix : <urn:samm:org.eclipse.esmf.samm.test:1.0.0#> .
12+
@prefix : <urn:samm:org.eclipse.esmf.test:1.0.0#> .
1313
@prefix samm: <urn:samm:org.eclipse.esmf.samm:meta-model:2.0.0#> .
1414

1515
:TestEntity a samm:Entity ;

core/esmf-aspect-model-aas-generator/src/test/java/org/eclipse/esmf/aspectmodel/aas/AspectModelAASGeneratorTest.java

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ void testGenerateAasxFromSammAspectWithListAndAdditionalProperty() throws IOExce
5353
assertEquals( 2, env.getSubmodels().get( 0 ).getSubmodelElements().size() );
5454

5555
final Set<String> semanticIds =
56-
Set.of( "urn:samm:org.eclipse.esmf.samm.test:1.0.0#testProperty",
57-
"urn:samm:org.eclipse.esmf.samm.test:1.0.0#testPropertyTwo" );
56+
Set.of( "urn:samm:org.eclipse.esmf.test:1.0.0#testProperty",
57+
"urn:samm:org.eclipse.esmf.test:1.0.0#testPropertyTwo" );
5858

5959
checkDataSpecificationIEC61360( semanticIds, env );
6060
}
@@ -70,7 +70,7 @@ void testGenerateAasxFromSammAspectWithEntity() throws IOException, Deserializat
7070
assertEquals( 1, collection.getValues().size(), "Not exactly one Element in SubmodelElementCollection" );
7171
assertEquals( "entityProperty", collection.getValues().stream().findFirst().get().getIdShort() );
7272

73-
getDataSpecificationIEC61360( "urn:samm:org.eclipse.esmf.samm.test:1.0.0#testProperty", env );
73+
getDataSpecificationIEC61360( "urn:samm:org.eclipse.esmf.test:1.0.0#testProperty", env );
7474
}
7575

7676
@Test
@@ -82,7 +82,7 @@ void testGenerateAasxFromSammAspectWithCollection() throws IOException, Deserial
8282
assertTrue( submodelElement instanceof SubmodelElementCollection, "SubmodelElement is not a SubmodelElementCollection" );
8383
assertEquals( "testProperty", submodelElement.getIdShort() );
8484

85-
getDataSpecificationIEC61360( "urn:samm:org.eclipse.esmf.samm.test:1.0.0#testProperty", env );
85+
getDataSpecificationIEC61360( "urn:samm:org.eclipse.esmf.test:1.0.0#testProperty", env );
8686
}
8787

8888
@Test
@@ -95,7 +95,7 @@ void testGenerateAasxFromSammAspectWithList() throws IOException, Deserializatio
9595
assertEquals( "testProperty", submodelElement.getIdShort() );
9696
assertTrue( ((SubmodelElementCollection) submodelElement).getOrdered(), "List is not ordered." );
9797

98-
getDataSpecificationIEC61360( "urn:samm:org.eclipse.esmf.samm.test:1.0.0#testProperty", env );
98+
getDataSpecificationIEC61360( "urn:samm:org.eclipse.esmf.test:1.0.0#testProperty", env );
9999
}
100100

101101
@Test
@@ -109,7 +109,7 @@ void testGenerateAasxFromSammAspectWithSet() throws IOException, Deserialization
109109
assertFalse( ((SubmodelElementCollection) submodelElement).getOrdered(), "Set is ordered." );
110110
assertFalse( ((SubmodelElementCollection) submodelElement).getAllowDuplicates(), "Set allows duplicates." );
111111

112-
getDataSpecificationIEC61360( "urn:samm:org.eclipse.esmf.samm.test:1.0.0#testProperty", env );
112+
getDataSpecificationIEC61360( "urn:samm:org.eclipse.esmf.test:1.0.0#testProperty", env );
113113
}
114114

115115
@Test
@@ -123,7 +123,7 @@ void testGenerateAasxFromSammAspectWithSortedSet() throws IOException, Deseriali
123123
assertTrue( ((SubmodelElementCollection) submodelElement).getOrdered(), "Sorted Set is not ordered." );
124124
assertFalse( ((SubmodelElementCollection) submodelElement).getAllowDuplicates(), "Sorted Set allows duplicates." );
125125

126-
getDataSpecificationIEC61360( "urn:samm:org.eclipse.esmf.samm.test:1.0.0#testProperty", env );
126+
getDataSpecificationIEC61360( "urn:samm:org.eclipse.esmf.test:1.0.0#testProperty", env );
127127
}
128128

129129
@Test
@@ -136,8 +136,8 @@ void testGenerateAasxFromSammAspectWithEitherWithComplexTypes() throws IOExcepti
136136
assertTrue( elementCollection.getValues().stream().anyMatch( x -> testValues.contains( x.getIdShort() ) ), "Neither left nor right entity contained." );
137137

138138
final Set<String> semanticIds =
139-
Set.of( "urn:samm:org.eclipse.esmf.samm.test:1.0.0#result",
140-
"urn:samm:org.eclipse.esmf.samm.test:1.0.0#error" );
139+
Set.of( "urn:samm:org.eclipse.esmf.test:1.0.0#result",
140+
"urn:samm:org.eclipse.esmf.test:1.0.0#error" );
141141

142142
checkDataSpecificationIEC61360( semanticIds, env );
143143
}
@@ -150,7 +150,7 @@ void testGenerateAasxFromSammAspectWithQuantifiable() throws IOException, Deseri
150150
final SubmodelElement element = env.getSubmodels().get( 0 ).getSubmodelElements().get( 0 );
151151
assertEquals( "testProperty", element.getIdShort() );
152152

153-
final DataSpecificationIEC61360 dataSpecificationContent = getDataSpecificationIEC61360( "urn:samm:org.eclipse.esmf.samm.test:1.0.0#testProperty", env );
153+
final DataSpecificationIEC61360 dataSpecificationContent = getDataSpecificationIEC61360( "urn:samm:org.eclipse.esmf.test:1.0.0#testProperty", env );
154154

155155
assertEquals( "percent", dataSpecificationContent.getUnit(), "Unit is not percent" );
156156
}
@@ -168,12 +168,12 @@ void testGenerateAasxFromSammWithConstraint() throws IOException, Deserializatio
168168
assertEquals( "stringLcProperty", submodelElement.getIdShort() );
169169

170170
final Set<String> semanticIds =
171-
Set.of( "urn:samm:org.eclipse.esmf.samm.test:1.0.0#stringLcProperty",
172-
"urn:samm:org.eclipse.esmf.samm.test:1.0.0#doubleRcProperty",
173-
"urn:samm:org.eclipse.esmf.samm.test:1.0.0#intRcProperty",
174-
"urn:samm:org.eclipse.esmf.samm.test:1.0.0#bigIntRcProperty",
175-
"urn:samm:org.eclipse.esmf.samm.test:1.0.0#floatRcProperty",
176-
"urn:samm:org.eclipse.esmf.samm.test:1.0.0#stringRegexcProperty" );
171+
Set.of( "urn:samm:org.eclipse.esmf.test:1.0.0#stringLcProperty",
172+
"urn:samm:org.eclipse.esmf.test:1.0.0#doubleRcProperty",
173+
"urn:samm:org.eclipse.esmf.test:1.0.0#intRcProperty",
174+
"urn:samm:org.eclipse.esmf.test:1.0.0#bigIntRcProperty",
175+
"urn:samm:org.eclipse.esmf.test:1.0.0#floatRcProperty",
176+
"urn:samm:org.eclipse.esmf.test:1.0.0#stringRegexcProperty" );
177177

178178
checkDataSpecificationIEC61360( semanticIds, env );
179179
}
@@ -193,7 +193,7 @@ void testGenerateAasxFromSammAspectWithCode() throws IOException, Deserializatio
193193
final Property submodelElement = (Property) env.getSubmodels().get( 0 ).getSubmodelElements().get( 0 );
194194
assertEquals( "http://www.w3.org/2001/XMLSchema#int", submodelElement.getValueType(), "Value type not int" );
195195

196-
getDataSpecificationIEC61360( "urn:samm:org.eclipse.esmf.samm.test:1.0.0#testProperty", env );
196+
getDataSpecificationIEC61360( "urn:samm:org.eclipse.esmf.test:1.0.0#testProperty", env );
197197
}
198198

199199
@Test

core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/diagram/Aspect2BoxModelTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public void testSeeAttributesArePresentExpectSuccess( final KnownVersion metaMod
4747
final String entriesSelectorStatement = ":AspectWithMultipleSeeAttributesAspect :entries *";
4848
context.executeAttributeIsPresentTest( sparqlQueryFileName, boxSelectorStatement, entriesSelectorStatement,
4949
totalNumberOfExpectedEntries, indexOfSeeValueEntry, expectedSeeEntryTitle,
50-
"http://example.com/me, http://example.com/" );
50+
"http://example.com/, http://example.com/me" );
5151
}
5252

5353
@ParameterizedTest

0 commit comments

Comments
 (0)