use of org.kie.workbench.common.stunner.shapes.client.factory.PolyLineConnectorFactory in project kie-wb-common by kiegroup.
the class PolyLineConnectorViewTest method testCreateLine.
@Test
public void testCreateLine() {
double[] points = new double[] { 0, 0, 10, 10 };
PolyLineConnectorFactory factory = new PolyLineConnectorFactory();
Object[] line = PolylineConnectorView.createLine(factory, points);
MultiPathDecorator head = (MultiPathDecorator) line[1];
MultiPath headPath = head.getPath();
BoundingBox headBoundingBox = headPath.getBoundingBox();
MultiPathDecorator tail = (MultiPathDecorator) line[2];
MultiPath tailPath = tail.getPath();
BoundingBox tailBoundingBox = tailPath.getBoundingBox();
assertEquals(0, headBoundingBox.getWidth(), 0);
assertEquals(0, headBoundingBox.getHeight(), 0);
assertNotEquals(0, tailBoundingBox.getWidth(), 0);
assertNotEquals(0, tailBoundingBox.getHeight(), 0);
}
Aggregations