Description
When workspace.trim() removes an element, relationships to that element are left in the model.
Steps to reproduce
Test case:
@Test
void trim_WhenTheDestinationOfAnElementIsRemoved() {
Workspace workspace = new Workspace("Name", "Description");
SoftwareSystem a = workspace.getModel().addSoftwareSystem("A");
SoftwareSystem b = workspace.getModel().addSoftwareSystem("B");
a.uses(b, "Uses");
SystemLandscapeView view = workspace.getViews().createSystemLandscapeView("key", "Description");
view.add(a);
workspace.trim();
assertEquals(0, a.getRelationships().size());
}
Screenshot
No response
Code sample
No response
Configuration
No response
Severity
Minor
Priority
I'm willing to fix this myself and raise a PR (please confirm approach first)
More information
No response