@Test public void testMakeQNameWithItemDefinition() { final ItemDefinition itemDefinition = mock(ItemDefinition.class); final Name itemDefinitionName = mock(Name.class); final String expectedName = "tAddress"; when(itemDefinitionName.getValue()).thenReturn(expectedName); when(itemDefinition.getName()).thenReturn(itemDefinitionName); final QName name = handler.makeQName(itemDefinition); final String actual = name.toString(); final String expected = "tAddress"; assertEquals(expected, actual); assertEquals(QName.NULL_NS_URI, name.getNamespaceURI()); }
QName makeQName(final DataType dataType) { return normaliseTypeRef(makeQName(dataType.getType())); }
ItemDefinitionUpdateHandler { QName makeQName(final DataType dataType) { return normaliseTypeRef(makeQName(dataType.getType())); } }
ItemDefinitionUpdateHandler { QName makeQName(final DataType dataType) { return normaliseTypeRef(makeQName(dataType.getType())); } @Inject  ItemDefinitionUpdateHandler(final DataTypeManager dataTypeManager,
                                       final ItemDefinitionUtils itemDefinitionUtils,
                                       final PropertiesPanelNotifier panelNotifier,
                                       final Event<DataTypeChangedEvent> dataTypeChangedEvent); }
ItemDefinitionUpdateHandler { QName makeQName(final DataType dataType) { return normaliseTypeRef(makeQName(dataType.getType())); } @Inject  ItemDefinitionUpdateHandler(final DataTypeManager dataTypeManager,
                                       final ItemDefinitionUtils itemDefinitionUtils,
                                       final PropertiesPanelNotifier panelNotifier,
                                       final Event<DataTypeChangedEvent> dataTypeChangedEvent); void update(final DataType dataType,
                       final ItemDefinition itemDefinition); }
ItemDefinitionUpdateHandler { QName makeQName(final DataType dataType) { return normaliseTypeRef(makeQName(dataType.getType())); } @Inject  ItemDefinitionUpdateHandler(final DataTypeManager dataTypeManager,
                                       final ItemDefinitionUtils itemDefinitionUtils,
                                       final PropertiesPanelNotifier panelNotifier,
                                       final Event<DataTypeChangedEvent> dataTypeChangedEvent); void update(final DataType dataType,
                       final ItemDefinition itemDefinition);  }