@Test public void testUpdateParameterName() { final InformationItem parameter1 = new InformationItem(); final InformationItem parameter2 = new InformationItem(); view.setParameters(Arrays.asList(parameter1, parameter2)); view.updateParameterName(0, PARAMETER1_NAME); verify(parameterView1).setName(PARAMETER1_NAME); view.updateParameterName(1, PARAMETER2_NAME); verify(parameterView2).setName(PARAMETER2_NAME); reset(parameterView1, parameterView2); view.updateParameterName(-1, "cheese"); verify(parameterView1, never()).setName(anyString()); verify(parameterView2, never()).setName(anyString()); view.updateParameterName(2, "cheese"); verify(parameterView1, never()).setName(anyString()); verify(parameterView2, never()).setName(anyString()); }
@Override public void updateParameterName(final int index, final String name) { if (index < 0 || index >= parameterViewInstances.size()) { return; } parameterViewInstances.get(index).setName(name); }
ParametersPopoverViewImpl extends AbstractPopoverViewImpl implements ParametersPopoverView { @Override public void updateParameterName(final int index, final String name) { if (index < 0 || index >= parameterViewInstances.size()) { return; } parameterViewInstances.get(index).setName(name); } }
ParametersPopoverViewImpl extends AbstractPopoverViewImpl implements ParametersPopoverView { @Override public void updateParameterName(final int index, final String name) { if (index < 0 || index >= parameterViewInstances.size()) { return; } parameterViewInstances.get(index).setName(name); } ParametersPopoverViewImpl(); @Inject  ParametersPopoverViewImpl(final Div parametersContainer,
                                     final Div addParameter,
                                     final ManagedInstance<ParameterView> parameterViews,
                                     final Div popoverElement,
                                     final Div popoverContentElement,
                                     final JQueryProducer.JQuery<Popover> jQueryPopover); }
ParametersPopoverViewImpl extends AbstractPopoverViewImpl implements ParametersPopoverView { @Override public void updateParameterName(final int index, final String name) { if (index < 0 || index >= parameterViewInstances.size()) { return; } parameterViewInstances.get(index).setName(name); } ParametersPopoverViewImpl(); @Inject  ParametersPopoverViewImpl(final Div parametersContainer,
                                     final Div addParameter,
                                     final ManagedInstance<ParameterView> parameterViews,
                                     final Div popoverElement,
                                     final Div popoverContentElement,
                                     final JQueryProducer.JQuery<Popover> jQueryPopover); @Override void init(final Presenter presenter); @Override void setParameters(final List<InformationItem> parameters); @Override void updateParameterName(final int index,
                                    final String name); @Override void focusParameter(final int index); @EventHandler("addParameter") @SinkNative(Event.ONCLICK) @SuppressWarnings("unused") void onClickAddParameter(final Event event); }
ParametersPopoverViewImpl extends AbstractPopoverViewImpl implements ParametersPopoverView { @Override public void updateParameterName(final int index, final String name) { if (index < 0 || index >= parameterViewInstances.size()) { return; } parameterViewInstances.get(index).setName(name); } ParametersPopoverViewImpl(); @Inject  ParametersPopoverViewImpl(final Div parametersContainer,
                                     final Div addParameter,
                                     final ManagedInstance<ParameterView> parameterViews,
                                     final Div popoverElement,
                                     final Div popoverContentElement,
                                     final JQueryProducer.JQuery<Popover> jQueryPopover); @Override void init(final Presenter presenter); @Override void setParameters(final List<InformationItem> parameters); @Override void updateParameterName(final int index,
                                    final String name); @Override void focusParameter(final int index); @EventHandler("addParameter") @SinkNative(Event.ONCLICK) @SuppressWarnings("unused") void onClickAddParameter(final Event event);  }