Examples of IAssetSpecification


Examples of org.apache.tapestry.spec.IAssetSpecification

*/
public class TestInjectAssetWorker extends HiveMindTestCase
{
    private IComponentSpecification newSpec(String assetName, String propertyName, Location location)
    {
        IAssetSpecification as = new AssetSpecification();
        as.setPropertyName(propertyName);
        as.setLocation(location);

        MockControl control = newControl(IComponentSpecification.class);
        IComponentSpecification spec = (IComponentSpecification) control.getMock();

        spec.getAssetNames();
View Full Code Here

Examples of org.apache.tapestry.spec.IAssetSpecification

        Iterator i = names.iterator();

        while (i.hasNext())
        {
            String name = (String) i.next();
            IAssetSpecification assetSpec = specification.getAsset(name);
            IAsset asset = convert(name, component, assetSpec, specLocation);

            component.addAsset(name, asset);
        }
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IAssetSpecification

*/
public class TestInjectAssetWorker extends HiveMindTestCase
{
    private IComponentSpecification newSpec(String assetName, String propertyName, Location location)
    {
        IAssetSpecification as = new AssetSpecification();
        as.setPropertyName(propertyName);
        as.setLocation(location);

        MockControl control = newControl(IComponentSpecification.class);
        IComponentSpecification spec = (IComponentSpecification) control.getMock();

        spec.getAssetNames();
View Full Code Here

Examples of org.apache.tapestry.spec.IAssetSpecification

     */
    public void testAssets_3_0() throws Exception
    {
        IComponentSpecification cs = parsePage("Assets_3_0.page");

        IAssetSpecification as = cs.getAsset("mycontext");

        assertEquals("context:path/to/context", as.getPath());

        as = cs.getAsset("myprivate");

        assertEquals("classpath:path/to/private", as.getPath());

        as = cs.getAsset("myexternal");

        assertEquals("http://myexternal/asset", as.getPath());

        assertListsEqual(new String[]
        { "mycontext", "myexternal", "myprivate" }, cs.getAssetNames());
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IAssetSpecification

    public void testAssets() throws Exception
    {
        IComponentSpecification cs = parsePage("Assets.page");

        IAssetSpecification as = cs.getAsset("myasset");

        assertEquals("path/to/asset", as.getPath());
        assertEquals("myProperty", as.getPropertyName());
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IAssetSpecification

        while (i.hasNext())
        {
            String name = (String) i.next();

            IAssetSpecification assetSpec = specification.getAsset(name);

            IAsset asset = convertAsset(assetSpec);

            component.addAsset(name, asset);
        }
View Full Code Here

Examples of org.apache.tapestry.spec.IAssetSpecification

     */
    public void testAssets_3_0() throws Exception
    {
        IComponentSpecification cs = parsePage("Assets_3_0.page");

        IAssetSpecification as = cs.getAsset("mycontext");

        assertEquals("context:path/to/context", as.getPath());

        as = cs.getAsset("myprivate");

        assertEquals("classpath:path/to/private", as.getPath());

        as = cs.getAsset("myexternal");

        assertEquals("http://myexternal/asset", as.getPath());

        assertListsEqual(new String[]
        { "mycontext", "myexternal", "myprivate" }, cs.getAssetNames());
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IAssetSpecification

    public void testAssets() throws Exception
    {
        IComponentSpecification cs = parsePage("Assets.page");

        IAssetSpecification as = cs.getAsset("myasset");

        assertEquals("path/to/asset", as.getPath());
        assertEquals("myProperty", as.getPropertyName());
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IAssetSpecification

        while (i.hasNext())
        {
            String name = (String) i.next();

            IAssetSpecification assetSpec = specification.getAsset(name);

            IAsset asset = convertAsset(assetSpec);

            component.addAsset(name, asset);
        }
View Full Code Here

Examples of org.apache.tapestry.spec.IAssetSpecification

     */
    public void testAssets_3_0() throws Exception
    {
        IComponentSpecification cs = parsePage("Assets_3_0.page");

        IAssetSpecification as = cs.getAsset("mycontext");

        assertEquals("context:path/to/context", as.getPath());

        as = cs.getAsset("myprivate");

        assertEquals("classpath:path/to/private", as.getPath());

        as = cs.getAsset("myexternal");

        assertEquals("http://myexternal/asset", as.getPath());

        assertListsEqual(new String[]
        { "mycontext", "myexternal", "myprivate" }, cs.getAssetNames());
    }
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.