diff --git a/build.gradle b/build.gradle index 7c98654..79ba712 100644 --- a/build.gradle +++ b/build.gradle @@ -27,7 +27,7 @@ targetCompatibility = 1.8 description = 'Structurizr DSL' group = 'com.structurizr' -version = '1.24.0' +version = '1.25.0' test { useJUnitPlatform() diff --git a/docs/changelog.md b/docs/changelog.md index 097664a..c689553 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,5 +1,9 @@ # Changelog +## 1.25.0 (3rd February 2023) + +- Fixes some clashing issues with automatic key generation for views. + ## 1.24.0 (28th January 2023) - More variables are exposed to scripts, based upon where the script is defined (`element`, `relationship`, `view`). diff --git a/docs/language-reference.md b/docs/language-reference.md index 1b23ede..c6071c7 100644 --- a/docs/language-reference.md +++ b/docs/language-reference.md @@ -78,7 +78,7 @@ Please see the [DSL cookbook](cookbook) for a tutorial guide to the Structurizr In addition, workspaces are subject to the following rules: -- Each view must have a unique "key" (this is autogenerated if not specified). +- Each view must have a unique "key" (this is generated for you if not specified; __warning: you will likely lose manual layout information when using automatically generated view keys__). - Software and people names must be unique. - Container names must be unique within the context of a software system. - Component names must be unique within the context of a container. @@ -927,8 +927,6 @@ Or, if you're extending a JSON-based workspace, you can reference an element by See [ref.dsl](../src/test/dsl/ref.dsl) for some usage examples. -__Please note that `!ref` is currently an experimental feature.__ - ### views Each workspace can also contain one or more views, defined with the `views` block. @@ -966,6 +964,8 @@ systemLandscape [key] [description] { } ``` +A view key will be generated for you if not specified; __you will likely lose manual layout information when using automatically generated view keys__. + Permitted children: - [include](#include) @@ -986,6 +986,8 @@ systemContext [key] [description] { } ``` +A view key will be generated for you if not specified; __you will likely lose manual layout information when using automatically generated view keys__. + Permitted children: - [include](#include) @@ -1006,6 +1008,8 @@ container [key] [description] { } ``` +A view key will be generated for you if not specified; __you will likely lose manual layout information when using automatically generated view keys__. + Permitted children: - [include](#include) @@ -1026,6 +1030,8 @@ component [key] [description] { } ``` +A view key will be generated for you if not specified; __you will likely lose manual layout information when using automatically generated view keys__. + Permitted children: - [include](#include) @@ -1068,6 +1074,8 @@ The first property defines the scope of the view, and therefore what can be adde - Software system scope: People, other software systems, and containers. - Container scope: People, other software systems, other containers, and components. +A view key will be generated for you if not specified; __you will likely lose manual layout information when using automatically generated view keys__. + Unlike the other diagram types, Dynamic views are created by specifying the relationships that should be added to the view, within the `dynamic` block, as follows: ``` @@ -1101,6 +1109,8 @@ The first property defines the scope of the view, and the second property define - `*` scope: All deployment nodes, infrastructure nodes, and container instances within the deployment environment. - Software system scope: All deployment nodes and infrastructure nodes within the deployment environment. Container instances within the deployment environment that belong to the software system. +A view key will be generated for you if not specified; __you will likely lose manual layout information when using automatically generated view keys__. + Permitted children: - [include](#include) diff --git a/src/main/java/com/structurizr/dsl/AbstractViewParser.java b/src/main/java/com/structurizr/dsl/AbstractViewParser.java new file mode 100644 index 0000000..fda2f86 --- /dev/null +++ b/src/main/java/com/structurizr/dsl/AbstractViewParser.java @@ -0,0 +1,43 @@ +package com.structurizr.dsl; + +import com.structurizr.Workspace; +import com.structurizr.view.FilteredView; +import com.structurizr.view.SystemLandscapeView; +import com.structurizr.view.View; + +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + +abstract class AbstractViewParser extends AbstractParser { + + protected String generateViewKey(Workspace workspace, String prefix) { + int counter = 1; + String key = prefix + "-" + counter; + + while (hasViewWithKey(workspace, key)) { + counter++; + key = prefix + "-" + counter; + } + + return key; + } + + protected boolean hasViewWithKey(Workspace workspace, String key) { + Set views = new HashSet<>(); + views.addAll(workspace.getViews().getCustomViews()); + views.addAll(workspace.getViews().getSystemLandscapeViews()); + views.addAll(workspace.getViews().getSystemContextViews()); + views.addAll(workspace.getViews().getContainerViews()); + views.addAll(workspace.getViews().getComponentViews()); + views.addAll(workspace.getViews().getDynamicViews()); + views.addAll(workspace.getViews().getDeploymentViews()); + + Collection filteredViews = workspace.getViews().getFilteredViews(); + + return + views.stream().anyMatch(view -> view.getKey().equals(key)) || + filteredViews.stream().anyMatch(view -> view.getKey().equals(key)); + } + +} \ No newline at end of file diff --git a/src/main/java/com/structurizr/dsl/ComponentViewParser.java b/src/main/java/com/structurizr/dsl/ComponentViewParser.java index 5b318a3..f9fefbb 100644 --- a/src/main/java/com/structurizr/dsl/ComponentViewParser.java +++ b/src/main/java/com/structurizr/dsl/ComponentViewParser.java @@ -5,7 +5,7 @@ import com.structurizr.model.Element; import com.structurizr.view.ComponentView; -final class ComponentViewParser extends AbstractParser { +final class ComponentViewParser extends AbstractViewParser { private static final String GRAMMAR = "component [key] [description] {"; @@ -45,7 +45,7 @@ ComponentView parse(DslContext context, Tokens tokens) { if (tokens.includes(KEY_INDEX)) { key = tokens.get(KEY_INDEX); } else { - key = removeNonWordCharacters(container.getSoftwareSystem().getName()) + "-" + removeNonWordCharacters(container.getName()) + "-" + VIEW_TYPE; + key = generateViewKey(workspace, VIEW_TYPE); } validateViewKey(key); diff --git a/src/main/java/com/structurizr/dsl/ContainerViewParser.java b/src/main/java/com/structurizr/dsl/ContainerViewParser.java index 403068e..16ec414 100644 --- a/src/main/java/com/structurizr/dsl/ContainerViewParser.java +++ b/src/main/java/com/structurizr/dsl/ContainerViewParser.java @@ -5,7 +5,7 @@ import com.structurizr.model.SoftwareSystem; import com.structurizr.view.ContainerView; -final class ContainerViewParser extends AbstractParser { +final class ContainerViewParser extends AbstractViewParser { private static final String GRAMMAR = "container [key] [description] {"; @@ -45,7 +45,7 @@ ContainerView parse(DslContext context, Tokens tokens) { if (tokens.includes(KEY_INDEX)) { key = tokens.get(KEY_INDEX); } else { - key = key = removeNonWordCharacters(softwareSystem.getName()) + "-" + VIEW_TYPE; + key = generateViewKey(workspace, VIEW_TYPE); } validateViewKey(key); diff --git a/src/main/java/com/structurizr/dsl/CustomViewParser.java b/src/main/java/com/structurizr/dsl/CustomViewParser.java index 1e63cae..c33c2df 100644 --- a/src/main/java/com/structurizr/dsl/CustomViewParser.java +++ b/src/main/java/com/structurizr/dsl/CustomViewParser.java @@ -3,7 +3,7 @@ import com.structurizr.Workspace; import com.structurizr.view.CustomView; -final class CustomViewParser extends AbstractParser { +final class CustomViewParser extends AbstractViewParser { private static final String GRAMMAR = "custom [key] [title] [description] {"; @@ -28,7 +28,7 @@ CustomView parse(DslContext context, Tokens tokens) { if (tokens.includes(KEY_INDEX)) { key = tokens.get(KEY_INDEX); } else { - key = VIEW_TYPE + (context.getWorkspace().getViews().getCustomViews().size() + 1); + key = generateViewKey(workspace, VIEW_TYPE); } validateViewKey(key); diff --git a/src/main/java/com/structurizr/dsl/DeploymentViewParser.java b/src/main/java/com/structurizr/dsl/DeploymentViewParser.java index bbe7464..6c937be 100644 --- a/src/main/java/com/structurizr/dsl/DeploymentViewParser.java +++ b/src/main/java/com/structurizr/dsl/DeploymentViewParser.java @@ -6,7 +6,7 @@ import com.structurizr.model.SoftwareSystem; import com.structurizr.view.DeploymentView; -final class DeploymentViewParser extends AbstractParser { +final class DeploymentViewParser extends AbstractViewParser { private static final String GRAMMAR = "deployment <*|software system identifier> [key] [description] {"; @@ -53,7 +53,7 @@ DeploymentView parse(DslContext context, Tokens tokens) { if (tokens.includes(KEY_INDEX)) { key = tokens.get(KEY_INDEX); } else { - key = removeNonWordCharacters(environment) + "-" + VIEW_TYPE; + key = generateViewKey(workspace, VIEW_TYPE); } validateViewKey(key); @@ -68,7 +68,7 @@ DeploymentView parse(DslContext context, Tokens tokens) { if (tokens.includes(KEY_INDEX)) { key = tokens.get(KEY_INDEX); } else { - key = removeNonWordCharacters(element.getName()) + "-" + removeNonWordCharacters(environment) + "-" + VIEW_TYPE; + key = generateViewKey(workspace, VIEW_TYPE); } validateViewKey(key); diff --git a/src/main/java/com/structurizr/dsl/DynamicViewParser.java b/src/main/java/com/structurizr/dsl/DynamicViewParser.java index d271a3d..95733dc 100644 --- a/src/main/java/com/structurizr/dsl/DynamicViewParser.java +++ b/src/main/java/com/structurizr/dsl/DynamicViewParser.java @@ -8,7 +8,7 @@ import java.text.DecimalFormat; -class DynamicViewParser extends AbstractParser { +class DynamicViewParser extends AbstractViewParser { private static final String GRAMMAR = "dynamic <*|software system identifier|container identifier> [key] [description] {"; @@ -47,7 +47,7 @@ DynamicView parse(DslContext context, Tokens tokens) { if (tokens.includes(KEY_INDEX)) { key = tokens.get(KEY_INDEX); } else { - key = VIEW_TYPE + "-" + format.format(workspace.getViews().getDynamicViews().size() + 1); + key = generateViewKey(workspace, VIEW_TYPE); } validateViewKey(key); @@ -62,7 +62,7 @@ DynamicView parse(DslContext context, Tokens tokens) { if (tokens.includes(KEY_INDEX)) { key = tokens.get(KEY_INDEX); } else { - key = removeNonWordCharacters(element.getName()) + "-" + VIEW_TYPE + "-" + format.format(workspace.getViews().getDynamicViews().size() + 1); + key = generateViewKey(workspace, VIEW_TYPE); } validateViewKey(key); @@ -72,7 +72,7 @@ DynamicView parse(DslContext context, Tokens tokens) { if (tokens.includes(KEY_INDEX)) { key = tokens.get(KEY_INDEX); } else { - key = removeNonWordCharacters(container.getSoftwareSystem().getName()) + "-" + removeNonWordCharacters(container.getName()) + "-" + VIEW_TYPE + "-" + format.format(workspace.getViews().getDynamicViews().size() + 1); + key = generateViewKey(workspace, VIEW_TYPE); } validateViewKey(key); diff --git a/src/main/java/com/structurizr/dsl/FilteredViewParser.java b/src/main/java/com/structurizr/dsl/FilteredViewParser.java index 095eeb3..11085ed 100644 --- a/src/main/java/com/structurizr/dsl/FilteredViewParser.java +++ b/src/main/java/com/structurizr/dsl/FilteredViewParser.java @@ -10,7 +10,7 @@ import java.util.HashSet; import java.util.Set; -final class FilteredViewParser extends AbstractParser { +final class FilteredViewParser extends AbstractViewParser { private static final String GRAMMAR = "filtered [key] [description]"; @@ -79,11 +79,10 @@ FilteredView parse(DslContext context, Tokens tokens) { if (tokens.includes(KEY_INDEX)) { key = tokens.get(KEY_INDEX); } else { - key = baseView.getKey() + "-" + VIEW_TYPE + "-" + format.format(workspace.getViews().getDynamicViews().size() + 1); + key = generateViewKey(workspace, VIEW_TYPE); } validateViewKey(key); - return workspace.getViews().createFilteredView(baseView, key, description, filterMode, tags.toArray(new String[0])); } diff --git a/src/main/java/com/structurizr/dsl/SystemContextViewParser.java b/src/main/java/com/structurizr/dsl/SystemContextViewParser.java index 55c3931..9a5b5d3 100644 --- a/src/main/java/com/structurizr/dsl/SystemContextViewParser.java +++ b/src/main/java/com/structurizr/dsl/SystemContextViewParser.java @@ -5,7 +5,7 @@ import com.structurizr.model.SoftwareSystem; import com.structurizr.view.SystemContextView; -final class SystemContextViewParser extends AbstractParser { +final class SystemContextViewParser extends AbstractViewParser { private static final String GRAMMAR = "systemContext [key] [description] {"; @@ -45,7 +45,7 @@ SystemContextView parse(DslContext context, Tokens tokens) { if (tokens.includes(KEY_INDEX)) { key = tokens.get(KEY_INDEX); } else { - key = removeNonWordCharacters(softwareSystem.getName()) + "-" + VIEW_TYPE; + key = generateViewKey(workspace, VIEW_TYPE); } validateViewKey(key); diff --git a/src/main/java/com/structurizr/dsl/SystemLandscapeViewParser.java b/src/main/java/com/structurizr/dsl/SystemLandscapeViewParser.java index 5ba38d8..51b7767 100644 --- a/src/main/java/com/structurizr/dsl/SystemLandscapeViewParser.java +++ b/src/main/java/com/structurizr/dsl/SystemLandscapeViewParser.java @@ -3,7 +3,7 @@ import com.structurizr.Workspace; import com.structurizr.view.SystemLandscapeView; -final class SystemLandscapeViewParser extends AbstractParser { +final class SystemLandscapeViewParser extends AbstractViewParser { private static final String GRAMMAR = "systemLandscape [key] [description] {"; @@ -26,7 +26,7 @@ SystemLandscapeView parse(DslContext context, Tokens tokens) { if (tokens.includes(KEY_INDEX)) { key = tokens.get(KEY_INDEX); } else { - key = VIEW_TYPE; + key = generateViewKey(workspace, VIEW_TYPE); } validateViewKey(key); diff --git a/src/test/dsl/views-without-keys.dsl b/src/test/dsl/views-without-keys.dsl new file mode 100644 index 0000000..ec9074d --- /dev/null +++ b/src/test/dsl/views-without-keys.dsl @@ -0,0 +1,18 @@ +workspace { + + model { + person "User" + } + + views { + systemLandscape { + } + + systemLandscape { + } + + systemLandscape { + } + } + +} \ No newline at end of file diff --git a/src/test/java/com/structurizr/dsl/ComponentViewParserTests.java b/src/test/java/com/structurizr/dsl/ComponentViewParserTests.java index 671e14d..5b9fec9 100644 --- a/src/test/java/com/structurizr/dsl/ComponentViewParserTests.java +++ b/src/test/java/com/structurizr/dsl/ComponentViewParserTests.java @@ -71,7 +71,7 @@ void test_parse_CreatesAComponentView() { List views = new ArrayList<>(context.getWorkspace().getViews().getComponentViews()); assertEquals(1, views.size()); - assertEquals("Name-Container-Component", views.get(0).getKey()); + assertEquals("Component-1", views.get(0).getKey()); assertEquals("", views.get(0).getDescription()); assertTrue(views.get(0).getExternalContainerBoundariesVisible()); } diff --git a/src/test/java/com/structurizr/dsl/ContainerViewParserTests.java b/src/test/java/com/structurizr/dsl/ContainerViewParserTests.java index 4f2005f..50c4f31 100644 --- a/src/test/java/com/structurizr/dsl/ContainerViewParserTests.java +++ b/src/test/java/com/structurizr/dsl/ContainerViewParserTests.java @@ -71,7 +71,7 @@ void test_parse_CreatesAContainerView() { List views = new ArrayList<>(context.getWorkspace().getViews().getContainerViews()); assertEquals(1, views.size()); - assertEquals("Name-Container", views.get(0).getKey()); + assertEquals("Container-1", views.get(0).getKey()); assertEquals("", views.get(0).getDescription()); assertTrue(views.get(0).getExternalSoftwareSystemBoundariesVisible()); } diff --git a/src/test/java/com/structurizr/dsl/CustomViewParserTests.java b/src/test/java/com/structurizr/dsl/CustomViewParserTests.java index 4baba45..ecb3fef 100644 --- a/src/test/java/com/structurizr/dsl/CustomViewParserTests.java +++ b/src/test/java/com/structurizr/dsl/CustomViewParserTests.java @@ -31,7 +31,7 @@ void test_parse_CreatesACustomView() { List views = new ArrayList<>(context.getWorkspace().getViews().getCustomViews()); assertEquals(1, views.size()); - assertEquals("Custom1", views.get(0).getKey()); + assertEquals("Custom-1", views.get(0).getKey()); assertEquals("", views.get(0).getTitle()); assertEquals("", views.get(0).getDescription()); } diff --git a/src/test/java/com/structurizr/dsl/DeploymentViewParserTests.java b/src/test/java/com/structurizr/dsl/DeploymentViewParserTests.java index 7f15f4e..e717955 100644 --- a/src/test/java/com/structurizr/dsl/DeploymentViewParserTests.java +++ b/src/test/java/com/structurizr/dsl/DeploymentViewParserTests.java @@ -96,7 +96,7 @@ void test_parse_CreatesADeploymentViewWithNoScope() { List views = new ArrayList<>(this.views.getDeploymentViews()); assertEquals(1, views.size()); - assertEquals("Live-Deployment", views.get(0).getKey()); + assertEquals("Deployment-1", views.get(0).getKey()); assertEquals("", views.get(0).getDescription()); assertNull(views.get(0).getSoftwareSystem()); } @@ -163,7 +163,7 @@ void test_parse_CreatesADeploymentViewWithSoftwareSystemScope() { List views = new ArrayList<>(this.views.getDeploymentViews()); assertEquals(1, views.size()); - assertEquals("Name-Live-Deployment", views.get(0).getKey()); + assertEquals("Deployment-1", views.get(0).getKey()); assertEquals("", views.get(0).getDescription()); assertSame(softwareSystem, views.get(0).getSoftwareSystem()); } diff --git a/src/test/java/com/structurizr/dsl/DslTests.java b/src/test/java/com/structurizr/dsl/DslTests.java index 597771e..8f90b2c 100644 --- a/src/test/java/com/structurizr/dsl/DslTests.java +++ b/src/test/java/com/structurizr/dsl/DslTests.java @@ -59,7 +59,7 @@ void test_gettingstarted() throws Exception { assertEquals(1, views.getViews().size()); assertEquals(1, views.getSystemContextViews().size()); SystemContextView view = views.getSystemContextViews().iterator().next(); - assertEquals("SoftwareSystem-SystemContext", view.getKey()); + assertEquals("SystemContext-1", view.getKey()); assertEquals(2, view.getElements().size()); assertEquals(1, view.getRelationships().size()); } @@ -1023,4 +1023,14 @@ void test_workspaceProperties() throws Exception { assertEquals("false", parser.getWorkspace().getProperties().get("structurizr.dslEditor")); } + @Test + void test_viewsWithoutKeys() throws Exception { + StructurizrDslParser parser = new StructurizrDslParser(); + parser.parse(new File("src/test/dsl/views-without-keys.dsl")); + + assertTrue(parser.getWorkspace().getViews().getSystemLandscapeViews().stream().anyMatch(view -> view.getKey().equals("SystemLandscape-1"))); + assertTrue(parser.getWorkspace().getViews().getSystemLandscapeViews().stream().anyMatch(view -> view.getKey().equals("SystemLandscape-2"))); + assertTrue(parser.getWorkspace().getViews().getSystemLandscapeViews().stream().anyMatch(view -> view.getKey().equals("SystemLandscape-3"))); + } + } \ No newline at end of file diff --git a/src/test/java/com/structurizr/dsl/DynamicViewParserTests.java b/src/test/java/com/structurizr/dsl/DynamicViewParserTests.java index 79aade1..20f00e1 100644 --- a/src/test/java/com/structurizr/dsl/DynamicViewParserTests.java +++ b/src/test/java/com/structurizr/dsl/DynamicViewParserTests.java @@ -41,7 +41,7 @@ void test_parse_GeneratesAKey_WhenTheKeyIsMissing() { DslContext context = context(); DynamicView view = parser.parse(context, tokens("dynamic", "*")); - assertEquals("Dynamic-001", view.getKey()); + assertEquals("Dynamic-1", view.getKey()); } @Test @@ -104,7 +104,7 @@ void test_parse_CreatesADynamicViewWithSoftwareSystemScope() { List views = new ArrayList<>(this.views.getDynamicViews()); assertEquals(1, views.size()); - assertEquals("Name-Dynamic-001", views.get(0).getKey()); + assertEquals("Dynamic-1", views.get(0).getKey()); assertEquals("", views.get(0).getDescription()); assertSame(softwareSystem, views.get(0).getElement()); } @@ -155,7 +155,7 @@ void test_parse_CreatesADynamicViewWithContainerScope() { List views = new ArrayList<>(this.views.getDynamicViews()); assertEquals(1, views.size()); - assertEquals("Name-Container-Dynamic-001", views.get(0).getKey()); + assertEquals("Dynamic-1", views.get(0).getKey()); assertEquals("", views.get(0).getDescription()); assertSame(container, views.get(0).getElement()); } diff --git a/src/test/java/com/structurizr/dsl/FilteredViewParserTests.java b/src/test/java/com/structurizr/dsl/FilteredViewParserTests.java index f36ef43..bdbbfb1 100644 --- a/src/test/java/com/structurizr/dsl/FilteredViewParserTests.java +++ b/src/test/java/com/structurizr/dsl/FilteredViewParserTests.java @@ -99,7 +99,7 @@ void test_parse_CreatesAFilteredView() { List views = new ArrayList<>(context.getWorkspace().getViews().getFilteredViews()); assertEquals(1, views.size()); - assertEquals("SystemLandscape-Filtered-001", views.get(0).getKey()); + assertEquals("Filtered-1", views.get(0).getKey()); assertEquals(2, views.get(0).getTags().size()); assertTrue(views.get(0).getTags().contains("Tag 1")); assertTrue(views.get(0).getTags().contains("Tag 2")); diff --git a/src/test/java/com/structurizr/dsl/StructurizrDslFormatterTests.java b/src/test/java/com/structurizr/dsl/StructurizrDslFormatterTests.java index 0ed1421..8ffccc4 100644 --- a/src/test/java/com/structurizr/dsl/StructurizrDslFormatterTests.java +++ b/src/test/java/com/structurizr/dsl/StructurizrDslFormatterTests.java @@ -46,7 +46,7 @@ void test_gettingstarted() throws Exception { " }\n" + "\n" + " views {\n" + - " systemContext SoftwareSystem \"SoftwareSystem-SystemContext\" {\n" + + " systemContext SoftwareSystem \"SystemContext-1\" {\n" + " include User \n" + " include SoftwareSystem \n" + " autolayout tb 300 300 \n" + diff --git a/src/test/java/com/structurizr/dsl/SystemContextViewParserTests.java b/src/test/java/com/structurizr/dsl/SystemContextViewParserTests.java index d98363e..dfbd5c2 100644 --- a/src/test/java/com/structurizr/dsl/SystemContextViewParserTests.java +++ b/src/test/java/com/structurizr/dsl/SystemContextViewParserTests.java @@ -72,7 +72,7 @@ void test_parse_CreatesASystemContextView() { List views = new ArrayList<>(context.getWorkspace().getViews().getSystemContextViews()); assertEquals(1, views.size()); - assertEquals("Name-SystemContext", views.get(0).getKey()); + assertEquals("SystemContext-1", views.get(0).getKey()); assertEquals("", views.get(0).getDescription()); } diff --git a/src/test/java/com/structurizr/dsl/SystemLandscapeViewParserTests.java b/src/test/java/com/structurizr/dsl/SystemLandscapeViewParserTests.java index 1aea50e..d7305cb 100644 --- a/src/test/java/com/structurizr/dsl/SystemLandscapeViewParserTests.java +++ b/src/test/java/com/structurizr/dsl/SystemLandscapeViewParserTests.java @@ -31,7 +31,7 @@ void test_parse_CreatesASystemLandscapeView() { List views = new ArrayList<>(context.getWorkspace().getViews().getSystemLandscapeViews()); assertEquals(1, views.size()); - assertEquals("SystemLandscape", views.get(0).getKey()); + assertEquals("SystemLandscape-1", views.get(0).getKey()); assertEquals("", views.get(0).getDescription()); }