Package org.apache.tapestry5.services

Examples of org.apache.tapestry5.services.ComponentClassResolver


        train_for_packages(source, CORE_ROOT_PACKAGE);
        train_for_app_packages(source);

        replay();

        ComponentClassResolver resolver = create(logger, source, locator,
                                                 new LibraryMapping(CORE_PREFIX, CORE_ROOT_PACKAGE));

        String className = LIB_ROOT_PACKAGE + ".pages.LibPage";

        try
        {
            resolver.resolvePageClassNameToPageName(className);
            unreachable();
        }
        catch (IllegalArgumentException ex)
        {
            assertEquals(ex.getMessage(), "Unable to resolve class name " + className + " to a logical page name.");
View Full Code Here


        train_locateComponentClassNames(locator, APP_ROOT_PACKAGE + ".pages", APP_ROOT_PACKAGE + ".pages.Start");

        replay();

        ComponentClassResolver resolver = create(logger, source, locator,
                                                 new LibraryMapping(CORE_PREFIX, CORE_ROOT_PACKAGE));

        try
        {
            resolver.canonicalizePageName("MissingPage");
            unreachable();
        }
        catch (IllegalArgumentException ex)
        {
            assertEquals(ex.getMessage(),
View Full Code Here

        train_for_packages(source, CORE_ROOT_PACKAGE);
        train_for_app_packages(source);

        replay();

        ComponentClassResolver resolver = create(logger, source, locator,
                                                 new LibraryMapping(CORE_PREFIX, CORE_ROOT_PACKAGE));

        String className = CORE_ROOT_PACKAGE + ".foo.CorePage";

        try
        {
            resolver.resolvePageClassNameToPageName(className);
            unreachable();
        }
        catch (IllegalArgumentException ex)
        {
            assertEquals(ex.getMessage(), "Unable to resolve class name " + className + " to a logical page name.");
View Full Code Here

        train_locateComponentClassNames(locator, secondaryLibPackage + ".pages", className);

        replay();

        ComponentClassResolver resolver = create(logger, source, locator,
                                                 new LibraryMapping(LIB_PREFIX, LIB_ROOT_PACKAGE),
                                                 new LibraryMapping(LIB_PREFIX, secondaryLibPackage),
                                                 new LibraryMapping(CORE_PREFIX, CORE_ROOT_PACKAGE));

        assertEquals(resolver.resolvePageNameToClassName("lib/MyLibPage"), className);

        verify();
    }
View Full Code Here

        // Is this test even needed any more with the new algorithm?

        replay();

        ComponentClassResolver resolver = create(logger, source, locator, new LibraryMapping("lib/deep", deepPackage),
                                                 new LibraryMapping(LIB_PREFIX, LIB_ROOT_PACKAGE),
                                                 new LibraryMapping(CORE_PREFIX, CORE_ROOT_PACKAGE));

        try
        {
            resolver.resolvePageNameToClassName("lib/deep/DeepPage");
            unreachable();
        }
        catch (IllegalArgumentException ex)
        {
            assertMessageContains(ex, "Unable to resolve 'lib/deep/DeepPage' to a page class name.");
View Full Code Here

        train_locateComponentClassNames(locator, APP_ROOT_PACKAGE + ".components", className);

        replay();

        ComponentClassResolver resolver = create(logger, source, locator);

        assertEquals(resolver.resolveComponentTypeToClassName("SimpleComponent"), className);

        verify();
    }
View Full Code Here

        train_locateComponentClassNames(locator, APP_ROOT_PACKAGE + ".mixins", expectedClassName);

        replay();

        ComponentClassResolver resolver = create(logger, source, locator);

        assertEquals(resolver.resolveMixinTypeToClassName("SimpleMixin"), expectedClassName);

        verify();
    }
View Full Code Here

        train_for_packages(source, CORE_ROOT_PACKAGE);
        train_for_app_packages(source);

        replay();

        ComponentClassResolver resolver = create(logger, source, locator,
                                                 new LibraryMapping(CORE_PREFIX, CORE_ROOT_PACKAGE));

        try
        {
            resolver.resolveMixinTypeToClassName("SimpleMixin");
            unreachable();
        }
        catch (IllegalArgumentException ex)
        {
            assertMessageContains(ex, "Unable to resolve 'SimpleMixin' to a mixin class name.");
View Full Code Here

        train_for_packages(source, CORE_ROOT_PACKAGE);
        train_for_app_packages(source);

        replay();

        ComponentClassResolver resolver = create(logger, source, locator,
                                                 new LibraryMapping(CORE_PREFIX, CORE_ROOT_PACKAGE));

        try
        {
            resolver.resolveComponentTypeToClassName("SimpleComponent");
            unreachable();
        }
        catch (IllegalArgumentException ex)
        {
            assertTrue(ex.getMessage().contains("Unable to resolve 'SimpleComponent' to a component class name."));
View Full Code Here

        PageActivationContextCollector collector = mockPageActivationContextCollector();
        RequestPageCache pageCache = mockRequestPageCache();
        LinkFactory factory = mockLinkFactory();
        Link link = mockLink();
        ComponentClassResolver resolver = mockComponentClassResolver();

        train_canonicalizePageName(resolver, pageName, pageName);

        train_collectPageActivationContext(collector, pageName, 3);
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.services.ComponentClassResolver

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.