Package org.apache.tapestry.services

Examples of org.apache.tapestry.services.Alias


        }
    }

    private void setupServices()
    {
        Alias alias = _registry.getService("Alias", Alias.class);

        alias.setMode(_aliasMode);
    }
View Full Code Here


        train_getAliasesForMode(manager, mode, configuration);
        train_getAliasesForMode(overridesManager, mode, _emptyMap);

        replay();

        Alias alias = new AliasImpl(manager, mode, overridesManager);

        // Do not assume that infra and provider are the same;
        // that's an implementation choice.

        ObjectProvider provider = alias.getObjectProvider();

        // Run through a couple of times to ensure that values are cached.
        for (int i = 0; i < 2; i++)
        {
            Runnable actual = provider.provide(Runnable.class, annotationProvider, locator);
View Full Code Here

        train_getAliasesForMode(overridesManager, mode, overrideConfiguration);

        replay();

        Alias alias = new AliasImpl(manager, mode, overridesManager);

        ObjectProvider provider = alias.getObjectProvider();

        Runnable actual = provider.provide(Runnable.class, annotationProvider, locator);

        assertSame(actual, override);
View Full Code Here

        train_getAliasesForMode(manager, mode, _emptyMap);
        train_getAliasesForMode(overridesManager, mode, _emptyMap);

        replay();

        Alias alias = new AliasImpl(manager, mode, overridesManager);

        // Do not assume that infra and provider are the same;
        // that's an implementation choice.

        ObjectProvider provider = alias.getObjectProvider();

        assertNull(provider.provide(Runnable.class, annotationProvider, locator));

        verify();
View Full Code Here

        AliasManager overridesManager = newAliasManager();
        ServiceLocator locator = newServiceLocator();

        replay();

        Alias alias = new AliasImpl(manager, overridesManager);

        // Do not assume that alias and provider are the same;
        // that's an implementation choice.

        ObjectProvider provider = alias.getObjectProvider();

        try
        {
            provider.provide("expression", Runnable.class, locator);
            unreachable();
View Full Code Here

        getAliasesForMode(manager, mode, configuration);
        getAliasesForMode(overridesManager, mode, _emptyMap);

        replay();

        Alias alias = new AliasImpl(manager, overridesManager);

        alias.setMode(mode);

        // Do not assume that infra and provider are the same;
        // that's an implementation choice.

        ObjectProvider provider = alias.getObjectProvider();

        Runnable actual = provider.provide(property, Runnable.class, locator);

        assertSame(actual, r);
View Full Code Here

        getAliasesForMode(manager, mode, masterConfiguration);
        getAliasesForMode(overridesManager, mode, overrideConfiguration);

        replay();

        Alias alias = new AliasImpl(manager, overridesManager);

        alias.setMode(mode);

        ObjectProvider provider = alias.getObjectProvider();

        Runnable actual = provider.provide(property, Runnable.class, locator);

        assertSame(actual, overrideRunnable);
View Full Code Here

        getAliasesForMode(manager, mode, configuration);
        getAliasesForMode(overridesManager, mode, _emptyMap);

        replay();

        Alias alias = new AliasImpl(manager, overridesManager);

        alias.setMode(mode);

        // Do not assume that infra and provider are the same;
        // that's an implementation choice.

        ObjectProvider provider = alias.getObjectProvider();

        Runnable actual1 = provider.provide(property, Runnable.class, locator);
        Runnable actual2 = provider.provide(property, Runnable.class, locator);

        assertSame(actual1, r);
View Full Code Here

        getAliasesForMode(manager, mode, configuration);
        getAliasesForMode(overridesManager, mode, _emptyMap);

        replay();

        Alias alias = new AliasImpl(manager, overridesManager);

        alias.setMode(mode);

        ObjectProvider provider = alias.getObjectProvider();

        try
        {
            provider.provide("someexpression", Runnable.class, locator);
            unreachable();
View Full Code Here

        getAliasesForMode(manager, mode, configuration);
        getAliasesForMode(overridesManager, mode, _emptyMap);

        replay();

        Alias alias = new AliasImpl(manager, overridesManager);

        alias.setMode(mode);

        // Do not assume that infra and provider are the same;
        // that's an implementation choice.

        ObjectProvider provider = alias.getObjectProvider();

        try
        {
            provider.provide(property, UpdateListenerHub.class, locator);
            unreachable();
View Full Code Here

TOP

Related Classes of org.apache.tapestry.services.Alias

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.