Package org.apache.tapestry.ioc

Examples of org.apache.tapestry.ioc.ServiceLocator


    @SuppressWarnings("unchecked")
    @Test
    public void ordered_collection_with_service_lookup()
    {
        OrderedConfiguration configuration = newOrderedConfiguration();
        ServiceLocator locator = newServiceLocator();
        UpcaseService service = newUpcaseService();

        train_getService(locator, "zip.Zap", UpcaseService.class, service);

        configuration.add("fred", service);
View Full Code Here


    @SuppressWarnings("unchecked")
    @Test
    public void mapped_collection_with_service_lookup()
    {
        MappedConfiguration configuration = newMappedConfiguration();
        ServiceLocator locator = newServiceLocator();
        UpcaseService service = newUpcaseService();

        train_getService(locator, "zip.Zap", UpcaseService.class, service);

        configuration.add("upcase", service);
View Full Code Here

    @Test
    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);
View Full Code Here

    @Test
    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);
View Full Code Here

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

        train_expandSymbols(source, "${symbol}", "prefix:expression");
        train_provide(provider, "expression", Runnable.class, locator, r);
View Full Code Here

    }

    @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

TOP

Related Classes of org.apache.tapestry.ioc.ServiceLocator

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.