@Test public void test_createDynamicView() { Workspace workspace = new Workspace("Name", "Description"); DynamicView dynamicView = workspace.getViews().createDynamicView("key", "Description"); assertEquals("key", dynamicView.getKey()); assertEquals("Description", dynamicView.getDescription()); assertNull(dynamicView.getSoftwareSystem()); assertNull(dynamicView.getElement()); }
@Test public void test_createDynamicViewForSoftwareSystem() { Workspace workspace = new Workspace("Name", "Description"); SoftwareSystem softwareSystem = workspace.getModel().addSoftwareSystem("Name", "Description"); DynamicView dynamicView = workspace.getViews().createDynamicView(softwareSystem, "key", "Description"); assertEquals("key", dynamicView.getKey()); assertEquals("Description", dynamicView.getDescription()); assertSame(softwareSystem, dynamicView.getSoftwareSystem()); assertSame(softwareSystem, dynamicView.getElement()); }
@Test public void test_createDynamicViewForContainer() { Workspace workspace = new Workspace("Name", "Description"); SoftwareSystem softwareSystem = workspace.getModel().addSoftwareSystem("Name", "Description"); Container container = softwareSystem.addContainer("Container", "Description", "Technology"); DynamicView dynamicView = workspace.getViews().createDynamicView(container, "key", "Description"); assertEquals("key", dynamicView.getKey()); assertEquals("Description", dynamicView.getDescription()); assertSame(softwareSystem, dynamicView.getSoftwareSystem()); assertSame(container, dynamicView.getElement()); }