use of org.kie.workbench.common.stunner.core.graph.command.ContextualGraphCommandExecutionContext in project kie-wb-common by kiegroup.
the class ConnectorParentsMatchLevel2Tests method testMoveStartNodeIntoSubProcessNode.
@Test
@SuppressWarnings("unchecked")
public void testMoveStartNodeIntoSubProcessNode() {
SetChildrenCommand setChildren = new SetChildrenCommand(graph.subProcessNode, graph.startNode);
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 ConnectorParentsMatchLevel2Tests method testSetEdge1SourceAsNodeA.
@Test
@SuppressWarnings("unchecked")
public void testSetEdge1SourceAsNodeA() {
SetConnectionSourceNodeCommand setTarget = new SetConnectionSourceNodeCommand(graph.nodeA, graph.edge1);
ContextualGraphCommandExecutionContext executionContext = createExecutionContext();
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 ConnectorParentsMatchLevel2Tests method testMoveSomeConnectedNodesIntoSubProcessNode.
@Test
@SuppressWarnings("unchecked")
public void testMoveSomeConnectedNodesIntoSubProcessNode() {
SetChildrenCommand setChildren = new SetChildrenCommand(graph.subProcessNode, Arrays.asList(graph.startNode, 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 ConnectorParentsMatchLevel2Tests method testMoveStartNodeIntoParentNode.
@Test
@SuppressWarnings("unchecked")
public void testMoveStartNodeIntoParentNode() {
ContextualGraphCommandExecutionContext executionContext = createExecutionContext();
SetChildrenCommand setChildren = new SetChildrenCommand(graph.parentNode, graph.startNode);
CommandResult<RuleViolation> result = setChildren.allow(executionContext);
assertRuleFailedResult(result);
}
use of org.kie.workbench.common.stunner.core.graph.command.ContextualGraphCommandExecutionContext in project kie-wb-common by kiegroup.
the class ConnectorParentsMatchLevel1Tests method testSetEdge1TargetAsEndNodeEvenWithConstraintsButDoesNotApply.
@Test
@SuppressWarnings("unchecked")
public void testSetEdge1TargetAsEndNodeEvenWithConstraintsButDoesNotApply() {
SetConnectionTargetNodeCommand setTarget = new SetConnectionTargetNodeCommand(graph.endNode, graph.edge1);
ContextualGraphCommandExecutionContext executionContext = createConstrainedExecutionContext();
CommandResult<RuleViolation> result = setTarget.allow(executionContext);
assertSuccessfullResult(result);
}
Aggregations