use of org.kie.workbench.common.stunner.core.graph.command.ContextualGraphCommandExecutionContext in project kie-wb-common by kiegroup.
the class ConnectorParentsMatchLevel1Tests method testConstrainedSetEdge1TargetAsNodeA.
@Test
@SuppressWarnings("unchecked")
public void testConstrainedSetEdge1TargetAsNodeA() {
SetConnectionTargetNodeCommand setTarget = new SetConnectionTargetNodeCommand(graph.nodeA, graph.edge1);
ContextualGraphCommandExecutionContext executionContext = createConstrainedExecutionContext();
CommandResult<RuleViolation> result = setTarget.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 testConstrainedMoveEndNodeIntoParentNode.
@Test
@SuppressWarnings("unchecked")
public void testConstrainedMoveEndNodeIntoParentNode() {
ContextualGraphCommandExecutionContext executionContext = createConstrainedExecutionContext();
SetChildrenCommand setChildren = new SetChildrenCommand(graph.parentNode, graph.endNode);
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 testConstrainedMoveStartNodeIntoParentNode.
@Test
@SuppressWarnings("unchecked")
public void testConstrainedMoveStartNodeIntoParentNode() {
ContextualGraphCommandExecutionContext executionContext = createConstrainedExecutionContext();
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 testConstrainedMoveStartIntermNodesIntoParentNode.
@Test
@SuppressWarnings("unchecked")
public void testConstrainedMoveStartIntermNodesIntoParentNode() {
ContextualGraphCommandExecutionContext executionContext = createConstrainedExecutionContext();
SetChildrenCommand setChildren = new SetChildrenCommand(graph.parentNode, Arrays.asList(graph.startNode, graph.intermNode));
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 testConstrainedMoveIntermNodeIntoParentNode.
@Test
@SuppressWarnings("unchecked")
public void testConstrainedMoveIntermNodeIntoParentNode() {
ContextualGraphCommandExecutionContext executionContext = createConstrainedExecutionContext();
SetChildrenCommand setChildren = new SetChildrenCommand(graph.parentNode, graph.intermNode);
CommandResult<RuleViolation> result = setChildren.allow(executionContext);
assertRuleFailedResult(result);
}
Aggregations