use of org.kie.workbench.common.stunner.shapes.client.factory.BasicShapesFactory in project kie-wb-common by kiegroup.
the class CaseManagementShapeFactoryTest method setup.
@Before
@SuppressWarnings("unchecked")
public void setup() {
this.pictureShapeView = new PictureShapeView(new MultiPath().rect(0, 0, 10, 10));
this.cmShapeViewFactory = new CaseManagementShapeViewFactory();
final BasicShapesFactory basicShapesFactory = new BasicShapesFactory(new ShapeDefFunctionalFactory<>(), basicViewFactory);
basicShapesFactory.init();
final CaseManagementShapeDefFactory cmShapeDefFactory = new CaseManagementShapeDefFactory(cmShapeViewFactory, basicViewFactory, new ShapeDefFunctionalFactory<>());
cmShapeDefFactory.init();
this.delegate = spy(new DelegateShapeFactory());
doReturn(glyph).when(delegate).getGlyph(anyString());
this.factory = new CaseManagementShapeFactory(cmShapeDefFactory, basicShapesFactory, delegate);
this.factory.init();
when(basicViewFactory.pictureFromUri(any(SafeUri.class), anyDouble(), anyDouble())).thenReturn(pictureShapeView);
when(basicViewFactory.connector(anyDouble(), anyDouble(), anyDouble(), anyDouble())).thenReturn(connectorShapeView);
when(definitionManager.adapters()).thenReturn(adapterManager);
when(adapterManager.forDefinition()).thenReturn(definitionAdapter);
}
Aggregations