@Test public void handleAddVarButton() { reset(roles); tested.handleAddVarButton(); verify(roles).add(anyInt(), any(KeyValueRow.class)); verify(tested).getWidget(roles.size() - 1); verify(widget).setParentWidget(tested); }
protected void handleAddVarButton() { getRows().add(getRowsCount(), new KeyValueRow()); final RolesListItemWidgetView widget = getWidget(getRowsCount() - 1); widget.setParentWidget(this); }
RolesEditorWidgetViewImpl extends Composite implements RolesEditorWidgetView,
                                                                    HasValue<String> { protected void handleAddVarButton() { getRows().add(getRowsCount(), new KeyValueRow()); final RolesListItemWidgetView widget = getWidget(getRowsCount() - 1); widget.setParentWidget(this); } }
RolesEditorWidgetViewImpl extends Composite implements RolesEditorWidgetView,
                                                                    HasValue<String> { protected void handleAddVarButton() { getRows().add(getRowsCount(), new KeyValueRow()); final RolesListItemWidgetView widget = getWidget(getRowsCount() - 1); widget.setParentWidget(this); } RolesEditorWidgetViewImpl(); }
RolesEditorWidgetViewImpl extends Composite implements RolesEditorWidgetView,
                                                                    HasValue<String> { protected void handleAddVarButton() { getRows().add(getRowsCount(), new KeyValueRow()); final RolesListItemWidgetView widget = getWidget(getRowsCount() - 1); widget.setParentWidget(this); } RolesEditorWidgetViewImpl(); @Override String getValue(); @Override void setValue(final String value); @Override void setValue(final String value,
                         final boolean fireEvents); @Override void doSave(); @Override void notifyModelChanged(); @Override HandlerRegistration addValueChangeHandler(final ValueChangeHandler<String> handler); @Override void init(final Presenter presenter); @Override void setReadOnly(final boolean readOnly); @Override int getRowsCount(); @Override void setRows(final List<KeyValueRow> rows); @Override List<KeyValueRow> getRows(); @Override RolesListItemWidgetView getWidget(int index); @Override void remove(final KeyValueRow row); @Override boolean isDuplicateName(String name); }
RolesEditorWidgetViewImpl extends Composite implements RolesEditorWidgetView,
                                                                    HasValue<String> { protected void handleAddVarButton() { getRows().add(getRowsCount(), new KeyValueRow()); final RolesListItemWidgetView widget = getWidget(getRowsCount() - 1); widget.setParentWidget(this); } RolesEditorWidgetViewImpl(); @Override String getValue(); @Override void setValue(final String value); @Override void setValue(final String value,
                         final boolean fireEvents); @Override void doSave(); @Override void notifyModelChanged(); @Override HandlerRegistration addValueChangeHandler(final ValueChangeHandler<String> handler); @Override void init(final Presenter presenter); @Override void setReadOnly(final boolean readOnly); @Override int getRowsCount(); @Override void setRows(final List<KeyValueRow> rows); @Override List<KeyValueRow> getRows(); @Override RolesListItemWidgetView getWidget(int index); @Override void remove(final KeyValueRow row); @Override boolean isDuplicateName(String name);  }