@Test void shouldProvideLocalizedSeverity() { assertThat(getLocalizedString(Severity.ERROR)).isEqualTo( Messages.Severity_Short_Error()); assertThat(getLocalizedString(Severity.WARNING_HIGH)).isEqualTo( Messages.Severity_Short_High()); assertThat(getLocalizedString(Severity.WARNING_NORMAL)).isEqualTo( Messages.Severity_Short_Normal()); assertThat(getLocalizedString(Severity.WARNING_LOW)).isEqualTo( Messages.Severity_Short_Low()); assertThat(getLocalizedString(createSeverity())).isEqualTo(SEVERITY_NAME); }
public static String getLocalizedString(final Severity severity) { if (severity == Severity.ERROR) { return Messages.Severity_Short_Error(); } if (severity == Severity.WARNING_HIGH) { return Messages.Severity_Short_High(); } if (severity == Severity.WARNING_NORMAL) { return Messages.Severity_Short_Normal(); } if (severity == Severity.WARNING_LOW) { return Messages.Severity_Short_Low(); } return severity.getName(); }
LocalizedSeverity { public static String getLocalizedString(final Severity severity) { if (severity == Severity.ERROR) { return Messages.Severity_Short_Error(); } if (severity == Severity.WARNING_HIGH) { return Messages.Severity_Short_High(); } if (severity == Severity.WARNING_NORMAL) { return Messages.Severity_Short_Normal(); } if (severity == Severity.WARNING_LOW) { return Messages.Severity_Short_Low(); } return severity.getName(); } }
LocalizedSeverity { public static String getLocalizedString(final Severity severity) { if (severity == Severity.ERROR) { return Messages.Severity_Short_Error(); } if (severity == Severity.WARNING_HIGH) { return Messages.Severity_Short_High(); } if (severity == Severity.WARNING_NORMAL) { return Messages.Severity_Short_Normal(); } if (severity == Severity.WARNING_LOW) { return Messages.Severity_Short_Low(); } return severity.getName(); } private  LocalizedSeverity(); }
LocalizedSeverity { public static String getLocalizedString(final Severity severity) { if (severity == Severity.ERROR) { return Messages.Severity_Short_Error(); } if (severity == Severity.WARNING_HIGH) { return Messages.Severity_Short_High(); } if (severity == Severity.WARNING_NORMAL) { return Messages.Severity_Short_Normal(); } if (severity == Severity.WARNING_LOW) { return Messages.Severity_Short_Low(); } return severity.getName(); } private  LocalizedSeverity(); static String getLocalizedString(final Severity severity); static String getLongLocalizedString(final Severity severity); }
LocalizedSeverity { public static String getLocalizedString(final Severity severity) { if (severity == Severity.ERROR) { return Messages.Severity_Short_Error(); } if (severity == Severity.WARNING_HIGH) { return Messages.Severity_Short_High(); } if (severity == Severity.WARNING_NORMAL) { return Messages.Severity_Short_Normal(); } if (severity == Severity.WARNING_LOW) { return Messages.Severity_Short_Low(); } return severity.getName(); } private  LocalizedSeverity(); static String getLocalizedString(final Severity severity); static String getLongLocalizedString(final Severity severity);  }