use of org.kie.workbench.common.stunner.core.graph.command.impl.SetChildrenCommand in project kie-wb-common by kiegroup.
the class ConnectorParentsMatchLevel2Tests method testMoveAllConnectedNodesIntoSubProcessNode.
@Test
@SuppressWarnings("unchecked")
public void testMoveAllConnectedNodesIntoSubProcessNode() {
SetChildrenCommand setChildren = new SetChildrenCommand(graph.subProcessNode, Arrays.asList(graph.startNode, graph.intermNode, graph.endNode));
ContextualGraphCommandExecutionContext executionContext = createExecutionContext();
CommandResult<RuleViolation> result = setChildren.allow(executionContext);
assertSuccessfullResult(result);
}
use of org.kie.workbench.common.stunner.core.graph.command.impl.SetChildrenCommand in project kie-wb-common by kiegroup.
the class ConnectorParentsMatchLevel2Tests method testMoveAllConnectedNodesIntoParentNode.
@Test
@SuppressWarnings("unchecked")
public void testMoveAllConnectedNodesIntoParentNode() {
SetChildrenCommand setChildren = new SetChildrenCommand(graph.parentNode, Arrays.asList(graph.startNode, graph.intermNode, graph.endNode));
ContextualGraphCommandExecutionContext executionContext = createExecutionContext();
CommandResult<RuleViolation> result = setChildren.allow(executionContext);
assertSuccessfullResult(result);
}
use of org.kie.workbench.common.stunner.core.graph.command.impl.SetChildrenCommand in project kie-wb-common by kiegroup.
the class ConnectorParentsMatchLevel1Tests method testMoveIntermNodeIntoParentNode.
@Test
@SuppressWarnings("unchecked")
public void testMoveIntermNodeIntoParentNode() {
SetChildrenCommand setChildren = new SetChildrenCommand(graph.parentNode, graph.intermNode);
ContextualGraphCommandExecutionContext executionContext = createExecutionContext();
CommandResult<RuleViolation> result = setChildren.allow(executionContext);
assertSuccessfullResult(result);
}
use of org.kie.workbench.common.stunner.core.graph.command.impl.SetChildrenCommand in project kie-wb-common by kiegroup.
the class ConnectorParentsMatchLevel1Tests method testMoveStartNodeIntoParentNode.
@Test
@SuppressWarnings("unchecked")
public void testMoveStartNodeIntoParentNode() {
SetChildrenCommand setChildren = new SetChildrenCommand(graph.parentNode, graph.startNode);
ContextualGraphCommandExecutionContext executionContext = createExecutionContext();
CommandResult<RuleViolation> result = setChildren.allow(executionContext);
assertSuccessfullResult(result);
}
use of org.kie.workbench.common.stunner.core.graph.command.impl.SetChildrenCommand in project kie-wb-common by kiegroup.
the class ConnectorParentsMatchLevel1Tests method testConstrainedMoveAllConnectedNodesIntoParentNode.
@Test
@SuppressWarnings("unchecked")
public void testConstrainedMoveAllConnectedNodesIntoParentNode() {
ContextualGraphCommandExecutionContext executionContext = createConstrainedExecutionContext();
SetChildrenCommand setChildren = new SetChildrenCommand(graph.parentNode, Arrays.asList(graph.startNode, graph.intermNode, graph.endNode));
CommandResult<RuleViolation> result = setChildren.allow(executionContext);
assertSuccessfullResult(result);
}
Aggregations