コード例 #1
0
ファイル: JRubyI18nTest.java プロジェクト: ihr/sonarqube
 @Test
 public void convert_locales() {
   assertThat(JRubyI18n.toLocale("fr")).isEqualTo(Locale.FRENCH);
   assertThat(JRubyI18n.toLocale("fr-CH")).isEqualTo(new Locale("fr", "CH"));
 }
コード例 #2
0
ファイル: JRubyI18nTest.java プロジェクト: ihr/sonarqube
 @Test
 public void default_locale_should_be_english() {
   assertThat(JRubyI18n.toLocale(null)).isEqualTo(Locale.ENGLISH);
 }
コード例 #3
0
ファイル: JRubyI18nTest.java プロジェクト: emeraldjava/sonar
 @Test
 public void shouldConvertLocales() {
   assertThat(JRubyI18n.toLocale("fr"), Is.is(Locale.FRENCH));
   assertThat(JRubyI18n.toLocale("fr-CH"), Is.is(new Locale("fr", "CH")));
 }