@@ -142,7 +142,7 @@ void generateAasxWithAspectDataForCollectionProperty() throws DeserializationExc
142
142
143
143
@ Test
144
144
void generateAasxWithAspectDataForCollectionPropertyWithCustomMapper () throws DeserializationException {
145
- AspectModelAasGenerator customGenerator = new AspectModelAasGenerator ( List .of ( new IntegerCollectionMapper () ) );
145
+ final AspectModelAasGenerator customGenerator = new AspectModelAasGenerator ( List .of ( new IntegerCollectionMapper () ) );
146
146
final Environment env = getAssetAdministrationShellFromAspectWithData ( TestAspect .ASPECT_WITH_COLLECTION_OF_SIMPLE_TYPE ,
147
147
customGenerator );
148
148
assertThat ( env .getSubmodels () )
@@ -357,17 +357,17 @@ void testGenerateAasxFromAspectModelWithEnumeration() throws DeserializationExce
357
357
// anonymous enumeration in test has no urn for enum values but is required for Concept
358
358
// Description referencing
359
359
public void testGeneration ( final TestAspect testAspect ) throws DeserializationException {
360
- final String aspectAsString = aspectToString ( testAspect );
361
- final byte [] xmlFile = aspectAsString .getBytes ();
360
+ final String aasXmlString = aspectToAasXml ( testAspect );
361
+ final byte [] aasXmlInput = aasXmlString .getBytes ();
362
362
363
- final String aasXml = new String ( xmlFile );
363
+ final String aasXml = new String ( aasXmlInput );
364
364
assertThat ( aasXml ).doesNotContain ( "DefaultScalarValue[" );
365
365
assertThat ( aasXml ).doesNotContain ( "DefaultEntity[" );
366
366
assertThat ( aasXml ).doesNotContain ( "Optional[" );
367
367
368
- final Environment env = loadAasx ( new ByteArrayInputStream ( xmlFile ) );
368
+ final Environment env = loadAasx ( new ByteArrayInputStream ( aasXmlInput ) );
369
369
assertThat ( env .getSubmodels () ).isNotEmpty ();
370
- validate ( new ByteArrayInputStream ( xmlFile ) );
370
+ validate ( new ByteArrayInputStream ( aasXmlInput ) );
371
371
}
372
372
373
373
@ Test
@@ -455,7 +455,7 @@ private Environment getAssetAdministrationShellFromAspectWithData( final TestAsp
455
455
return loadAasx ( generator .generateAsByteArray ( AasFileFormat .XML , aspect , aspectData ) );
456
456
}
457
457
458
- private String aspectToString ( final TestAspect testAspect ) {
458
+ private String aspectToAasXml ( final TestAspect testAspect ) {
459
459
final Aspect aspect = TestResources .load ( testAspect ).aspect ();
460
460
return new String ( generator .generateAsByteArray ( AasFileFormat .XML , aspect ), StandardCharsets .UTF_8 );
461
461
}
0 commit comments