Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workspace.trim() is not correctly removing relationships when the destination of a relationship is removed from the workspace #306

Closed
simonbrowndotje opened this issue Jun 18, 2024 · 1 comment
Labels

Comments

@simonbrowndotje
Copy link
Contributor

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

@simonbrowndotje
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant