@Test public void testGetControlPointsWhenTwoPoints() { List<Point> waypoints = mockPoints(1, 2, 2); when(edge.getWaypoint()).thenReturn(waypoints); List<Point2D> result = PropertyReaderUtils.getControlPoints(definitionResolver, EDGE_ID); assertTrue(result.isEmpty()); }
public static List<Point2D> getControlPoints(DefinitionResolver definitionResolver, String edgeId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final List<Point> waypoint = definitionResolver.getEdge(edgeId).getWaypoint(); final List<Point2D> result = new ArrayList<>(); if (waypoint.size() > 2) { List<Point> points = waypoint.subList(1, waypoint.size() - 1); for (Point p : points) { result.add(createPoint2D(p, resolutionFactor)); } } return result; }
PropertyReaderUtils { public static List<Point2D> getControlPoints(DefinitionResolver definitionResolver, String edgeId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final List<Point> waypoint = definitionResolver.getEdge(edgeId).getWaypoint(); final List<Point2D> result = new ArrayList<>(); if (waypoint.size() > 2) { List<Point> points = waypoint.subList(1, waypoint.size() - 1); for (Point p : points) { result.add(createPoint2D(p, resolutionFactor)); } } return result; } }
PropertyReaderUtils { public static List<Point2D> getControlPoints(DefinitionResolver definitionResolver, String edgeId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final List<Point> waypoint = definitionResolver.getEdge(edgeId).getWaypoint(); final List<Point2D> result = new ArrayList<>(); if (waypoint.size() > 2) { List<Point> points = waypoint.subList(1, waypoint.size() - 1); for (Point p : points) { result.add(createPoint2D(p, resolutionFactor)); } } return result; }  }
PropertyReaderUtils { public static List<Point2D> getControlPoints(DefinitionResolver definitionResolver, String edgeId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final List<Point> waypoint = definitionResolver.getEdge(edgeId).getWaypoint(); final List<Point2D> result = new ArrayList<>(); if (waypoint.size() > 2) { List<Point> points = waypoint.subList(1, waypoint.size() - 1); for (Point p : points) { result.add(createPoint2D(p, resolutionFactor)); } } return result; }  static Point2D getSourcePosition(DefinitionResolver definitionResolver,
                                            String edgeId,
                                            String sourceId); static Point2D getTargetPosition(DefinitionResolver definitionResolver,
                                            String edgeId,
                                            String targetId); static List<Point2D> getControlPoints(DefinitionResolver definitionResolver,
                                                 String edgeId); static boolean isAutoConnectionSource(BaseElement element); static boolean isAutoConnectionTarget(BaseElement element); static WSDLImport toWSDLImports(Import imp); }
PropertyReaderUtils { public static List<Point2D> getControlPoints(DefinitionResolver definitionResolver, String edgeId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final List<Point> waypoint = definitionResolver.getEdge(edgeId).getWaypoint(); final List<Point2D> result = new ArrayList<>(); if (waypoint.size() > 2) { List<Point> points = waypoint.subList(1, waypoint.size() - 1); for (Point p : points) { result.add(createPoint2D(p, resolutionFactor)); } } return result; }  static Point2D getSourcePosition(DefinitionResolver definitionResolver,
                                            String edgeId,
                                            String sourceId); static Point2D getTargetPosition(DefinitionResolver definitionResolver,
                                            String edgeId,
                                            String targetId); static List<Point2D> getControlPoints(DefinitionResolver definitionResolver,
                                                 String edgeId); static boolean isAutoConnectionSource(BaseElement element); static boolean isAutoConnectionTarget(BaseElement element); static WSDLImport toWSDLImports(Import imp);  }