use of org.kie.workbench.common.stunner.core.graph.command.ContextualGraphCommandExecutionContext in project kie-wb-common by kiegroup.
the class ConnectorParentsMatchLevel1Tests method testAddNewEdgeAndNode.
@Test
public void testAddNewEdgeAndNode() {
Command<GraphCommandExecutionContext, RuleViolation> command = addNewEdgeAndNodeIntoParent(graph.containerNode);
ContextualGraphCommandExecutionContext executionContext = createConstrainedExecutionContext();
CommandResult<RuleViolation> result = command.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 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.ContextualGraphCommandExecutionContext in project kie-wb-common by kiegroup.
the class ConnectorParentsMatchLevel1Tests method testSetEdge1TargetAsNodeA.
// CONNECTION contexts
@Test
@SuppressWarnings("unchecked")
public void testSetEdge1TargetAsNodeA() {
SetConnectionTargetNodeCommand setTarget = new SetConnectionTargetNodeCommand(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 ConnectorParentsMatchLevel1Tests method testConstrainedSetEdge1SourceAsNodeA.
@Test
@SuppressWarnings("unchecked")
public void testConstrainedSetEdge1SourceAsNodeA() {
SetConnectionSourceNodeCommand setTarget = new SetConnectionSourceNodeCommand(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 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);
}
Aggregations