@Test public void testAttributeChangeHandlerWhenNotDuplicate() { when(parent.isDuplicateAttribute(ATTRIBUTE_NEW_NAME)).thenReturn(false); prepareAttributeChange(ATTRIBUTE_NEW_NAME, MODEL_NEW_TO_STRING); verify(parent).isDuplicateAttribute(ATTRIBUTE_NEW_NAME); verify(parent).notifyModelChanged(); }
@Override public void notifyModelChanged() { String oldValue = currentValue; currentValue = getModel().toString(); currentName = getModel().getAttribute(); if (oldValue == null || !oldValue.equals(currentValue)) { parentWidget.notifyModelChanged(); } }
MetaDataListItemWidgetViewImpl implements MetaDataListItemWidgetView { @Override public void notifyModelChanged() { String oldValue = currentValue; currentValue = getModel().toString(); currentName = getModel().getAttribute(); if (oldValue == null || !oldValue.equals(currentValue)) { parentWidget.notifyModelChanged(); } } }
MetaDataListItemWidgetViewImpl implements MetaDataListItemWidgetView { @Override public void notifyModelChanged() { String oldValue = currentValue; currentValue = getModel().toString(); currentName = getModel().getAttribute(); if (oldValue == null || !oldValue.equals(currentValue)) { parentWidget.notifyModelChanged(); } }  }
MetaDataListItemWidgetViewImpl implements MetaDataListItemWidgetView { @Override public void notifyModelChanged() { String oldValue = currentValue; currentValue = getModel().toString(); currentName = getModel().getAttribute(); if (oldValue == null || !oldValue.equals(currentValue)) { parentWidget.notifyModelChanged(); } }  void setParentWidget(final MetaDataEditorWidgetView.Presenter parentWidget); @PostConstruct void init(); @Override MetaDataRow getModel(); @Override void setModel(final MetaDataRow model); @Override String getValue(); @Override void setValue(final String value); @Override void setReadOnly(final boolean readOnly); @EventHandler("deleteButton") void handleDeleteButton(final ClickEvent e); @Override void notifyModelChanged(); }
MetaDataListItemWidgetViewImpl implements MetaDataListItemWidgetView { @Override public void notifyModelChanged() { String oldValue = currentValue; currentValue = getModel().toString(); currentName = getModel().getAttribute(); if (oldValue == null || !oldValue.equals(currentValue)) { parentWidget.notifyModelChanged(); } }  void setParentWidget(final MetaDataEditorWidgetView.Presenter parentWidget); @PostConstruct void init(); @Override MetaDataRow getModel(); @Override void setModel(final MetaDataRow model); @Override String getValue(); @Override void setValue(final String value); @Override void setReadOnly(final boolean readOnly); @EventHandler("deleteButton") void handleDeleteButton(final ClickEvent e); @Override void notifyModelChanged();  }