use of org.kie.workbench.common.stunner.shapes.client.factory.OrthogonalPolyLineConnectorFactory in project kie-wb-common by kiegroup.
the class OrthogonalPolyLineConnectorViewTest method testCreateLine.
@Test
public void testCreateLine() {
double[] points = new double[] { 0, 0, 10, 10 };
OrthogonalPolyLineConnectorFactory factory = new OrthogonalPolyLineConnectorFactory();
Object[] line = PolylineConnectorView.createLine(factory, ConnectorShapeDef.Direction.ONE, 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