Skip to content

Commit 79992a9

Browse files
committed
Fix tests
1 parent c2524ab commit 79992a9

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

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

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -519,14 +519,16 @@ void testCharacteristicInstantiationForPropertyWithExampleValue() throws IOExcep
519519

520520
result.assertMetaModelBaseAttributesForProperties( "MetaAspectWithCollection", expectedBaseAttributes );
521521

522-
final String expectedTestPropertyCharacteristicConstructorCall =
523-
"new DefaultCollection(MetaModelBaseAttributes.builder().withUrn(AspectModelUrn.fromUrn(NAMESPACE + \"TestCollection\"))"
524-
+ ".withPreferredName(Locale.forLanguageTag(\"en\"), \"Test Collection\").withDescription(Locale.forLanguageTag(\"en\")"
525-
+ ", \"This is a test collection.\").withSee(\"http://example.com/\").build(), Optional.of(new DefaultScalar"
526-
+ "(\"http://www.w3.org/2001/XMLSchema#string\")), Optional.empty())";
522+
final String expectedExampleValue = "Optional.of(new DefaultScalarValue(\"Example Value\", new DefaultScalar(\"http://www.w3"
523+
+ ".org/2001/XMLSchema#string\")))";
527524

528-
result.assertConstructorArgumentForProperties( "MetaAspectWithCollection",
529-
ImmutableMap.<String, String> builder().put( "TEST_PROPERTY", expectedTestPropertyCharacteristicConstructorCall ).build(), 1 );
525+
result.assertConstructorArgumentForProperties(
526+
"MetaAspectWithCollection",
527+
ImmutableMap.<String, String> builder()
528+
.put( "TEST_PROPERTY", expectedExampleValue )
529+
.build(),
530+
2
531+
);
530532
}
531533

532534
@Test

0 commit comments

Comments
 (0)