@Test public void shouldUpdateCustomTranslationDataWhenDataIsNull() { given(customTranslation.getStringField(PLUGIN_IDENTIFIER)).willReturn(null); given(customTranslation.getStringField(KEY)).willReturn(null); given(customTranslation.getStringField(LOCALE)).willReturn(null); customTranslationModelHooksCTM.updateCustomTranslationData(customTranslationDD, customTranslation); verify(customTranslation).setField(PLUGIN_NAME, null); verify(customTranslation).setField(PROPERTIES_TRANSLATION, null); }
public void updateCustomTranslationData(final DataDefinition customTranslationDD, final Entity customTranslation) { String pluginIdentifier = customTranslation.getStringField(PLUGIN_IDENTIFIER); customTranslation.setField(PLUGIN_NAME, getPluginName(pluginIdentifier)); }
CustomTranslationModelHooksCTM { public void updateCustomTranslationData(final DataDefinition customTranslationDD, final Entity customTranslation) { String pluginIdentifier = customTranslation.getStringField(PLUGIN_IDENTIFIER); customTranslation.setField(PLUGIN_NAME, getPluginName(pluginIdentifier)); } }
CustomTranslationModelHooksCTM { public void updateCustomTranslationData(final DataDefinition customTranslationDD, final Entity customTranslation) { String pluginIdentifier = customTranslation.getStringField(PLUGIN_IDENTIFIER); customTranslation.setField(PLUGIN_NAME, getPluginName(pluginIdentifier)); }  }
CustomTranslationModelHooksCTM { public void updateCustomTranslationData(final DataDefinition customTranslationDD, final Entity customTranslation) { String pluginIdentifier = customTranslation.getStringField(PLUGIN_IDENTIFIER); customTranslation.setField(PLUGIN_NAME, getPluginName(pluginIdentifier)); }  void updateCustomTranslationData(final DataDefinition customTranslationDD, final Entity customTranslation); }
CustomTranslationModelHooksCTM { public void updateCustomTranslationData(final DataDefinition customTranslationDD, final Entity customTranslation) { String pluginIdentifier = customTranslation.getStringField(PLUGIN_IDENTIFIER); customTranslation.setField(PLUGIN_NAME, getPluginName(pluginIdentifier)); }  void updateCustomTranslationData(final DataDefinition customTranslationDD, final Entity customTranslation);  }