Search in sources :

Example 36 with Diagram

use of org.kie.workbench.common.stunner.core.diagram.Diagram in project kie-wb-common by kiegroup.

the class SessionPreviewCanvasHandlerProxyTest method checkDrawDelegatesToWrapped.

@Test
@SuppressWarnings("unchecked")
public void checkDrawDelegatesToWrapped() {
    final Diagram diagram = mock(Diagram.class);
    final ParameterizedCommand loadCallback = mock(ParameterizedCommand.class);
    proxy.draw(diagram, loadCallback);
    verify(wrapped).draw(eq(diagram), eq(loadCallback));
}
Also used : ParameterizedCommand(org.uberfire.mvp.ParameterizedCommand) Diagram(org.kie.workbench.common.stunner.core.diagram.Diagram) Test(org.junit.Test)

Aggregations

Diagram (org.kie.workbench.common.stunner.core.diagram.Diagram)36 Metadata (org.kie.workbench.common.stunner.core.diagram.Metadata)17 Test (org.junit.Test)12 Matchers.anyString (org.mockito.Matchers.anyString)9 Collection (java.util.Collection)7 CanvasHandler (org.kie.workbench.common.stunner.core.client.canvas.CanvasHandler)7 Graph (org.kie.workbench.common.stunner.core.graph.Graph)7 ClientRuntimeError (org.kie.workbench.common.stunner.core.client.service.ClientRuntimeError)6 Node (org.kie.workbench.common.stunner.core.graph.Node)6 Before (org.junit.Before)5 AbstractCanvasHandler (org.kie.workbench.common.stunner.core.client.canvas.AbstractCanvasHandler)5 Edge (org.kie.workbench.common.stunner.core.graph.Edge)5 OnStartup (org.uberfire.lifecycle.OnStartup)5 ClientSessionCommand (org.kie.workbench.common.stunner.core.client.session.command.ClientSessionCommand)4 Element (org.kie.workbench.common.stunner.core.graph.Element)4 Definition (org.kie.workbench.common.stunner.core.graph.content.definition.Definition)4 View (org.kie.workbench.common.stunner.core.graph.content.view.View)4 Command (org.uberfire.mvp.Command)4 ArrayList (java.util.ArrayList)3 Assert.assertEquals (org.junit.Assert.assertEquals)3