Package com.google.api.ads.dfp.jaxws.v201302

Examples of com.google.api.ads.dfp.jaxws.v201302.Asset


    @Test
    public void add_script_link_by_asset()
    {
        JavaScriptSupport js = mockJavaScriptSupport();
        Asset asset = mockAsset();

        js.importJavaScriptLibrary(asset);

        replay();
View Full Code Here


    public void add_classpath_script_link()
    {
        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);
View Full Code Here

    @Test
    public void add_stylesheet_link_by_asset()
    {
        String media = "print";
        JavaScriptSupport javascriptSupport = mockJavaScriptSupport();
        Asset asset = mockAsset("foo.css");

        javascriptSupport.importStylesheet(new StylesheetLink("foo.css", new StylesheetOptions(media)));

        replay();
View Full Code Here

    {
        List<Asset> result = CollectionFactory.newList();

        for (String assetPath : assetPaths)
        {
            Asset asset = assetSource.getAsset(baseResource, assetPath, locale);

            result.add(asset);
        }

        return result;
View Full Code Here

        return getAssetForResource(localized);
    }

    private Asset getAssetForResource(Resource resource)
    {
        Asset result = cache.get(resource);

        if (result == null)
        {
            result = createAssetFromResource(resource);
            cache.put(resource, result);
View Full Code Here

        return expand(path, locale);
    }

    public List<Asset> getJavascriptStack()
    {
        Asset messages = assetSource.getAsset(null, "org/apache/tapestry5/tapestry-messages.js", threadLocale
                .getLocale());

        return createStack(javaScriptStack, messages, consoleJavaScript);
    }
View Full Code Here

            {
                Locale locale = resources.getLocale();

                for (String assetPath : paths)
                {
                    Asset asset = assetSource.getAsset(baseResource, assetPath, locale);

                    handleAsset(asset);
                }
            }
        };
View Full Code Here

    }

    public Binding newBinding(String description, ComponentResources container, ComponentResources component,
                              String expression, Location location)
    {
        Asset asset = source.getContextAsset(expression, container.getLocale());

        return new AssetBinding(location, description, asset);
    }
View Full Code Here

    public Binding newBinding(String description, ComponentResources container, ComponentResources component,
                              String expression, Location location)
    {
        Resource baseResource = container.getBaseResource();

        Asset asset = source.getAsset(baseResource, expression, container.getLocale());

        return new AssetBinding(location, description, asset);
    }
View Full Code Here

        replay();

        AssetFactory factory = new ContextAssetFactory(request, context, "4.5.6", new IdentityAssetPathConverter());

        Asset asset = factory.createAsset(r);

        assertSame(asset.getResource(), r);
        assertEquals(asset.toClientURL(), "/context/assets/ctx/4.5.6/foo/Bar.txt");

        // In real life, toString() is the same as toClientURL(), but we're testing
        // that the optimize method is getting called, basically.

        assertEquals(asset.toString(), "/context/assets/ctx/4.5.6/foo/Bar.txt");

        verify();
    }
View Full Code Here

TOP

Related Classes of com.google.api.ads.dfp.jaxws.v201302.Asset

Copyright © 2018 www.massapicom. 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.