use of org.eclipse.sirius.components.diagrams.layout.incremental.provider.EdgeRoutingPointsProvider in project sirius-components by eclipse-sirius.
the class EdgeRoutingPointsProviderTests method testEdgeRoutingPoints.
@Test
public void testEdgeRoutingPoints() {
EdgeRoutingPointsProvider edgeRoutingPointsProvider = new EdgeRoutingPointsProvider();
DiagramLayoutData diagramLayoutData = this.createDiagramLayoutData();
EdgeLayoutData edgeLayoutData = this.createEdgeLayoutData(diagramLayoutData);
List<Position> routingPoints = edgeRoutingPointsProvider.getRoutingPoints(edgeLayoutData);
assertThat(routingPoints).hasSize(2);
Position firstRoutingPoint = routingPoints.get(0);
assertThat(firstRoutingPoint).extracting(Position::getX).isEqualTo(75.0);
assertThat(firstRoutingPoint).extracting(Position::getY).isEqualTo(50.0);
Position secondRoutingPoint = routingPoints.get(1);
assertThat(secondRoutingPoint).extracting(Position::getX).isEqualTo(225.0);
assertThat(secondRoutingPoint).extracting(Position::getY).isEqualTo(200.0);
}
Aggregations