use of org.kie.workbench.common.stunner.core.graph.command.impl.SetChildrenCommand 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.impl.SetChildrenCommand in project kie-wb-common by kiegroup.
the class ConnectorParentsMatchLevel2Tests method testMoveStartNodeIntoNodeA.
// CONTAINMENT contexts
@Test
@SuppressWarnings("unchecked")
public void testMoveStartNodeIntoNodeA() {
ContextualGraphCommandExecutionContext executionContext = createExecutionContext();
SetChildrenCommand setChildren = new SetChildrenCommand(graph.nodeA, graph.startNode);
CommandResult<RuleViolation> result = setChildren.allow(executionContext);
assertTrue(isError(result));
assertTrue(result.getViolations().iterator().hasNext());
RuleViolation ruleViolation = result.getViolations().iterator().next();
assertTrue(ruleViolation instanceof ContextOperationNotAllowedViolation);
}
use of org.kie.workbench.common.stunner.core.graph.command.impl.SetChildrenCommand in project kie-wb-common by kiegroup.
the class ConnectorParentsMatchLevel2Tests method testMoveEndNodeIntoSubProcessNode.
@Test
@SuppressWarnings("unchecked")
public void testMoveEndNodeIntoSubProcessNode() {
SetChildrenCommand setChildren = new SetChildrenCommand(graph.subProcessNode, 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 testMoveEndNodeIntoParentNode.
@Test
@SuppressWarnings("unchecked")
public void testMoveEndNodeIntoParentNode() {
ContextualGraphCommandExecutionContext executionContext = createExecutionContext();
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.impl.SetChildrenCommand in project kie-wb-common by kiegroup.
the class ConnectorParentsMatchLevel2Tests method testMoveIntermNodeIntoSubProcessNode.
@Test
@SuppressWarnings("unchecked")
public void testMoveIntermNodeIntoSubProcessNode() {
SetChildrenCommand setChildren = new SetChildrenCommand(graph.subProcessNode, graph.intermNode);
ContextualGraphCommandExecutionContext executionContext = createExecutionContext();
CommandResult<RuleViolation> result = setChildren.allow(executionContext);
assertSuccessfullResult(result);
}
Aggregations