@Test public void testSetFillAndStroke() { double fillAlpha = 123; double strokeAlpha = 456; when(p1.setFillAlpha(anyDouble())).thenReturn(p1); when(p1.setStrokeAlpha(anyDouble())).thenReturn(p1); SVGViewUtils.setFillAndStroke(svgShape, "p1", fillAlpha, strokeAlpha); verify(p1).setFillAlpha(fillAlpha); verify(p1).setStrokeAlpha(strokeAlpha); }
public static void setFillAndStroke(final SVGShapeView<?> view, final String id, final double fill, final double stroke) { SVGViewUtils.getPrimitive(view, id).ifPresent(p -> p.get().setFillAlpha(fill).setStrokeAlpha(stroke)); }
SVGViewUtils { public static void setFillAndStroke(final SVGShapeView<?> view, final String id, final double fill, final double stroke) { SVGViewUtils.getPrimitive(view, id).ifPresent(p -> p.get().setFillAlpha(fill).setStrokeAlpha(stroke)); } }
SVGViewUtils { public static void setFillAndStroke(final SVGShapeView<?> view, final String id, final double fill, final double stroke) { SVGViewUtils.getPrimitive(view, id).ifPresent(p -> p.get().setFillAlpha(fill).setStrokeAlpha(stroke)); }  }
SVGViewUtils { public static void setFillAndStroke(final SVGShapeView<?> view, final String id, final double fill, final double stroke) { SVGViewUtils.getPrimitive(view, id).ifPresent(p -> p.get().setFillAlpha(fill).setStrokeAlpha(stroke)); }  static void switchVisibility(final SVGShapeView<?> view,
                                        final String visibleId,
                                        final String nonVisibleId); @SuppressWarnings("unchecked") static V getVisibleShape(final ShapeView<?>... views); static Optional<SVGPrimitive> getPrimitive(final SVGShapeView<?> view,
                                                      final String id); static SVGPrimitive getPrimitive(final SVGContainer container,
                                            final String id); static SVGPrimitive getPrimitive(final Collection<SVGPrimitive<?>> primitives,
                                            final String id); static SVGPrimitive getPrimitive(final SVGPrimitive<?> primitive,
                                            final String id); static void setFillAndStroke(final SVGShapeView<?> view, final String id, final double fill, final double stroke); }
SVGViewUtils { public static void setFillAndStroke(final SVGShapeView<?> view, final String id, final double fill, final double stroke) { SVGViewUtils.getPrimitive(view, id).ifPresent(p -> p.get().setFillAlpha(fill).setStrokeAlpha(stroke)); }  static void switchVisibility(final SVGShapeView<?> view,
                                        final String visibleId,
                                        final String nonVisibleId); @SuppressWarnings("unchecked") static V getVisibleShape(final ShapeView<?>... views); static Optional<SVGPrimitive> getPrimitive(final SVGShapeView<?> view,
                                                      final String id); static SVGPrimitive getPrimitive(final SVGContainer container,
                                            final String id); static SVGPrimitive getPrimitive(final Collection<SVGPrimitive<?>> primitives,
                                            final String id); static SVGPrimitive getPrimitive(final SVGPrimitive<?> primitive,
                                            final String id); static void setFillAndStroke(final SVGShapeView<?> view, final String id, final double fill, final double stroke);  }