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();
    }
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

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

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

        addScriptLink(asset);
    }
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

        return getAssetForResource(localized);
    }

    private synchronized Asset getAssetForResource(Resource resource)
    {
        Asset result = TapestryInternalUtils.getAndDeref(cache, resource);

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

                                                            ),
                                    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

                                                            ),
                                    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

    return assetSource.getAsset(null, expanded, locale);
  }

  public List<Asset> getJavaScriptLibraries() {
    Asset messages = assetSource.getAsset(null, ROOT + "/tapestry-messages.js", threadLocale.getLocale());

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

        JavaScriptStackPathConstructor pathConstructor = mockJavaScriptStackPathConstructor();
        trainForEmptyCoreStack(linker, stackSource, pathConstructor);

        trainForNoStackNames(stackSource);

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

        linker.addScriptLink("mylib.js");

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