Search in sources :

Example 1 with TestVertex

use of org.opennms.features.topology.app.internal.TestVertex in project opennms by OpenNMS.

the class HierarchyLayoutAlgorithmTest method verifyHierarchyLayoutFallBack.

// NMS-8703
@Test
public void verifyHierarchyLayoutFallBack() {
    // Vertices
    vertices.add(new TestVertex("root"));
    vertices.add(new TestVertex("v1"));
    vertices.add(new TestVertex("v2"));
    vertices.add(new TestVertex("v3"));
    // Edges
    edges.add(new AbstractEdge("test", "rootEdge", vertices.get(0), vertices.get(1)));
    edges.add(new AbstractEdge("test", "e1", vertices.get(1), vertices.get(2)));
    edges.add(new AbstractEdge("test", "e2", vertices.get(2), vertices.get(3)));
    // Circle
    edges.add(new AbstractEdge("test", "e3", vertices.get(3), vertices.get(1)));
    // Update the layouts and ensure no exception is thrown
    buildLayout();
}
Also used : AbstractEdge(org.opennms.features.topology.api.topo.AbstractEdge) TestVertex(org.opennms.features.topology.app.internal.TestVertex) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 AbstractEdge (org.opennms.features.topology.api.topo.AbstractEdge)1 TestVertex (org.opennms.features.topology.app.internal.TestVertex)1