Skip to content

Commit

Permalink
ZooModelTest: change enum test to create enumeration + literal, as in #…
Browse files Browse the repository at this point in the history
  • Loading branch information
agarciadom committed Mar 8, 2024
1 parent dab75b8 commit 65fce88
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -585,8 +585,17 @@ public void allProfiles() throws Exception {
@Test
public void addEnumerationLiteral() throws Exception {
EolModule module = createEOLModule();
module.parse("return new EnumerationLiteral();");
assertNotNull(module.execute());
module.parse(String.join("\n",
"var enum = new Enumeration;",
"enum.name = \"MyEnum\";",
"var literal = new EnumerationLiteral;",
"literal.name = \"FIRST\";",
"enum.ownedLiteral.add(literal);",
"return enum;"
));

MDModelElement result = (MDModelElement) module.execute();
assertEquals("uml::Enumeration", result.getTypeName());
}

private void assumeTypeExists(String typeName) {
Expand Down

0 comments on commit 65fce88

Please sign in to comment.