@Test public void testGetLabel_Locale() { TestUiFramework.get().setUiLocale(Locale.GERMAN); DefaultPmoNlsService defaultPmoNlsService = new DefaultPmoNlsService(); assertThat(defaultPmoNlsService.getLabel(DefaultPmoNlsServiceTest.class, PROPERTY_TEST, "", "foo"), is("Kein Aspekt")); assertThat(defaultPmoNlsService.getLabel(DefaultPmoNlsServiceTest.class, PROPERTY_TEST, "bla", "fallback"), is("BlaBla")); assertThat(defaultPmoNlsService.getLabel(DefaultPmoNlsServiceTest.class, "only", "german", "Subsidiaritätsprinzip"), is("Streichholzschächtelchen")); TestUiFramework.get().setUiLocale(Locale.ENGLISH); assertThat(defaultPmoNlsService.getLabel(DefaultPmoNlsServiceTest.class, "only", "german", "Subsidiaritätsprinzip"), is("Subsidiaritätsprinzip")); }
@Override public String getLabel(Class<?> pmoClass, String propertyName, String aspectName, String fallbackValue) { return getLabel(pmoClass, PmoNlsService.getPropertyKey(pmoClass, propertyName, aspectName), fallbackValue); }
DefaultPmoNlsService implements PmoNlsService { @Override public String getLabel(Class<?> pmoClass, String propertyName, String aspectName, String fallbackValue) { return getLabel(pmoClass, PmoNlsService.getPropertyKey(pmoClass, propertyName, aspectName), fallbackValue); } }
DefaultPmoNlsService implements PmoNlsService { @Override public String getLabel(Class<?> pmoClass, String propertyName, String aspectName, String fallbackValue) { return getLabel(pmoClass, PmoNlsService.getPropertyKey(pmoClass, propertyName, aspectName), fallbackValue); } DefaultPmoNlsService();  DefaultPmoNlsService(PmoBundleNameGenerator bundleNameGenerator); }
DefaultPmoNlsService implements PmoNlsService { @Override public String getLabel(Class<?> pmoClass, String propertyName, String aspectName, String fallbackValue) { return getLabel(pmoClass, PmoNlsService.getPropertyKey(pmoClass, propertyName, aspectName), fallbackValue); } DefaultPmoNlsService();  DefaultPmoNlsService(PmoBundleNameGenerator bundleNameGenerator); @Override String getSectionCaption(Class<?> pmoClass, String fallbackValue); @Override String getLabel(Class<?> pmoClass, String propertyName, String aspectName, String fallbackValue); }
DefaultPmoNlsService implements PmoNlsService { @Override public String getLabel(Class<?> pmoClass, String propertyName, String aspectName, String fallbackValue) { return getLabel(pmoClass, PmoNlsService.getPropertyKey(pmoClass, propertyName, aspectName), fallbackValue); } DefaultPmoNlsService();  DefaultPmoNlsService(PmoBundleNameGenerator bundleNameGenerator); @Override String getSectionCaption(Class<?> pmoClass, String fallbackValue); @Override String getLabel(Class<?> pmoClass, String propertyName, String aspectName, String fallbackValue);  }