本文整理匯總了Java中org.sonar.api.i18n.I18n類的典型用法代碼示例。如果您正苦於以下問題:Java I18n類的具體用法?Java I18n怎麽用?Java I18n使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
I18n類屬於org.sonar.api.i18n包,在下文中一共展示了I18n類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setUp
import org.sonar.api.i18n.I18n; //導入依賴的package包/類
@Before
public void setUp() {
notification.setFieldValue(AbstractXMPPTemplate.FIELD_PROJECT_NAME, "PNAME");
notification.setFieldValue("count", "6");
notification.setFieldValue("count-MAJOR", "5");
notification.setFieldValue("count-INFO", "1");
notification.setFieldValue("count-MINOR", "0");
notification.setFieldValue("count-CRITICAL", "0");
notification.setFieldValue("count-BLOCKER", "0");
settings = mock(XMPPSettings.class);
i18n = mock(I18n.class);
when(settings.getServerBaseUrl()).thenReturn("URL");
when(i18n.message(Locale.ENGLISH, "severity.INFO", "INFO")).thenReturn("INFO");
when(i18n.message(Locale.ENGLISH, "severity.MAJOR", "MAJOR")).thenReturn("MAJOR");
when(i18n.message(Locale.ENGLISH, "severity.MINOR", "MINOR")).thenReturn("MINOR");
when(i18n.message(Locale.ENGLISH, "severity.CRITICAL", "CRITICAL")).thenReturn("CRITICAL");
when(i18n.message(Locale.ENGLISH, "severity.BLOCKER", "BLOCKER")).thenReturn("BLOCKER");
template = new NewIssuesXMPPMessageTemplate(settings, i18n);
}
開發者ID:ppapapetrou76,項目名稱:sonar-xmpp-notifications,代碼行數:20,代碼來源:NewIssuesXMPPMessageTemplateTest.java
示例2: NewIssuesXMPPMessageTemplate
import org.sonar.api.i18n.I18n; //導入依賴的package包/類
public NewIssuesXMPPMessageTemplate(XMPPSettings settings, I18n i18n) {
super(settings);
this.i18n = i18n;
}
示例3: FileAlertDecorator
import org.sonar.api.i18n.I18n; //導入依賴的package包/類
public FileAlertDecorator(Settings settings, RulesProfile profile, I18n i18n) {
this.enabled = settings.getBoolean(PropertyKey.FILE_ALERTS_ENABLED);
this.profile = profile;
this.i18n = i18n;
}