Package org.apache.tapestry.ioc.services

Examples of org.apache.tapestry.ioc.services.SymbolSource


    @Test
    public void unknown_object_provider_prefix()
    {
        ServiceLocator locator = newServiceLocator();
        SymbolSource source = newSymbolSource();

        train_expandSymbols(source, "prefix:expression");

        replay();
View Full Code Here


    @Test
    public void no_prefix_in_object_reference()
    {
        ServiceLocator locator = newServiceLocator();
        SymbolSource source = newSymbolSource();
        TypeCoercer coercer = newTypeCoercer();

        train_expandSymbols(source, "${value}", "55");
        train_coerce(coercer, "55", Integer.class, 55);
View Full Code Here

        Asset coreAsset = mockAsset();
        DocumentHeadBuilder builder = mockDocumentScriptBuilder();
        Asset asset = mockAsset();
        AssetSource assetSource = mockAssetSource();
        SymbolSource symbolSource = mockSymbolSource();

        train_expandSymbols(symbolSource, CORE_ASSET_PATH_UNEXPANDED, CORE_ASSET_PATH);
        train_findAsset(assetSource, null, CORE_ASSET_PATH, null, coreAsset);

        train_toClientURL(coreAsset, CORE_ASSET_URL);
View Full Code Here

        String path = "${root}/foo/bar.pdf";
        String expanded = "org/apache/tapestry/foo/bar.pdf";

        DocumentHeadBuilder builder = mockDocumentScriptBuilder();
        Asset asset = mockAsset();
        SymbolSource source = mockSymbolSource();
        AssetSource assetSource = mockAssetSource();

        train_expandSymbols(source, path, expanded);

        train_findAsset(assetSource, null, expanded, null, asset);
View Full Code Here

    {
        AssetSource source = mockAssetSource();
        ObjectLocator locator = mockObjectLocator();
        AnnotationProvider annotationProvider = mockAnnotationProvider();
        TypeCoercer typeCoercer = mockTypeCoercer();
        SymbolSource symbolSource = mockSymbolSource();

        train_getAnnotation(annotationProvider, Path.class, null);

        replay();
View Full Code Here

        String path = "${foo}";
        String expanded = "foo/bar/baz.gif";
        AnnotationProvider annotationProvider = mockAnnotationProvider();
        TypeCoercer typeCoercer = mockTypeCoercer();
        Path pathAnnotation = mockPath();
        SymbolSource symbolSource = mockSymbolSource();

        train_getAnnotation(annotationProvider, Path.class, pathAnnotation);
        train_value(pathAnnotation, path);
        train_expandSymbols(symbolSource, path, expanded);
        train_findAsset(source, null, expanded, null, asset);
View Full Code Here

public class AssetInjectionProviderTest extends InternalBaseTestCase
{
    @Test
    public void no_path_annotation()
    {
        SymbolSource symbolSource = mockSymbolSource();
        AssetSource assetSource = mockAssetSource();
        ObjectLocator locator = mockObjectLocator();
        ClassTransformation ct = mockClassTransformation();
        MutableComponentModel model = mockMutableComponentModel();
View Full Code Here

    }

    @Test
    public void path_annotation_present()
    {
        SymbolSource symbolSource = mockSymbolSource();
        AssetSource assetSource = mockAssetSource();
        ObjectLocator locator = mockObjectLocator();
        ClassTransformation ct = mockClassTransformation();
        MutableComponentModel model = mockMutableComponentModel();
        Path annotation = mockPath();
View Full Code Here

    public void successful_lookup()
    {
        ObjectProvider provider = newObjectProvider();
        ServiceLocator locator = newServiceLocator();
        Runnable r = newRunnable();
        SymbolSource source = newSymbolSource();

        train_expandSymbols(source, "prefix:expression");
        train_provide(provider, "expression", Runnable.class, locator, r);

        replay();
View Full Code Here

    public void successful_lookup_case_insensitive()
    {
        ObjectProvider provider = newObjectProvider();
        ServiceLocator locator = newServiceLocator();
        Runnable r = newRunnable();
        SymbolSource source = newSymbolSource();

        train_expandSymbols(source, "PREFIX:expression");
        train_provide(provider, "expression", Runnable.class, locator, r);

        replay();
View Full Code Here

TOP

Related Classes of org.apache.tapestry.ioc.services.SymbolSource

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.