Tabnine Logo
ViewSet.createDeploymentView
Code IndexAdd Tabnine to your IDE (free)

How to use
createDeploymentView
method
in
com.structurizr.view.ViewSet

Best Java code snippets using com.structurizr.view.ViewSet.createDeploymentView (Showing top 20 results out of 315)

origin: structurizr/java

@Test
public void test_getName_WithNoSoftwareSystemAndNoEnvironment() {
  deploymentView = views.createDeploymentView("deployment", "Description");
  assertEquals("Deployment", deploymentView.getName());
}
origin: structurizr/java

@Test
public void test_addAllDeploymentNodes_DoesNothing_WhenThereAreNoTopLevelDeploymentNodes() {
  deploymentView = views.createDeploymentView("deployment", "Description");
  deploymentView.addAllDeploymentNodes();
  assertEquals(0, deploymentView.getElements().size());
}
origin: structurizr/java

@Test
public void test_addRelationship_ThrowsAnException_WhenPassedNull() {
  try {
    deploymentView = views.createDeploymentView("key", "Description");
    deploymentView.add((Relationship)null);
    fail();
  } catch (IllegalArgumentException iae) {
    assertEquals("A relationship must be specified.", iae.getMessage());
  }
}
origin: structurizr/java

@Test
public void test_addDeploymentNode_ThrowsAnException_WhenPassedNull() {
  try {
    deploymentView = views.createDeploymentView("key", "Description");
    deploymentView.add((DeploymentNode)null);
    fail();
  } catch (IllegalArgumentException iae) {
    assertEquals("A deployment node must be specified.", iae.getMessage());
  }
}
origin: structurizr/java

@Test
public void test_createDynamicViewForASoftwareSystem_ThrowsAnException_WhenADuplicateKeyIsUsed() {
  Workspace workspace = new Workspace("Name", "Description");
  SoftwareSystem softwareSystem = workspace.getModel().addSoftwareSystem("Name", "Description");
  workspace.getViews().createDeploymentView(softwareSystem, "dynamic", "Description");
  try {
    workspace.getViews().createDeploymentView(softwareSystem, "dynamic", "Description");
    fail();
  } catch (IllegalArgumentException iae) {
    assertEquals("A view with the key dynamic already exists.", iae.getMessage());
  }
}
origin: structurizr/java

@Test
public void test_createDeploymentViewForASoftwareSystem_ThrowsAnException_WhenADuplicateKeyIsUsed() {
  Workspace workspace = new Workspace("Name", "Description");
  SoftwareSystem softwareSystem = workspace.getModel().addSoftwareSystem("Name", "Description");
  workspace.getViews().createDeploymentView(softwareSystem, "deployment", "Description");
  try {
    workspace.getViews().createDeploymentView(softwareSystem, "deployment", "Description");
    fail();
  } catch (IllegalArgumentException iae) {
    assertEquals("A view with the key deployment already exists.", iae.getMessage());
  }
}
origin: structurizr/java

@Test
public void test_createDeploymentView_ThrowsAnException_WhenADuplicateKeyIsUsed() {
  Workspace workspace = new Workspace("Name", "Description");
  SoftwareSystem softwareSystem = workspace.getModel().addSoftwareSystem("Name", "Description");
  workspace.getViews().createDeploymentView(softwareSystem, "deployment", "Description");
  try {
    workspace.getViews().createDeploymentView(softwareSystem, "deployment", "Description");
    fail();
  } catch (IllegalArgumentException iae) {
    assertEquals("A view with the key deployment already exists.", iae.getMessage());
  }
}
origin: structurizr/java

@Test
public void test_createDeploymentViewForASoftwareSystem_ThrowsAnException_WhenANullSoftwareSystemIsSpecified() {
  try {
    new Workspace("", "").getViews().createDeploymentView((SoftwareSystem)null, "key", "Description");
    fail();
  } catch (IllegalArgumentException iae) {
    assertEquals("A software system must be specified.", iae.getMessage());
  }
}
origin: structurizr/java

@Test
public void test_addAllDeploymentNodes_DoesNothing_WhenThereAreTopLevelDeploymentNodesButNoContainerInstances() {
  deploymentView = views.createDeploymentView("deployment", "Description");
  model.addDeploymentNode("Deployment Node", "Description", "Technology");
  deploymentView.addAllDeploymentNodes();
  assertEquals(0, deploymentView.getElements().size());
}
origin: structurizr/java

@Test
public void test_createDeploymentView_ThrowsAnException_WhenANullKeyIsSpecified() {
  try {
    Workspace workspace = new Workspace("Name", "Description");
    workspace.getViews().createDeploymentView(null, "Description");
    fail();
  } catch (IllegalArgumentException iae) {
    assertEquals("A key must be specified.", iae.getMessage());
  }
}
origin: structurizr/java

@Test
public void test_createDeploymentView_ThrowsAnException_WhenAnEmptyKeyIsSpecified() {
  try {
    Workspace workspace = new Workspace("Name", "Description");
    workspace.getViews().createDeploymentView(" ", "Description");
    fail();
  } catch (IllegalArgumentException iae) {
    assertEquals("A key must be specified.", iae.getMessage());
  }
}
origin: structurizr/java

@Test
public void test_getName_WithASoftwareSystemAndNoEnvironment() {
  SoftwareSystem softwareSystem = model.addSoftwareSystem("Software System", "");
  deploymentView = views.createDeploymentView(softwareSystem, "deployment", "Description");
  assertEquals("Software System - Deployment", deploymentView.getName());
}
origin: structurizr/java

@Test
public void test_getName_WithNoSoftwareSystemAndAnEnvironment() {
  deploymentView = views.createDeploymentView("deployment", "Description");
  deploymentView.setEnvironment("Live");
  assertEquals("Deployment - Live", deploymentView.getName());
}
origin: structurizr/java

