use of com.ait.lienzo.client.core.shape.PolyLine in project kie-wb-common by kiegroup.
the class WiresConnectorViewExtTest method setup.
@Before
@SuppressWarnings("unchecked")
public void setup() throws Exception {
HEAD_DECORATOR = new MultiPathDecorator(new MultiPath().rect(0, 0, 10, 10));
TAIL_DECORATOR = new MultiPathDecorator(new MultiPath().rect(0, 0, 10, 10));
POINTS = new Point2DArray(new Point2D(0, 10), new Point2D(10, 10), new Point2D(20, 20), new Point2D(30, 30), new Point2D(40, 40));
line = new PolyLine(POINTS);
layer = spy(new Layer());
doAnswer(invocation -> {
((Consumer) invocation.getArguments()[0]).accept(labelText);
return label;
}).when(label).configure(any(Consumer.class));
tested = spy(new WiresConnectorViewExt(ShapeViewSupportedEvents.DESKTOP_CONNECTOR_EVENT_TYPES, line, HEAD_DECORATOR, TAIL_DECORATOR) {
@Override
protected Optional<WiresConnectorLabel> createLabel(String title) {
return Optional.of(WiresConnectorViewExtTest.this.label);
}
});
tested.setControl(connectorControl);
layer.add(tested.getGroup());
}
Aggregations