Examples of AssetSource


Examples of org.apache.tapestry5.services.AssetSource

        Map<String, AssetFactory> configuration = Collections.singletonMap("classpath", factory);

        replay();

        AssetSource source = new AssetSourceImpl(threadLocale, configuration, null);

        // First try creates it:

        assertSame(source.getClasspathAsset("org/apache/tapestry5/internal/services/SimpleComponent.properties",
                Locale.UK), asset);

        verify();
    }
View Full Code Here

Examples of org.apache.tapestry5.services.AssetSource

        Map<String, AssetFactory> configuration = Collections.singletonMap("classpath", factory);

        replay();

        AssetSource source = new AssetSourceImpl(null, configuration, symbolSource);

        // First try creates it:

        assertSame(source.getExpandedAsset("${path}/SimpleComponent.properties"), asset);

        verify();

    }
View Full Code Here

Examples of org.apache.tapestry5.services.AssetSource

        train_getLocale(threadLocale, locale);

        replay();

        AssetSource source = new AssetSourceImpl(threadLocale, configuration, null);

        assertSame(source.getClasspathAsset("org/apache/tapestry5/internal/services/SimpleComponent.properties"), asset);

        verify();
    }
View Full Code Here

Examples of org.apache.tapestry5.services.AssetSource

        Map<String, AssetFactory> configuration = Collections.singletonMap("classpath", factory);

        replay();

        AssetSource source = new AssetSourceImpl(threadLocale, configuration, null);

        assertSame(source.getAsset(baseResource,
                "classpath:org/apache/tapestry5/internal/services/SimpleComponent.properties", Locale.UK), asset);

        // Check that a leading slash is not a problem:

        assertSame(source.getAsset(baseResource,
                "classpath:/org/apache/tapestry5/internal/services/SimpleComponent.properties", Locale.UK), asset);

        verify();
    }
View Full Code Here

Examples of org.apache.tapestry5.services.AssetSource

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

        replay();

        AssetSource source = new AssetSourceImpl(threadLocale, configuration, null);

        try
        {
            source.getAsset(baseResource,
                    "classpath:org/apache/tapestry5/internal/services/SimpleComponent.properties", Locale.UK);
            unreachable();
        }
        catch (IllegalArgumentException ex)
        {
View Full Code Here

Examples of org.apache.tapestry5.services.AssetSource

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

        replay();

        AssetSource source = new AssetSourceImpl(threadLocale, configuration, null);

        try
        {
            source.getAsset(baseResource, "DoesNotExist.properties", Locale.UK);
            unreachable();
        }
        catch (RuntimeException ex)
        {
            assertEquals(
View Full Code Here

Examples of org.apache.tapestry5.services.AssetSource

{
    @Test
    public void no_path_annotation()
    {
        SymbolSource symbolSource = mockSymbolSource();
        AssetSource assetSource = mockAssetSource();
        ObjectLocator locator = mockObjectLocator();
        ClassTransformation ct = mockClassTransformation();
        MutableComponentModel model = mockMutableComponentModel();
        TransformField field = newMock(TransformField.class);
View Full Code Here

Examples of org.apache.tapestry5.services.AssetSource

        String path = "${root}/foo/bar.pdf";
        String expanded = "org/apache/tapestry5/foo/bar.pdf";

        Asset asset = mockAsset();
        SymbolSource source = mockSymbolSource();
        AssetSource assetSource = mockAssetSource();
        JavaScriptSupport js = mockJavaScriptSupport();

        train_expandSymbols(source, path, expanded);

        train_getAsset(assetSource, null, expanded, null, asset);
View Full Code Here

Examples of org.apache.tapestry5.services.AssetSource

        DocumentLinker linker = mockDocumentLinker();

        Asset coreAsset1 = mockAsset();
        Asset coreAsset2 = mockAsset();

        AssetSource assetSource = mockAssetSource();
        SymbolSource symbolSource = mockSymbolSource();

        ClientInfrastructure infrastructure = mockJavascriptStack(coreAsset1, coreAsset2);

        train_toClientURL(coreAsset1, coreURL1);
View Full Code Here

Examples of org.apache.tapestry5.services.AssetSource

    {
        String coreScript = "corescript.js";

        DocumentLinker linker = mockDocumentLinker();
        SymbolSource symbolSource = mockSymbolSource();
        AssetSource assetSource = mockAssetSource();
        Asset coreAsset = mockAsset(coreScript);
        ClientInfrastructure infrastructure = mockJavascriptStack(coreAsset);

        linker.addScriptLink(coreScript);
        linker.addScript("Tapestry.Foo(\"bar\");");
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.