@Test public void testNotifyPropertiesPanel() { final String oldName = "oldName"; final String newName = "newName"; final QName qName = new QName(NULL_NS_URI, newName); when(panelNotifier.withOldLocalPart(oldName)).thenReturn(panelNotifier); when(panelNotifier.withNewQName(eq(qName))).thenReturn(panelNotifier); when(itemDefinitionUtils.normaliseTypeRef(qName)).thenReturn(qName); handler.notifyPropertiesPanel(oldName, newName); verify(panelNotifier).notifyPanel(); }
void notifyPropertiesPanel(final String oldLocalPart, final String newLocalPart) { panelNotifier .withOldLocalPart(oldLocalPart) .withNewQName(normaliseTypeRef(makeQName(newLocalPart))) .notifyPanel(); }
ItemDefinitionHandler implements DRGElementHandler { void notifyPropertiesPanel(final String oldLocalPart, final String newLocalPart) { panelNotifier .withOldLocalPart(oldLocalPart) .withNewQName(normaliseTypeRef(makeQName(newLocalPart))) .notifyPanel(); } }
ItemDefinitionHandler implements DRGElementHandler { void notifyPropertiesPanel(final String oldLocalPart, final String newLocalPart) { panelNotifier .withOldLocalPart(oldLocalPart) .withNewQName(normaliseTypeRef(makeQName(newLocalPart))) .notifyPanel(); } @Inject  ItemDefinitionHandler(final ItemDefinitionUtils itemDefinitionUtils,
                                 final Event<RefreshDataTypesListEvent> refreshDataTypesListEvent,
                                 final PropertiesPanelNotifier panelNotifier); }
ItemDefinitionHandler implements DRGElementHandler { void notifyPropertiesPanel(final String oldLocalPart, final String newLocalPart) { panelNotifier .withOldLocalPart(oldLocalPart) .withNewQName(normaliseTypeRef(makeQName(newLocalPart))) .notifyPanel(); } @Inject  ItemDefinitionHandler(final ItemDefinitionUtils itemDefinitionUtils,
                                 final Event<RefreshDataTypesListEvent> refreshDataTypesListEvent,
                                 final PropertiesPanelNotifier panelNotifier); @Override void update(final String oldModelName,
                       final String newModelName); @Override void destroy(final String oldModelName); }
ItemDefinitionHandler implements DRGElementHandler { void notifyPropertiesPanel(final String oldLocalPart, final String newLocalPart) { panelNotifier .withOldLocalPart(oldLocalPart) .withNewQName(normaliseTypeRef(makeQName(newLocalPart))) .notifyPanel(); } @Inject  ItemDefinitionHandler(final ItemDefinitionUtils itemDefinitionUtils,
                                 final Event<RefreshDataTypesListEvent> refreshDataTypesListEvent,
                                 final PropertiesPanelNotifier panelNotifier); @Override void update(final String oldModelName,
                       final String newModelName); @Override void destroy(final String oldModelName);  }