Package org.apache.tapestry5.services

Examples of org.apache.tapestry5.services.AssetFactory.createAsset()


        replay();

        AssetFactory factory = new ContextAssetFactory(request, context, optimizer);

        Asset asset = factory.createAsset(r);

        assertSame(asset.getResource(), r);
        assertEquals(asset.toClientURL(), "/opt/path1");

        // In real life, toString() is the same as toClientURL(), but we're testing
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
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
View Full Code Here

        Class resourceClass = resource.getClass();

        AssetFactory factory = registry.get(resourceClass);

        return factory.createAsset(resource);
    }

}
View Full Code Here

        Class resourceClass = resource.getClass();

        AssetFactory factory = registry.get(resourceClass);

        return factory.createAsset(resource);
    }
}
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.