use of org.kie.workbench.common.stunner.core.graph.command.ContextualGraphCommandExecutionContext 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);
}
use of org.kie.workbench.common.stunner.core.graph.command.ContextualGraphCommandExecutionContext in project kie-wb-common by kiegroup.
the class ConnectorParentsMatchLevel1Tests method testMoveEndNodeIntoParentNode.
@Test
@SuppressWarnings("unchecked")
public void testMoveEndNodeIntoParentNode() {
SetChildrenCommand setChildren = new SetChildrenCommand(graph.parentNode, graph.endNode);
ContextualGraphCommandExecutionContext executionContext = createExecutionContext();
CommandResult<RuleViolation> result = setChildren.allow(executionContext);
assertSuccessfullResult(result);
}
use of org.kie.workbench.common.stunner.core.graph.command.ContextualGraphCommandExecutionContext in project kie-wb-common by kiegroup.
the class ConnectorParentsMatchLevel1Tests method testConstrainedSetEdge1TargetAsNull.
@Test
@SuppressWarnings("unchecked")
public void testConstrainedSetEdge1TargetAsNull() {
SetConnectionTargetNodeCommand setTarget = new SetConnectionTargetNodeCommand(null, graph.edge1);
ContextualGraphCommandExecutionContext executionContext = createConstrainedExecutionContext();
CommandResult<RuleViolation> result = setTarget.allow(executionContext);
assertSuccessfullResult(result);
}
use of org.kie.workbench.common.stunner.core.graph.command.ContextualGraphCommandExecutionContext in project kie-wb-common by kiegroup.
the class ConnectorParentsMatchLevel1Tests method testConstrainedSetEdge1SourceAsNull.
@Test
@SuppressWarnings("unchecked")
public void testConstrainedSetEdge1SourceAsNull() {
SetConnectionSourceNodeCommand setTarget = new SetConnectionSourceNodeCommand(null, graph.edge1);
ContextualGraphCommandExecutionContext executionContext = createConstrainedExecutionContext();
CommandResult<RuleViolation> result = setTarget.allow(executionContext);
assertSuccessfullResult(result);
}
Aggregations