use of org.apache.tapestry5.services.PersistentLocale in project tapestry-5 by apache.
the class LocalizationSetterImplTest method unknown_locale_uses_locale_from_request.
@Test
public void unknown_locale_uses_locale_from_request() {
PersistentLocale pl = mockPersistentLocale();
ThreadLocale tl = mockThreadLocale();
Request request = mockRequest();
tl.setLocale(Locale.FRENCH);
train_getLocale(request, Locale.CANADA_FRENCH);
replay();
LocalizationSetterImpl setter = new LocalizationSetterImpl(request, pl, tl, "en,fr");
assertFalse(setter.setLocaleFromLocaleName("unknown"));
verify();
}
Aggregations