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();
}
Aggregations