/** * Creates a container view, where the scope of the view is the specified software system. * * @param softwareSystem the SoftwareSystem object representing the scope of the view * @param key the key for the view (must be unique) * @param description a description of the view * @return a ContainerView object * @throws IllegalArgumentException if the software system is null or the key is not unique */ public ContainerView createContainerView(SoftwareSystem softwareSystem, String key, String description) { assertThatTheSoftwareSystemIsNotNull(softwareSystem); assertThatTheViewKeyIsSpecifiedAndUnique(key); ContainerView view = new ContainerView(softwareSystem, key, description); view.setViewSet(this); containerViews.add(view); return view; }
@Before public void setUp() { softwareSystem = model.addSoftwareSystem(Location.Internal, "The System", "Description"); view = new ContainerView(softwareSystem, "containers", "Description"); }
assertTrue(view.getElements().contains(new ElementView(softwareSystemB))); view = new ContainerView(softwareSystem, "containers", "Description"); view.addNearestNeighbours(softwareSystemA); assertTrue(view.getElements().contains(new ElementView(webApplication))); view = new ContainerView(softwareSystem, "containers", "Description"); view.addNearestNeighbours(webApplication);
views.setSystemContextViews(Collections.singleton(systemContextView)); ContainerView containerView = new ContainerView(); containerView.setSoftwareSystemId(softwareSystem.getId()); containerView.setElements(elementViewsFor(container));