Search in sources :

Example 1 with TestGraph

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

the class HierarchyLayoutAlgorithmTest method buildLayout.

private void buildLayout() {
    // Mock ALL the things
    final GraphContainer mockGraphContainer = Mockito.mock(GraphContainer.class);
    layout = new DefaultLayout();
    final TestGraph testGraph = new TestGraph(layout, vertices, edges);
    Mockito.when(mockGraphContainer.getGraph()).thenReturn(testGraph);
    // Update layouts and ensure no exception is thrown
    new HierarchyLayoutAlgorithm().updateLayout(testGraph);
}
Also used : GraphContainer(org.opennms.features.topology.api.GraphContainer) DefaultLayout(org.opennms.features.topology.app.internal.DefaultLayout) TestGraph(org.opennms.features.topology.app.internal.TestGraph)

Aggregations

GraphContainer (org.opennms.features.topology.api.GraphContainer)1 DefaultLayout (org.opennms.features.topology.app.internal.DefaultLayout)1 TestGraph (org.opennms.features.topology.app.internal.TestGraph)1