Package com.bazaarvoice.dropwizard.assets

Examples of com.bazaarvoice.dropwizard.assets.AssetServlet$Asset


        return newMock(JavaScriptSupport.class);
    }

    protected final Asset mockAsset(String assetURL)
    {
        Asset asset = mockAsset();

        train_toClientURL(asset, assetURL);

        return asset;
    }
View Full Code Here


    @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

        DocumentLinker linker = mockDocumentLinker();
        JavaScriptStackSource stackSource = mockJavaScriptStackSource();
        JavaScriptStackPathConstructor pathConstructor = mockJavaScriptStackPathConstructor();
        trainForEmptyCoreStack(linker, stackSource, pathConstructor);

        Asset library = mockAsset("mylib.js");

        linker.addScriptLink("mylib.js");

        replay();
View Full Code Here

        DocumentLinker linker = mockDocumentLinker();
        JavaScriptStackSource stackSource = mockJavaScriptStackSource();
        JavaScriptStackPathConstructor pathConstructor = mockJavaScriptStackPathConstructor();
        trainForEmptyCoreStack(linker, stackSource, pathConstructor);

        Asset library1 = mockAsset("mylib1.js");
        Asset library2 = mockAsset("mylib2.js");

        linker.addScriptLink("mylib1.js");
        linker.addScriptLink("mylib2.js");

        replay();
View Full Code Here

    @Test
    public void import_stylesheet_as_asset()
    {
        DocumentLinker linker = mockDocumentLinker();
        Asset stylesheet = mockAsset("style.css");

        StylesheetLink link = new StylesheetLink("style.css");
        linker.addStylesheetLink(link);

        replay();
View Full Code Here

    private void addScriptLinkFromClasspath(String path)
    {
        String expanded = symbolSource.expandSymbols(path);

        Asset asset = assetSource.getAsset(null, expanded, null);

        addScriptLink(asset);
    }
View Full Code Here

    @Test
    public void add_script_link_by_asset()
    {
        DocumentLinker linker = mockDocumentLinker();
        Asset asset = mockAsset();

        train_toClientURL(asset, ASSET_URL);
        linker.addScriptLink(ASSET_URL);

        replay();
View Full Code Here

    @Test
    public void core_assets_added()
    {
        getMocksControl().checkOrder(true);

        Asset coreAsset = mockAsset();
        DocumentLinker linker = mockDocumentLinker();
        Asset asset = mockAsset();
        AssetSource assetSource = mockAssetSource();
        SymbolSource symbolSource = mockSymbolSource();

        train_expandSymbols(symbolSource, CORE_ASSET_PATH_UNEXPANDED, CORE_ASSET_PATH);
        train_getAsset(assetSource, null, CORE_ASSET_PATH, null, coreAsset);
View Full Code Here

TOP

Related Classes of com.bazaarvoice.dropwizard.assets.AssetServlet$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.