Skip to content

Commit 120a814

Browse files
committed
Add two fixes to make tests rub
Signed-off-by: Johannes Kristan <[email protected]>
1 parent 9acd7c4 commit 120a814

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/esmf-aspect-model-aas-generator/src/main/java/org/eclipse/esmf/aspectmodel/aas/AspectModelAASVisitor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ private Optional<SubmodelElement> mapText( final Property property, final Contex
251251
if ( property.isOptional() ) {
252252
LOG.warn( String.format( "Having a recursive Property %s which is optional. Will be excluded from AAS mapping.",
253253
property.getAspectModelUrn().map( AspectModelUrn::toString ).orElse( "(unknown)" ) ) );
254-
return Optional.of(defaultResultForProperty.get());
254+
return defaultResultForProperty;
255255
} else {
256256
LOG.error( String.format( "Having a recursive property: %s which is not optional is not valid. Check the model. Property will be excluded from AAS mapping.",
257257
property.getAspectModelUrn().map( AspectModelUrn::toString ).orElse( "(unknown)" ) ) );

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ void testGenerateAasxFromBammAspectWithQuantifiable() throws IOException, Deseri
162162
final SubmodelElement element = env.getSubmodels().get( 0 ).getSubmodelElements().get( 0 );
163163
assertEquals( "id_testProperty", element.getIdShort() );
164164

165-
final DataSpecificationContent dataSpecificationContent = getDataSpecificationIEC61360( "urn:bamm:io.openmanufacturing.test:1.0.0#testProperty", env );
165+
final DataSpecificationContent dataSpecificationContent = getDataSpecificationIEC61360( "urn:samm:org.eclipse.esmf.test:1.0.0#testProperty", env );
166166

167167
assertEquals( "percent", ((DataSpecificationIec61360)dataSpecificationContent).getUnit(), "Unit is not percent" );
168168
}

0 commit comments

Comments
 (0)