Search in sources :

Example 1 with MapIndex

use of org.kie.workbench.common.stunner.core.graph.processing.index.map.MapIndex in project kie-wb-common by kiegroup.

the class AbstractCommandTest method setup.

@SuppressWarnings("unchecked")
public void setup() {
    MockitoAnnotations.initMocks(this);
    this.graph = new GraphImpl<>("graph", new GraphNodeStoreImpl());
    this.index = new MapIndex(graph, new HashMap<>(), new HashMap<>());
    when(canvasHandler.getDiagram()).thenReturn(diagram);
    when(canvasHandler.getCanvas()).thenReturn(canvas);
    when(canvasHandler.getGraphExecutionContext()).thenReturn(context);
    when(context.getGraphIndex()).thenReturn(index);
    when(canvasHandler.getGraphIndex()).thenReturn(index);
    when(diagram.getMetadata()).thenReturn(metadata);
    when(diagram.getGraph()).thenReturn(graph);
    when(metadata.getDefinitionSetId()).thenReturn(DEF_SET_ID);
    when(metadata.getShapeSetId()).thenReturn(SHAPE_SET_ID);
    when(metadata.getCanvasRootUUID()).thenReturn(CANVAS_ROOT_UUID);
}
Also used : GraphNodeStoreImpl(org.kie.workbench.common.stunner.core.graph.store.GraphNodeStoreImpl) HashMap(java.util.HashMap) MapIndex(org.kie.workbench.common.stunner.core.graph.processing.index.map.MapIndex)

Aggregations

HashMap (java.util.HashMap)1 MapIndex (org.kie.workbench.common.stunner.core.graph.processing.index.map.MapIndex)1 GraphNodeStoreImpl (org.kie.workbench.common.stunner.core.graph.store.GraphNodeStoreImpl)1