use of org.kie.workbench.common.stunner.cm.client.shape.NullShape in project kie-wb-common by kiegroup.
the class CaseManagementShapeDefFactory method newNullShape.
@SuppressWarnings("unchecked")
private Shape newNullShape(final Object instance, final ShapeDef shapeDef) {
NullShapeDef nullShapeDef = (NullShapeDef) shapeDef;
final NullView view = cmShapeViewFactory.newNullView();
return new NullShape(nullShapeDef, view);
}
use of org.kie.workbench.common.stunner.cm.client.shape.NullShape in project kie-wb-common by kiegroup.
the class CaseManagementShapeDefFactoryTest method testBuilders.
@Test
public void testBuilders() {
final Shape nullShape = tested.newShape(mock(BPMNDefinition.class), new NullShapeDef());
assertNotNull(nullShape);
assertTrue(nullShape instanceof NullShape);
final Shape diagramShape = tested.newShape(new CaseManagementDiagram.CaseManagementDiagramBuilder().build(), new CaseManagementDiagramShapeDef());
assertNotNull(diagramShape);
assertTrue(diagramShape instanceof CMContainerShape);
final Shape subprocessShape = tested.newShape(new AdHocSubprocess.AdHocSubprocessBuilder().build(), new CaseManagementSubprocessShapeDef());
assertNotNull(subprocessShape);
assertTrue(subprocessShape instanceof CMContainerShape);
final Shape activityShape = tested.newShape(new UserTask.UserTaskBuilder().build(), new CaseManagementTaskShapeDef());
assertNotNull(activityShape);
assertTrue(activityShape instanceof ActivityShape);
final Shape activityShape2 = tested.newShape(new ReusableSubprocess.ReusableSubprocessBuilder().build(), new CaseManagementReusableSubprocessTaskShapeDef());
assertNotNull(activityShape2);
assertTrue(activityShape2 instanceof ActivityShape);
}
Aggregations