Examples of ThreadLocale


Examples of org.apache.tapestry.ioc.services.ThreadLocale

    @Test
    public void relative_asset()
    {
        AssetFactory factory = mockAssetFactory();
        ThreadLocale threadLocale = mockThreadLocale();
        Asset asset = mockAsset();

        Resource expectedResource = _baseResource.forFile("SimpleComponent_en_GB.properties");

        train_getRootResource(factory, _rootResource);
View Full Code Here

Examples of org.apache.tapestry.ioc.services.ThreadLocale

    @Test
    public void get_classpath_asset()
    {
        AssetFactory factory = mockAssetFactory();
        ThreadLocale threadLocale = mockThreadLocale();
        Asset asset = mockAsset();

        Resource expectedResource = _baseResource.forFile("SimpleComponent_en_GB.properties");

        train_getRootResource(factory, _rootResource);
View Full Code Here

Examples of org.apache.tapestry.ioc.services.ThreadLocale

    @Test
    public void get_classpath_asset_for_unspecified_locale()
    {
        AssetFactory factory = mockAssetFactory();
        ThreadLocale threadLocale = mockThreadLocale();
        Asset asset = mockAsset();
        Locale locale = Locale.UK;

        Resource expectedResource = _baseResource.forFile("SimpleComponent_en_GB.properties");
View Full Code Here

Examples of org.apache.tapestry.ioc.services.ThreadLocale

    @Test
    public void absolute_asset_with_known_prefix()
    {
        AssetFactory factory = mockAssetFactory();
        ThreadLocale threadLocale = mockThreadLocale();
        Asset asset = mockAsset();

        Resource expectedResource = _rootResource
                .forFile("org/apache/tapestry/internal/services/SimpleComponent_en_GB.properties");
View Full Code Here

Examples of org.apache.tapestry.ioc.services.ThreadLocale

    }

    @Test
    public void unknown_asset_prefix()
    {
        ThreadLocale threadLocale = mockThreadLocale();

        Map<String, AssetFactory> configuration = Collections.emptyMap();

        replay();
View Full Code Here

Examples of org.apache.tapestry.ioc.services.ThreadLocale

    }

    @Test
    public void missing_resource()
    {
        ThreadLocale threadLocale = mockThreadLocale();

        Map<String, AssetFactory> configuration = Collections.emptyMap();

        replay();
View Full Code Here

Examples of org.apache.tapestry.ioc.services.ThreadLocale

{
    @Test
    public void no_head_element()
    {
        Document d = new Document();
        ThreadLocale tl = newThreadLocale();
        AssetSource source = newAssetSource();
        Environment env = newEnvironment();

        d.newRootElement("foo");
        String initial = d.toString();
View Full Code Here

Examples of org.apache.tapestry.ioc.services.ThreadLocale

    @Test
    public void head_element_found()
    {
        Document d = new Document();
        ThreadLocale tl = newThreadLocale();
        AssetSource source = newAssetSource();
        Environment env = newEnvironment();
        Asset asset = newAsset();
        Locale l = Locale.FRENCH;
View Full Code Here

Examples of org.apache.tapestry5.ioc.services.ThreadLocale

    @Test
    public void known_locale()
    {
        PersistentLocale pl = mockPersistentLocale();
        ThreadLocale tl = mockThreadLocale();
        Request request = mockRequest();

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

        replay();

        LocalizationSetter setter = new LocalizationSetterImpl(request, pl, tl, "en,fr");
View Full Code Here

Examples of org.apache.tapestry5.ioc.services.ThreadLocale

    @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();
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.