@Test
public void test_getName_WithASoftwareSystemAndAnEnvironment() {
  SoftwareSystem softwareSystem = model.addSoftwareSystem("Software System", "");
  deploymentView = views.createDeploymentView(softwareSystem, "deployment", "Description");
  deploymentView.setEnvironment("Live");
  assertEquals("Software System - Deployment - Live", deploymentView.getName());
}
origin: structurizr/java

@Test
public void test_copyLayoutInformationFrom_DoesNotDoAnythingIfThereIsNoDeploymentViewToCopyInformationFrom() {
  Workspace workspace1 = createWorkspace();
  Workspace workspace2 = createWorkspace();
  DeploymentNode deploymentNode2 = workspace2.getModel().getDeploymentNodeWithName("Deployment Node");
  DeploymentView view2 = workspace2.getViews().createDeploymentView("key", "Description");
  view2.add(deploymentNode2);
  workspace2.getViews().copyLayoutInformationFrom(workspace1.getViews());
  assertEquals(0, view2.getElements().stream().filter(ev -> ev.getElement() instanceof ContainerInstance).findFirst().get().getX()); // default
  assertEquals(0, view2.getElements().stream().filter(ev -> ev.getElement() instanceof ContainerInstance).findFirst().get().getY()); // default
  assertNull(view2.getPaperSize()); // default
}
origin: structurizr/java

@Test
public void test_createDeploymentViewForASoftwareSystem_ThrowsAnException_WhenANullKeyIsSpecified() {
  try {
    Workspace workspace = new Workspace("Name", "Description");
    SoftwareSystem softwareSystem = workspace.getModel().addSoftwareSystem("Software System", "Description");
    workspace.getViews().createDeploymentView(softwareSystem, null, "Description");
    fail();
  } catch (IllegalArgumentException iae) {
    assertEquals("A key must be specified.", iae.getMessage());
  }
}
origin: structurizr/java

@Test
public void test_createDeploymentViewForASoftwareSystem_ThrowsAnException_WhenAnEmptyKeyIsSpecified() {
  try {
    Workspace workspace = new Workspace("Name", "Description");
    SoftwareSystem softwareSystem = workspace.getModel().addSoftwareSystem("Software System", "Description");
    workspace.getViews().createDeploymentView(softwareSystem, " ", "Description");
    fail();
  } catch (IllegalArgumentException iae) {
    assertEquals("A key must be specified.", iae.getMessage());
  }
}
origin: structurizr/java

@Test
public void test_addAllDeploymentNodes_AddsDeploymentNodesAndContainerInstances_WhenThereAreTopLevelDeploymentNodesWithContainerInstances() {
  SoftwareSystem softwareSystem = model.addSoftwareSystem("Software System", "");
  Container container = softwareSystem.addContainer("Container", "Description", "Technology");
  DeploymentNode deploymentNode = model.addDeploymentNode("Deployment Node", "Description", "Technology");
  ContainerInstance containerInstance = deploymentNode.add(container);
  deploymentView = views.createDeploymentView(softwareSystem, "deployment", "Description");
  deploymentView.addAllDeploymentNodes();
  assertEquals(2, deploymentView.getElements().size());
  assertTrue(deploymentView.getElements().contains(new ElementView(deploymentNode)));
  assertTrue(deploymentView.getElements().contains(new ElementView(containerInstance)));
}
origin: structurizr/java

@Test
public void test_createDeploymentView() {
  Workspace workspace = new Workspace("Name", "Description");
  DeploymentView deploymentView = workspace.getViews().createDeploymentView("key", "Description");
  assertEquals("key", deploymentView.getKey());
  assertEquals("Description", deploymentView.getDescription());
  assertNull(deploymentView.getSoftwareSystem());
}
origin: structurizr/java

@Test
public void test_createDeploymentViewForSoftwareSystem() {
  Workspace workspace = new Workspace("Name", "Description");
  SoftwareSystem softwareSystem = workspace.getModel().addSoftwareSystem("Name", "Description");
  DeploymentView deploymentView = workspace.getViews().createDeploymentView(softwareSystem, "key", "Description");
  assertEquals("key", deploymentView.getKey());
  assertEquals("Description", deploymentView.getDescription());
  assertSame(softwareSystem, deploymentView.getSoftwareSystem());
}
com.structurizr.viewViewSetcreateDeploymentView

Javadoc

Creates a deployment view, where the scope of the view is the specified software system.

Popular methods of ViewSet

  • getConfiguration
    Gets the configuration object associated with this set of views.
  • getSystemContextViews
    Gets the set of system context views.
  • getSystemLandscapeViews
    Gets the set of system landscape views.
  • createComponentView
    Creates a component view, where the scope of the view is the specified container.
  • createDynamicView
    Creates a dynamic view.
  • createSystemContextView
    Creates a system context view, where the scope of the view is the specified software system.
  • createSystemLandscapeView
    Creates a system landscape view.
  • getComponentViews
    Gets the set of component views.
  • getContainerViews
    Gets the set of container views.
  • getDynamicViews
    Gets the set of dynamic views.
  • createContainerView
    Creates a container view, where the scope of the view is the specified software system.
  • getDeploymentViews
    Gets the set of dynamic views.
  • createContainerView,
  • getDeploymentViews,
  • copyLayoutInformationFrom,
  • createFilteredView,
  • assertThatTheContainerIsNotNull,
  • assertThatTheSoftwareSystemIsNotNull,
  • assertThatTheViewIsNotNull,
  • assertThatTheViewKeyIsSpecifiedAndUnique,
  • findView

Popular in Java

  • Finding current android device location
  • getContentResolver (Context)
  • setRequestProperty (URLConnection)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now