@Test public void testGetSourceConnection() { mockStatic(PropertyReaderUtils.class); PowerMockito.when(PropertyReaderUtils.getSourcePosition(definitionResolver, ASSOCIATION_ID, SOURCE_ID)).thenReturn(position); boolean arbitraryBoolean = true; PowerMockito.when(PropertyReaderUtils.isAutoConnectionSource(association)).thenReturn(arbitraryBoolean); Connection result = propertyReader.getSourceConnection(); assertEquals(X, result.getLocation().getX(), 0); assertEquals(Y, result.getLocation().getY(), 0); }
@Override public Connection getSourceConnection() { Point2D sourcePosition = PropertyReaderUtils.getSourcePosition(definitionResolver, element.getId(), getSourceId()); return MagnetConnection.Builder .at(sourcePosition.getX(), sourcePosition.getY()) .setAuto(PropertyReaderUtils.isAutoConnectionSource(element)); }
AssociationPropertyReader extends BasePropertyReader implements EdgePropertyReader { @Override public Connection getSourceConnection() { Point2D sourcePosition = PropertyReaderUtils.getSourcePosition(definitionResolver, element.getId(), getSourceId()); return MagnetConnection.Builder .at(sourcePosition.getX(), sourcePosition.getY()) .setAuto(PropertyReaderUtils.isAutoConnectionSource(element)); } }
AssociationPropertyReader extends BasePropertyReader implements EdgePropertyReader { @Override public Connection getSourceConnection() { Point2D sourcePosition = PropertyReaderUtils.getSourcePosition(definitionResolver, element.getId(), getSourceId()); return MagnetConnection.Builder .at(sourcePosition.getX(), sourcePosition.getY()) .setAuto(PropertyReaderUtils.isAutoConnectionSource(element)); } AssociationPropertyReader(Association association,
                                     BPMNDiagram diagram,
                                     DefinitionResolver definitionResolver); }
AssociationPropertyReader extends BasePropertyReader implements EdgePropertyReader { @Override public Connection getSourceConnection() { Point2D sourcePosition = PropertyReaderUtils.getSourcePosition(definitionResolver, element.getId(), getSourceId()); return MagnetConnection.Builder .at(sourcePosition.getX(), sourcePosition.getY()) .setAuto(PropertyReaderUtils.isAutoConnectionSource(element)); } AssociationPropertyReader(Association association,
                                     BPMNDiagram diagram,
                                     DefinitionResolver definitionResolver); @Override String getSourceId(); @Override String getTargetId(); Class<? extends org.kie.workbench.common.stunner.bpmn.definition.Association> getAssociationByDirection(); @Override Connection getSourceConnection(); @Override Connection getTargetConnection(); @Override List<Point2D> getControlPoints(); @Override DefinitionResolver getDefinitionResolver(); }
AssociationPropertyReader extends BasePropertyReader implements EdgePropertyReader { @Override public Connection getSourceConnection() { Point2D sourcePosition = PropertyReaderUtils.getSourcePosition(definitionResolver, element.getId(), getSourceId()); return MagnetConnection.Builder .at(sourcePosition.getX(), sourcePosition.getY()) .setAuto(PropertyReaderUtils.isAutoConnectionSource(element)); } AssociationPropertyReader(Association association,
                                     BPMNDiagram diagram,
                                     DefinitionResolver definitionResolver); @Override String getSourceId(); @Override String getTargetId(); Class<? extends org.kie.workbench.common.stunner.bpmn.definition.Association> getAssociationByDirection(); @Override Connection getSourceConnection(); @Override Connection getTargetConnection(); @Override List<Point2D> getControlPoints(); @Override DefinitionResolver getDefinitionResolver();  }