Examples of LocalizationSetter


Examples of org.apache.tapestry5.services.LocalizationSetter

        tl.setLocale(Locale.FRENCH);
        pl.set(Locale.FRENCH);

        replay();

        LocalizationSetter setter = new LocalizationSetterImpl(request, pl, tl, "en,fr");

        assertTrue(setter.setLocaleFromLocaleName("fr"));

        verify();
    }
View Full Code Here

Examples of org.apache.tapestry5.services.LocalizationSetter

    }

    @Test
    public void get_selected_locales()
    {
        LocalizationSetter setter = new LocalizationSetterImpl(null, null, null, "en,fr");

        assertListsEquals(setter.getSupportedLocales(), Locale.ENGLISH, Locale.FRENCH);
    }
View Full Code Here

Examples of org.apache.tapestry5.services.LocalizationSetter

    }
   
    @Test
    public void get_selected_locale_names()
    {
        LocalizationSetter setter = new LocalizationSetterImpl(null, null, null, "en,fr");
       
        Object localeNames = TestBase.get(setter, "supportedLocaleNames");

        assertTrue(newSet("en", "fr").equals(localeNames));
    }
View Full Code Here

Examples of org.apache.tapestry5.services.LocalizationSetter

    }
   
    @Test
    public void get_selected_locale_names_with_whitespaces()
    {
        LocalizationSetter setter = new LocalizationSetterImpl(null, null, null, "en, fr,  de");
       
        Object localeNames = TestBase.get(setter, "supportedLocaleNames");

        assertTrue(newSet("en", "fr", "de").equals(localeNames));
    }
View Full Code Here

Examples of org.apache.tapestry5.services.LocalizationSetter

    }

    @Test
    public void get_locale_model()
    {
        LocalizationSetter setter = new LocalizationSetterImpl(null, null, null, "en,fr");

        SelectModel model = setter.getSupportedLocalesModel();

        assertNull(model.getOptionGroups());

        List<OptionModel> options = model.getOptions();
View Full Code Here

Examples of org.apache.tapestry5.services.LocalizationSetter

    }

    @Test
    public void to_locale_is_cached()
    {
        LocalizationSetter setter = new LocalizationSetterImpl(null, null, null, "en");

        Locale l1 = setter.toLocale("en");

        assertEquals(l1.toString(), "en");

        checkLocale(l1, "en", "", "");

        assertSame(setter.toLocale("en"), l1);
    }
View Full Code Here

Examples of org.apache.tapestry5.services.LocalizationSetter

    }

    @Test
    public void to_locale_is_cached()
    {
        LocalizationSetter setter = new LocalizationSetterImpl(null, null, null, "en");

        Locale l1 = setter.toLocale("en");

        assertEquals(l1.toString(), "en");

        checkLocale(l1, "en", "", "");

        assertSame(setter.toLocale("en"), l1);
    }
View Full Code Here

Examples of org.apache.tapestry5.services.LocalizationSetter

        tl.setLocale(Locale.FRENCH);
        pl.set(Locale.FRENCH);

        replay();

        LocalizationSetter setter = new LocalizationSetterImpl(request, pl, tl, "en,fr");

        assertTrue(setter.setLocaleFromLocaleName("fr"));

        verify();
    }
View Full Code Here

Examples of org.apache.tapestry5.services.LocalizationSetter

    }

    @Test
    public void get_selected_locales()
    {
        LocalizationSetter setter = new LocalizationSetterImpl(null, null, null, "en,fr");

        assertListsEquals(setter.getSupportedLocales(), Locale.ENGLISH, Locale.FRENCH);
    }
View Full Code Here

Examples of org.apache.tapestry5.services.LocalizationSetter

    }
   
    @Test
    public void get_selected_locale_names()
    {
        LocalizationSetter setter = new LocalizationSetterImpl(null, null, null, "en,fr");
       
        Object localeNames = TestBase.get(setter, "supportedLocaleNames");

        assertTrue(newSet("en", "fr").equals(localeNames));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.