Package net.feed_the_beast.launcher.json.assets

Examples of net.feed_the_beast.launcher.json.assets.AssetIndex$Asset


        replay();

        ClasspathAssetFactory factory = new ClasspathAssetFactory(digestManager, aliasManager, converter);

        Asset asset = factory.createAsset(r);

        assertEquals(asset.toClientURL(), expectedClientURL);

        // Now, to check the cache:

        assertEquals(asset.toClientURL(), expectedClientURL);

        verify();

        // Now, to test cache clearing:
        train_requiresDigest(digestManager, r, false);

        train_toClientURL(aliasManager, "foo/Bar.txt", expectedClientURL);

        replay();

        factory.objectWasInvalidated();

        assertEquals(asset.toClientURL(), expectedClientURL);

        verify();
    }
View Full Code Here


        replay();

        AssetFactory factory = new ClasspathAssetFactory(digestManager, aliasManager, new IdentityAssetPathConverter());

        Asset asset = factory.createAsset(r);

        assertSame(asset.getResource(), r);
        assertEquals(asset.toClientURL(), expectedClientURL);
        assertEquals(asset.toString(), expectedClientURL);

        verify();
    }
View Full Code Here

        replay();

        AssetFactory factory = new ClasspathAssetFactory(digestManager, aliasManager, new IdentityAssetPathConverter());

        Asset asset = factory.createAsset(r);

        assertSame(asset.getResource(), r);
        assertEquals(asset.toClientURL(), expectedClientURL);
        assertEquals(asset.toString(), expectedClientURL);

        verify();
    }
View Full Code Here

            {
                Locale locale = resources.getLocale();

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

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

        {
            public void renderMarkup(MarkupWriter writer, MarkupRenderer renderer)
            {
                RenderSupport renderSupport = environment.peek(RenderSupport.class);
               
                Asset validators = assetSource.getAsset(null, "org/apache/tapestry5/beanvalidator/tapestry-beanvalidator.js",
                        threadLocale.getLocale());

                renderSupport.addScriptLink(validators);

                renderer.renderMarkup(writer);
View Full Code Here

        replay();

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

        Asset asset = factory.createAsset(r);

        assertSame(asset.getResource(), r);
        assertEquals(asset.toClientURL(), "/context/assets/4.5.6/ctx/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/4.5.6/ctx/foo/Bar.txt");

        verify();
    }
View Full Code Here

    public void test_imagesubmit_event_fired()
    {
        Request request = mockRequest();
        final ComponentResources resources = mockComponentResources();
        FormSupport formSupport = mockFormSupport();
        Asset image = mockAsset();

        String elementName = "myname";

        train_getParameter(request, Form.SUBMITTING_ELEMENT_ID, null);
        train_getParameter(request, elementName + ".x", "15");
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 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

    @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

TOP

Related Classes of net.feed_the_beast.launcher.json.assets.AssetIndex$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.