Skip to content

Commit

Permalink
[Possible] DiagramModelReferenceProxy#getType() should return the typ…
Browse files Browse the repository at this point in the history
…e of the DiagramModelReference object

- It should return "diagram-model-reference" not the type of the referenced diagram model

- This aligns it with "diagram-model-note", "diagram-model-group" and "diagram-model-connection"

- But see #95
  • Loading branch information
Phillipus committed Oct 10, 2024
1 parent 6243a11 commit 90ca627
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,19 @@ public void runOnceBeforeEachTest() {
actualTestProxy = (DiagramModelReferenceProxy)testProxy;
}

@Override
@Test
public void getType() {
// The type should be the IDiagramModelReference, not the referenced diagram model
assertEquals(ModelUtil.getKebabCase(testProxy.getEObject().eClass().getName()), testProxy.getType());
}

@Override
public void attr_Type() {
// The type should be the IDiagramModelReference, not the referenced diagram model
assertEquals(ModelUtil.getKebabCase(testProxy.getEObject().eClass().getName()), testProxy.getType());
}

@Override
@Test
public void get_ReturnsCorrectProxy() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,9 @@ protected EObject getReferencedEObject() {
return getEObject().getReferencedModel();
}

@Override
public String getType() {
// The type should be the IDiagramModelReference, not the referenced diagram model
return ModelUtil.getKebabCase(getEObject().eClass().getName());
}
}

0 comments on commit 90ca627

Please sign in to comment.