Search in sources :

Example 6 with AddNodeCommand

use of org.kie.workbench.common.stunner.core.graph.command.impl.AddNodeCommand in project kie-wb-common by kiegroup.

the class CaseGraphFactoryImplTest method buildInitialisationCommands.

@Test
@SuppressWarnings("all")
public void buildInitialisationCommands() {
    final List<Command> commands = tested.buildInitialisationCommands();
    assertEquals(1, commands.size());
    final AddNodeCommand addNodeCommand = (AddNodeCommand) commands.get(0);
    assertEquals(addNodeCommand.getCandidate(), diagramNode);
}
Also used : AddNodeCommand(org.kie.workbench.common.stunner.core.graph.command.impl.AddNodeCommand) Command(org.kie.workbench.common.stunner.core.command.Command) AddNodeCommand(org.kie.workbench.common.stunner.core.graph.command.impl.AddNodeCommand) Test(org.junit.Test)

Aggregations

AddNodeCommand (org.kie.workbench.common.stunner.core.graph.command.impl.AddNodeCommand)6 Test (org.junit.Test)2 Command (org.kie.workbench.common.stunner.core.command.Command)2 SetChildrenCommand (org.kie.workbench.common.stunner.core.graph.command.impl.SetChildrenCommand)2 List (java.util.List)1 FactoryManager (org.kie.workbench.common.stunner.core.api.FactoryManager)1 AbstractCanvasHandler (org.kie.workbench.common.stunner.core.client.canvas.AbstractCanvasHandler)1 CanvasCommand (org.kie.workbench.common.stunner.core.client.command.CanvasCommand)1 NodeShape (org.kie.workbench.common.stunner.core.client.shape.NodeShape)1 DeferredCommand (org.kie.workbench.common.stunner.core.command.impl.DeferredCommand)1 DeferredCompositeCommand (org.kie.workbench.common.stunner.core.command.impl.DeferredCompositeCommand)1 Edge (org.kie.workbench.common.stunner.core.graph.Edge)1 Node (org.kie.workbench.common.stunner.core.graph.Node)1 DirectGraphCommandExecutionContext (org.kie.workbench.common.stunner.core.graph.command.DirectGraphCommandExecutionContext)1 View (org.kie.workbench.common.stunner.core.graph.content.view.View)1 NodeImpl (org.kie.workbench.common.stunner.core.graph.impl.NodeImpl)1 MapIndexBuilder (org.kie.workbench.common.stunner.core.graph.processing.index.map.MapIndexBuilder)1 RuleViolation (org.kie.workbench.common.stunner.core.rule.RuleViolation)1