Search in sources :

Example 1 with CircleLayoutOperation

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

the class BundleContextHistoryManagerTest method setUp.

@Before
public void setUp() {
    if (new File(DATA_FILE_NAME).exists()) {
        new File(DATA_FILE_NAME).delete();
    }
    serviceLocatorMock = Mockito.mock(ServiceLocator.class);
    bundleContextMock = Mockito.mock(BundleContext.class);
    graphContainerMock = Mockito.mock(GraphContainer.class);
    topologyServiceClientMock = Mockito.mock(TopologyServiceClient.class);
    graphMock = Mockito.mock(Graph.class);
    graphProviderMock = Mockito.mock(GraphProvider.class);
    startingSearchResults = new HashMap<>();
    startingProviders = new HashMap<>();
    startingCriteria = new HashMap<>();
    capturedCriteria = new ArrayList<>();
    displayableVertices = new ArrayList<>();
    selectedLayout = new DefaultLayout();
    historyManager = new BundleContextHistoryManager(bundleContextMock, serviceLocatorMock);
    historyManager.onBind(new CircleLayoutOperation());
    historyManager.onBind(new ManualLayoutOperation(null));
    historyManager.onBind(new FRLayoutOperation());
    historyManager.onBind(new SimpleLayoutOperation());
    historyManager.onBind(new ISOMLayoutOperation());
    historyManager.onBind(new SpringLayoutOperation());
    historyManager.onBind(new RealUltimateLayoutOperation());
    historyManager.onBind(new KKLayoutOperation());
    historyManager.onBind(new AutoRefreshToggleOperation());
    setBehaviour(graphProviderMock);
    setBehaviour(topologyServiceClientMock);
    setBehaviour(bundleContextMock);
    setBehaviour(graphContainerMock);
    setBehaviour(graphMock);
    setBehaviour(serviceLocatorMock);
    initProvidersAndCriteria();
}
Also used : SimpleLayoutOperation(org.opennms.features.topology.app.internal.operations.SimpleLayoutOperation) DefaultLayout(org.opennms.features.topology.app.internal.DefaultLayout) KKLayoutOperation(org.opennms.features.topology.app.internal.operations.KKLayoutOperation) CircleLayoutOperation(org.opennms.features.topology.app.internal.operations.CircleLayoutOperation) ManualLayoutOperation(org.opennms.features.topology.app.internal.operations.ManualLayoutOperation) ServiceLocator(org.opennms.features.topology.api.support.ServiceLocator) GraphContainer(org.opennms.features.topology.api.GraphContainer) TopologyServiceClient(org.opennms.features.topology.api.TopologyServiceClient) Graph(org.opennms.features.topology.api.Graph) SpringLayoutOperation(org.opennms.features.topology.app.internal.operations.SpringLayoutOperation) FRLayoutOperation(org.opennms.features.topology.app.internal.operations.FRLayoutOperation) GraphProvider(org.opennms.features.topology.api.topo.GraphProvider) AutoRefreshToggleOperation(org.opennms.features.topology.app.internal.operations.AutoRefreshToggleOperation) ISOMLayoutOperation(org.opennms.features.topology.app.internal.operations.ISOMLayoutOperation) File(java.io.File) RealUltimateLayoutOperation(org.opennms.features.topology.app.internal.operations.RealUltimateLayoutOperation) BundleContext(org.osgi.framework.BundleContext) Before(org.junit.Before)

Aggregations

File (java.io.File)1 Before (org.junit.Before)1 Graph (org.opennms.features.topology.api.Graph)1 GraphContainer (org.opennms.features.topology.api.GraphContainer)1 TopologyServiceClient (org.opennms.features.topology.api.TopologyServiceClient)1 ServiceLocator (org.opennms.features.topology.api.support.ServiceLocator)1 GraphProvider (org.opennms.features.topology.api.topo.GraphProvider)1 DefaultLayout (org.opennms.features.topology.app.internal.DefaultLayout)1 AutoRefreshToggleOperation (org.opennms.features.topology.app.internal.operations.AutoRefreshToggleOperation)1 CircleLayoutOperation (org.opennms.features.topology.app.internal.operations.CircleLayoutOperation)1 FRLayoutOperation (org.opennms.features.topology.app.internal.operations.FRLayoutOperation)1 ISOMLayoutOperation (org.opennms.features.topology.app.internal.operations.ISOMLayoutOperation)1 KKLayoutOperation (org.opennms.features.topology.app.internal.operations.KKLayoutOperation)1 ManualLayoutOperation (org.opennms.features.topology.app.internal.operations.ManualLayoutOperation)1 RealUltimateLayoutOperation (org.opennms.features.topology.app.internal.operations.RealUltimateLayoutOperation)1 SimpleLayoutOperation (org.opennms.features.topology.app.internal.operations.SimpleLayoutOperation)1 SpringLayoutOperation (org.opennms.features.topology.app.internal.operations.SpringLayoutOperation)1 BundleContext (org.osgi.framework.BundleContext)1