Esempio n. 1
0
  public void testNLSLocale() {
    NLS.setLocale(NLS.ROOT_LOCALE);
    GermanTranslatedBundle bundle = GermanTranslatedBundle.get();
    assertEquals(NLS.ROOT_LOCALE, bundle.getEffectiveLocale());

    NLS.setLocale(Locale.GERMAN);
    bundle = GermanTranslatedBundle.get();
    assertEquals(Locale.GERMAN, bundle.getEffectiveLocale());
  }
Esempio n. 2
0
  public void testJVMDefaultLocale() {
    Locale.setDefault(NLS.ROOT_LOCALE);
    NLS.useJVMDefaultLocale();
    GermanTranslatedBundle bundle = GermanTranslatedBundle.get();
    assertEquals(NLS.ROOT_LOCALE, bundle.getEffectiveLocale());

    Locale.setDefault(Locale.GERMAN);
    NLS.useJVMDefaultLocale();
    bundle = GermanTranslatedBundle.get();
    assertEquals(Locale.GERMAN, bundle.getEffectiveLocale());
  }