@Test public void testMessageWhenNoI18N() { WisdomMessageResolver resolver = new WisdomMessageResolver(); resolver.i18n = mock(InternationalizationService.class); MessageResolution resolution = resolver.resolveMessage(null, "welcome", null); assertThat(resolution).isNull(); }
@Override public MessageResolution resolveMessage(Arguments arguments, String key, Object[] messageParameters) { Locale[] locales = getLocales(); String message = i18n.get(locales, key, messageParameters); if (message == null) { return null; } return new MessageResolution(message); }
WisdomMessageResolver extends AbstractMessageResolver implements IMessageResolver { @Override public MessageResolution resolveMessage(Arguments arguments, String key, Object[] messageParameters) { Locale[] locales = getLocales(); String message = i18n.get(locales, key, messageParameters); if (message == null) { return null; } return new MessageResolution(message); } }
WisdomMessageResolver extends AbstractMessageResolver implements IMessageResolver { @Override public MessageResolution resolveMessage(Arguments arguments, String key, Object[] messageParameters) { Locale[] locales = getLocales(); String message = i18n.get(locales, key, messageParameters); if (message == null) { return null; } return new MessageResolution(message); }  }
WisdomMessageResolver extends AbstractMessageResolver implements IMessageResolver { @Override public MessageResolution resolveMessage(Arguments arguments, String key, Object[] messageParameters) { Locale[] locales = getLocales(); String message = i18n.get(locales, key, messageParameters); if (message == null) { return null; } return new MessageResolution(message); }  @Override MessageResolution resolveMessage(Arguments arguments, String key, Object[] messageParameters); }
WisdomMessageResolver extends AbstractMessageResolver implements IMessageResolver { @Override public MessageResolution resolveMessage(Arguments arguments, String key, Object[] messageParameters) { Locale[] locales = getLocales(); String message = i18n.get(locales, key, messageParameters); if (message == null) { return null; } return new MessageResolution(message); }  @Override MessageResolution resolveMessage(Arguments arguments, String key, Object[] messageParameters);  }