public void Create_ConnectorInRootLayoutGroup_Works()
        {
            var model = _modelBuilder
                        .AddNodes("A", "B")
                        .AddRelationships("A->B")
                        .Model;
            var relationship = _modelBuilder.GetRelationship("A->B");

            var diagramBuilder = new DiagramBuilder(model).AddAllModelNodes().AddAllModelRelationships();

            var layoutStructure = new DiagramLayoutStructure(diagramBuilder.GetDiagram());

            layoutStructure.RootLayoutGroup.Connectors.ShouldBeEquivalentById(relationship.Id);
            layoutStructure.CrossLayoutGroupConnectors.Should().BeEmpty();
        }
        public void Create_OnlyNodes_Works()
        {
            var model = _modelBuilder
                        .AddNodes("parent")
                        .AddChildNodes("parent", "child")
                        .Model;
            var parentNode = _modelBuilder.GetNode("parent");
            var childNode  = _modelBuilder.GetNode("child");

            var diagramBuilder = new DiagramBuilder(model).AddAllModelNodes();

            var layoutStructure = new DiagramLayoutStructure(diagramBuilder.GetDiagram());

            layoutStructure.RootLayoutGroup.Nodes.ShouldBeEquivalentById(parentNode.Id);
            layoutStructure.TryGetLayoutGroupByNodeId(parentNode.Id).Value.Nodes.ShouldBeEquivalentById(childNode.Id);
        }
        public void Create_ConnectorInNestedLayoutGroup_Works()
        {
            var model = _modelBuilder
                        .AddNodes("parent")
                        .AddChildNodes("parent", "child1", "child2")
                        .AddRelationships("child1->child2")
                        .Model;
            var parentNode   = _modelBuilder.GetNode("parent");
            var relationship = _modelBuilder.GetRelationship("child1->child2");

            var diagramBuilder = new DiagramBuilder(model).AddAllModelNodes().AddAllModelRelationships();

            var layoutStructure = new DiagramLayoutStructure(diagramBuilder.GetDiagram());

            layoutStructure.RootLayoutGroup.Connectors.Should().BeEmpty();
            layoutStructure.CrossLayoutGroupConnectors.Should().BeEmpty();
            layoutStructure.TryGetLayoutGroupByNodeId(parentNode.Id).Value.Connectors.ShouldBeEquivalentById(relationship.Id);
        }